Hello
I am having trouble with my risk model when incorporating it in the algorithm framework.
The risk model (MaximumDrawdownPercentPerSecurity) seems to liquidate the correct tickers, at the correct time, but the day after the risk model has liquidated the ticker, the insight is still active, and will buy the security back. This is not what i inteded. I inteded to liquidate the security, until the next rebalance kicks in. I have tried to incorporate the risk model in the alpha, but with no luck. Any suggestions on how i can implement the logic?
Thank you
Lucas
Varad Kabade
Hi Lucas,
We recommend going through the following thread where we have implemented the RiskManagementModel logic inside the AlphaModel.
Best,
Varad Kabade
Lucas
Hej Varad
Thank you for the answer. I have tried to implement the logic for the last couple of days, but with no succes unfortunately. I have also tried to implement the logic of MaximumDrawdownPercentPortfolio but also without luck. It seems like the insights does not override the existing insight objects, therefore not liqudating the tickers. Is there any way you could incorporate the logic in the code i have linked in the top of the discussion?
Any help would be appreciated. I am really stuck on this one
Thank you
Lucas
Varad Kabade
Hi Lucas,
Would you please attach a backtest highlighting the above issue?
Best,
Varad Kabade
Lucas
Hej Varad
Yes, here it is.
The logic in the code is most definitely flawed. This is one of the ways i tried to incorporate the risk model in the alpha, but without succes. The algorithm should rebalance once a month, but the risk model should always be active. Hence why the model is implemented before the rebalance function. Hope you can help.
Thank you
Lucas
Louis Szeto
Hi Lucas
Since you're using InsightWeightingPortfolioConstructionModel, it is necessary to provide a weight argument for the flat insight to work.
Best
Louis Szeto
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.
Lucas
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!