Hi Everyone,
I'm playing around with the MACD and RSI alpha models available, and I'm having trouble understanding why no direction score is generated until about 22 days into the backtest. Are the alpha models not being warmed up properly, or is it something else?
Any advice is useful! Thanks!
Aaron Janeiro Stone
Without running it or delving too deep, it could be that MACD has a 26 day long input and thus requires at least that many points of data until it can be calculated. Did you try adjusting the warm up?
Edit: I do see
self.SetWarmUp(300, Resolution.Daily)
so I reckon my prior suggestion would be an issue if the warm-up data is discarded (as it should be, I'd assume).
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.
Robert Koch
Thanks Aaron,
I considered this, but isn't the point of a warm up to prepare indicators requiring history data, such that they are ready at day one?
Also, while the source for the MACD alpha doesn't include a call to Update, the RSI alpha model does call Update with history data. I can understand that MACD might not be ready, but shouldn't the RSI model at least yield some insight score?
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.
Robert Koch
Thanks! I thought that this might be the case. I've actually tried to fix this myself, but I don't think I did it properly...
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!