I’m wondering if others on this board have some sources/insights into design patterns that are useful for doing portfolio construction and backtesting in R or MATLAB (or even in general).
Most of what I do is tactical asset allocation, although potentially I’d want to do more screening, which would involve a more dynamic selection of assets.
I’m able to code stuff to do this work and get the results, but can’t help feeling that I am organizing data inefficiently, and that my data objects are either not flexible enough or, alternatively, are scattered all over my digital workspace.
For example, a portfolio history has, at a minimum, a sequence of asset exposures over time. If we have a sequence of asset returns as well, we can tell the object to spit out its exposures, or just the total portfolio returns. But should the asset returns be its own object, or should I just hold them in the portfolio object too? In Java, I might use the strategy pattern for this, but Im not sure how to implement in R or MATLAB.
Anyone know of a reference or source that can help with good coding/process design specifically oriented to these types of problems?
Most of what I do is tactical asset allocation, although potentially I’d want to do more screening, which would involve a more dynamic selection of assets.
I’m able to code stuff to do this work and get the results, but can’t help feeling that I am organizing data inefficiently, and that my data objects are either not flexible enough or, alternatively, are scattered all over my digital workspace.
For example, a portfolio history has, at a minimum, a sequence of asset exposures over time. If we have a sequence of asset returns as well, we can tell the object to spit out its exposures, or just the total portfolio returns. But should the asset returns be its own object, or should I just hold them in the portfolio object too? In Java, I might use the strategy pattern for this, but Im not sure how to implement in R or MATLAB.
Anyone know of a reference or source that can help with good coding/process design specifically oriented to these types of problems?