I'm currently looking to convert my existing multipart algorithm into a QC framework algorithm. I had already built my own framework similar to QC's. In my existing framework each alpha class sets a desired allocation of securities and then the framework combines the allocations and executes them all to minimize transaction fees. My algorithm is designed to be used in an long-only retirement portfolio where my goal is to use smart rebalancing to beat a simple buy and hold portfolio on a risk adjusted basis rather than focus on making individual profitable trades.
Similar to this:
- Algo 1:
- Spy = 0.4
- TLT = 0.6
- Algo 2:
- Spy = 0.6
- TLT = 0.2
- XIV = 0.2
- Combined allocations (equiweight) that get executed:
- Spy = (0.4+0.6)/2 = 0.5
- TLT = (0.6+0.2)/2 = 0.4
- XIV = (0+0.2)/2 = 0.1
Jared Broad
Hey Lukel! The framework (and coding in general) tries to separate concerns. One piece of code should be focused on one task. We've tried to abstract the concerns of predicting the future -- away from the concern of position sizing in the portfolio. In the framework, these are handled by separate models and although you could hack it to do what you want -- it's not the spirit of the design.
Insights are not designed for any specific time frame - but rather the best guess of your algorithm on the potential future return. From here your portfolio construction model should figure out the best weights possible.
You could make a portfolio construction model which assigned weights based on the confidence flag of your insights. This would be a reasonable proxy.
To support multiple alphas in a single algorithm we've got the CompositeAlphaModel which splices the results of two Alpha models together. The insights are named so you can determine the source in the portfolio model.
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
LukeI
Thanks Jared,
The more I think about it, the more I realize my algorithm's position sizing is actually a measure of confidence. Each alpha assigns it's various weights to each asset based on it's own individual factors of what asset or combination of assets it thinks will do best in the near future (1 week to 1 month). Even though it doesn't separate position sizing a weight of 0 would be 0 confidence that an asset will rise (basically a flat insight). A weight of 1.0 would be complete confidence that that particular asset will rise more than the other assets it could have assigned weights to. The alphas are not designed to short so there would be no down insights. My framework takes the combination of those confidence levels from each alpha in equal parts and assigns them in the final allocation. I think it seems relatively simple to make a custom portfolio construction model based on this.
I've been exicted to use QC's framework rather than my own custom one for a while now, but didn't have time to dig into it in the last 6 months.
LukeI
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!