Hi,
Let's say you have a number (>1) of alpha models (passed into a CompositeAlphaModel) and a portfolio construction model that takes the average direction*confidence of the alphas's latest generated insights to generate asset weights.
When you first start your test, the first alpha that generates an insight will have weight 100% assigned to its insight, which is unlikely to be intended behaviour.
As such, you might want to count the number of alphas stored in CompositeAlphaModel's _alphaModels property, and ideally be able to access this count from inside your portfolio construction model. This way, you can weight the first incoming insight appropriately.
Right now, there's no way to access this count, other than manually inputting the number of alphas present inside your portfolio construction model.
Is there a better solution to this problem or is this a feature that would be in line with the intended behaviour of the Framework approach?
Jared Broad
That is the current design of the EqualWeightingPortfolioModel - the limitation of the % assignment should be done in the risk model (limiting the exposure to specific assets or sectors).
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.
Douglas Stridsberg
I'm not sure we're talking about the same thing - the EqualWeightingPortfolioModel actually only takes into account the last insight generated and thus applies a 100% weight to the direction of that insight.
What I'm talking about here is if I have multiple alpha models generating multiple insights for each symbol. I'm looking for a way to know how many alpha models are currently operating, so I can weight their respective insights accordingly.
Jared Broad
active ones, but yes it'll take the last active if there are multiple
active ones for the same symbol.
You could weight multiple insights for the same symbol by the confidence
property? This is demonstrated in the BlackLitterman PCM
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.
Douglas Stridsberg
Weighting the insights using the confidence property would work, yes - but it would violate the interchangability of alphas. If I want to develop a portfolio construction model that intelligently weights alphas, it really needs to know how many there are in the first place.
In absence of anything else, I guess the "solution" here is to simply count the alphas by looking at the currently generated insights (as per my original post) and accept that the first couple of insights generated will be artificially overweighted. Potentially one could use the first couple of [months] as a warm-up period for the algorithm to give time for each alpha to generate at least one insight.
Douglas Stridsberg
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!