in this template, when backtest I encounter


It seems that the strategy doesn't have a exit rule of stocks
how do I revise the strategy, customize the alphy model to set a exit rule?
QUANTCONNECT COMMUNITY
in this template, when backtest I encounter
It seems that the strategy doesn't have a exit rule of stocks
how do I revise the strategy, customize the alphy model to set a exit rule?
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.
Mia Alissi
Here's how you can revise your algorithm to add a custom exit rule inside a custom alpha model. This example uses moving averages for entry, and supports exit rules for stop-loss, take-profit, or opposite momentum—plus the logic is clear and commented in both English and Chinese (中文) for '李元骏':
修改和集成后,回测时就会按照自定义的退出规则自动触发平仓。如果还有细化需要,欢迎补充!
Sources: Key Concepts - QuantConnect.com, Hybrid Algorithms - QuantConnect.com, Intraday Arbitrage Between Index ETFs, E T F Constituent Universe R S I Alpha Model Algorithm, Mean Reversion Portfolio Algorithm
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.
李元骏
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!