If I need raw data normalization, is there a recommended approach for handling of split data that occurs during the warm up period?
For example let's say I use simple moving average of 200 days. I want to backtest from January 1, 2020, but on December 1, 2019 a split occurred. Wouldn't my SMA value be off?
Derrick Tan
After a little more testing. . .
Seems like I have the following options:
I think I would prefer the second option to keep things consistent. Is there an api that will allow me to fetch the historical splits?
Even without this, I am not completely blocked though. I am left with a work around to parameteratize the initialization:
Varad Kabade
Hi Derrick Tan,
We're regretted that the Split data has no historical data call available. Meanwhile, we could explicitly call DataNormalizationMode.SplitAdjusted to warm up the indicator. After forcefully switched into DataNormalizationMode.Raw after warm up, you could access the Split data and adjust accordingly inside the OnData method. Refer to the attached backtest.
Best,
Varad Kabade
Derrick Tan
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!