I wrote the start and end dates as
SetStartDate(2002, 10, 1); SetEndDate(2020, 05, 25);why does the back test run to 2005 and just stop? I've had this problem before and it would be great if someone could explain why and how to solve it.Also this was code just copied and pasted from the Liquid Value Stocks tutorial lesson but with RiskManagement added.
Apollos Hill
Hi I changed line 10 to Daily Res and it loaded fine for me .
UniverseSettings.Resolution = Resolution.Daily;
Derek Melchin
Hi Yuanming Yao,
The algorithm needs to implement the OnSecuritiesChanged method in the alpha model to keep track of the securities in the universe. After doing so, we just need to change the loop inside the alpha model to
foreach (var security in _activeSecurities){ ... }
This fixes the error messages that were being produced and enables the algorithm to continue executing. The algorithm only stops now because of reaching the maximum order limit. See the backtest below for reference. Note that the universe has been reduced in size to speed up the debugging process.
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.
Yuanming Yao
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!