The following backtest shows a candle in the nvda data which shouldnt be there because it is not using data outside of trading hours.
Maybe someone can help:
The github examples should be updated because
if not data.ContainsKey(self.symbol): return
does not catch the problem
only
if data[self.symbol] is None:
does.
There was another person fighting with a simlar error message but was using the alpha framework.
Does the alpha framework know that data can be none calculating targets/quantity?
https://www.quantconnect.com/forum/discussion/5636/crash-error-when-running-algorithm-in-paper-trading-production-not-when-backtesting/p1
thanks for help
Douglas Stridsberg
Can't answer for the existence of a candle that shouldn't be there, but it shouldn't affect your algorithm running. The default portfolio constructor manages such cases of zero price by checking if the resulting target is null before acting on it. Alphas should be built similarly, i.e. only acting on non-zero prices. Exisiting Alphas perform this check too.
Michael Manus
i forgot that there was a dividend event during that time it seems.
the last stock split was more than 10 years ago. didn't thought about dividend. :(
the comment in the examples does not say that it takes care for splits and dividends.Â
Michael Manus
btw the price is null when the dividend event pops up :)
if someone will search for it
Michael Manus
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!