I am lost as to why the warmup does not work and the algo always start trading a few days after the actual start date.
Any pointers on what could be happening?
QUANTCONNECT COMMUNITY
I am lost as to why the warmup does not work and the algo always start trading a few days after the actual start date.
Any pointers on what could be happening?
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.
Louis Szeto
As far as I know, the algo will start on the preset date, just would not trade on its insight for warm up period
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.
Derek Melchin
Hi Aalap,
The algorithm above doesn't trade immediately because no securities pass the `is_uptrend` test for the first several days so the CoarseSelectionFunction returns an empty list. To work on resolving the issue, we need to first extend the lookback window used to warmup the indicators.
self.history = self.History(security.Symbol, 40, Resolution.Daily)
Next, we need to remove
self.stock = self.algo.AddEquity(self.symbol,self.resolution)
This line is not necessary as the universe selection method is responsible for managing the security subscriptions.
The next step is to replace how we construct the indicators. When we have a dynamic universe of securities, we should use the full indicator name (Momentum) instead of the short-cut method (`algorithm.MOM`). Refer to this related thread for an example. Since the indicators are will no longer be updated automatically after this change, we'll need to manually update them inside the `SymbolData`'s `update` method.
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.
Aalap Sharma
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!