I was looking at the documentation for the Alpha frameworks and it mentions that in cases of multiple alphas the insights are tagged with the name of the alpha that generated them. However, when I look at the individual insights via logs I don't see any label that contains information about the name of the alpha.
I'm trying to build an equal weight portfolio construction model that allows me to have different rebalance periods. For example, one alpha might be designed to be frequently rebalanced, where another would rebalance less freqently. The caveat is that the same symbol might be used in both alphas.
I figure if I can group insights by their alpha name, then I can segment the portfolio construction in such a way that it handles each alpha's insights based on their own ruleset.
Is this possible? Is there an easier solution to this problem?
Stephen Hyer
I was able to come up with a solution. I'll attach a backtest with the code in case anyone else wants to use it. I designed this for a manual universe selection with a few symbols. If you're using a dynamic universe selection you'll need to come up with a clever way of assigning the source models.
Derek Melchin
Hi Stephen,
For completeness, I've attached an algorithm demonstrating how a portfolio construction model can get the name of the alpha model that emitted an insight when using a dynamic universe. I recommend users refer to our alpha model and PCM documentation for more information.
Best,
Derek Melchin
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.
Stephen Hyer
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!