Can someone shed some light on these error messages that I am getting in my backtest logs. Code can be found below in main.py: the strategy is residual momentum with dynamic volatility scaling (switching into bonds and gold) and monthly rebalancement.
"Data for symbol HPE has been limited due to numerical precision issues in the factor file"
I keep getting this error for all various stocks and I'm guessing that's the reason why my backtest is taking so long.
Furthermore, my algorithm executes long positions in the top 20 stocks displaying the strongest residual momentum; however, when I look at my holdings, it seems that I am holding only 19 stocks at times instead of the 20. Can someone please explain to me the reason why?
Thank you all so much!
Jared Broad
Hi John; thank you for your patience as we get to your issue. We're down the community in the order of the oldest first but will get to your issue soon.
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.
Shile Wen
Hi John,
That error is for assets that don't have map/factor files because they haven't changed the ticker or paid dividends in their lifetime. Furthermore, please use the Debugger to understand why the logic only holds 19 securities.
Best,
Shile Wen
John Fogel
Shile Wen Thanks for the reply - but could you enlighten me a bit more about assets not having map/factor files? I don't really understand your explanation to the first part.
John Fogel
Shile Wen and is there a way to eliminate such error messages?
Shile Wen
Hi John,
When the asset doesn't have factor files, it means the symbol hasn't had splits, paid dividends, or changed tickers. Furthermore, it is not possible to remove those warnings, though it only logs it once per symbol.
Best,
Shile Wen
Jared Broad
We'll look into fixing this John. This doesn't seem like an acceptable user experience. Thank you for letting us know.
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.
John Fogel
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!