Back

Question on Algorithm Framework

Reading through the documentation and forum and can't seem to find an answer for this. I know you can use more than one Alpha in an algorithm to emit insights, but can you use more than one RiskManagement model? The reason I ask is because I know RiskManagement module will directly turn into portfolio targets by the PCM, whereas an Alpha will not. 

The situation is I have two ideas that qualify as Risk Management but I'm deciding on whether I need to make one of them into an Alpha to use both in the algorithm. Let me know. 

 

 

Update Backtest







0

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.


I found a CompositeRiskModel example in the QC Github with an AddRiskModel method that I take it would be called in the calling algorithm. Is there any example of this CompositeModel being used?

Also, is it possibel to use an Alpha within a RiskManagement module? Like emit an insight for risk management and then update the target in the ManageRisk function accodingly

https://github.com/QuantConnect/Lean/blob/master/Algorithm/Risk/CompositeRiskManagementModel.py

0

Hi John,

This risk model would be used like any other that you could import and use in the IDE. For example,
 

self.SetRiskManagement(CompositeRiskManagementModel(MaximumDrawdownPercentPortfolio(0.03), MaximumUnrealizedProfitPercentPerSecurity(0.03)))

Insights shouldn't be emitted in a risk management model. The Alpha model is the main place to do this, where we make predictions about security movements, and these should be isolated from the other framework models. The risk, construction, execution, and universe models shouldn't contain Insights. The risk model will update the portfolio targets to interact with the rest of the framework models.

0

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.


Update Backtest





0

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.


Loading...

This discussion is closed