Has anyone else been running into this issue?
If I run any backtests before the year 2022, they crash and burn with a stack overflow. Here is an example of a backtest from Jan 1st 2022 - Feb 1st 2022. 2023 and newer tests run without any issues.
PS: Cannot attach backtests becaused crashed backtests do not show up in the dropdown when you click the “attach backtest button”
[ERROR] FATAL UNHANDLED EXCEPTION:Stack overflow.,Repeat 174498 times:,--------------------------------, at QuantConnect.Lean.Engine.DataFeeds.ZipEntryNameSubscriptionDataSourceReader.OnInvalidSource(QuantConnect.Data.SubscriptionDataSource, System.Exception),--------------------------------, at QuantConnect.Lean.Engine.DataFeeds.ZipEntryNameSubscriptionDataSourceReader+<Read>d__6.MoveNext(), at QuantConnect.Lean.Engine.DataFeeds.SubscriptionDataReader.MoveNext(), at QuantConnect.Lean.Engine.DataFeeds.Enumerators.SynchronizingEnumerator`1+<GetBruteForceMethod>d__15[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext(), at QuantConnect.Lean.Engine.DataFeeds.Enumerators.SynchronizingEnumerator`1[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext(), at QuantConnect.Lean.Engine.DataFeeds.Enumerators.FillForwardEnumerator.MoveNext(), at QuantConn
Mia Alissi
To help Dee resolve the stack overflow issue with backtests before 2022, we can follow these steps based on the information gathered:
Review Error Logs: The error logs indicate that the issue arises from the
ZipEntryNameSubscriptionDataSourceReader
andSubscriptionDataReader
methods. These components are responsible for reading data from zip files and managing data subscriptions.Check Data Availability: Ensure that the data for the period before 2022 is available and correctly formatted. Missing or corrupted data files can lead to stack overflow errors. Verify the data files in your QuantConnect data library for completeness and integrity.
Inspect Data Source Configuration: Confirm that the data source configuration in your algorithm is correct and compatible with the data format used in the pre-2022 period. This includes checking the
SubscriptionDataSource
settings and ensuring they match the expected data structure.Simplify the Algorithm: Temporarily simplify your algorithm by removing complex logic or data requests to isolate the issue. This can help determine if the problem is related to specific data handling or algorithm logic.
Update Lean Engine: Make sure your Lean engine is updated to the latest version. Updates may contain fixes for known issues, including stack overflow errors. You can check for updates in the QuantConnect platform settings.
Use Debugging Tools: Utilize QuantConnect's debugging tools to step through the algorithm execution and identify the exact operation causing the overflow. This can provide insights into where the data handling might be failing.
Consult Documentation and Community: Refer to QuantConnect documentation for any known issues related to stack overflow and seek advice from the community forums if the problem remains unresolved. The community might have encountered similar issues and can offer solutions or workarounds.
By following these steps, Dee should be able to identify and resolve the stack overflow issue in backtests before 2022. If further assistance is needed, feel free to ask for more specific guidance on any of these steps.
Sources: Debugging - QuantConnect.com
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.
Martin Molinero
Hey Dee Znut!
Please share a way to reproduce the issue so we can look into it and resolve it ASAP. If you don't want to share publicly please share with support@quantconnect.com
Thank you
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.
Dee Znut
I have been in touch with Alex about this. The issue is now resolved. I am not sure what resolved it, but the backtests started working on their own starting 9/9/2024.
2008 and earlier was broken for at least 1 week that I am aware of. Maybe it was a data feed issue or something.
Dee Znut
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!