I'm running a local lean backtest with lean-cli and Polygon data provider and when I'm reviewing the results json, I'm getting zeros for most of the statistics despite the strategy working properly and placing orders, unlike cloud projects where I get actual values. My subscription is “Researcher”. Am I doing something wrong or lean doesn't provide these statistics?
"statistics": {
"Total Orders": "1293",
"Average Win": "0%",
"Average Loss": "0%",
"Compounding Annual Return": "0%",
"Drawdown": "0%",
"Expectancy": "0",
"Start Equity": "1000000",
"End Equity": "995716.25",
"Net Profit": "0%",
"Sharpe Ratio": "0",
"Sortino Ratio": "0",
"Probabilistic Sharpe Ratio": "0%",
"Loss Rate": "0%",
"Win Rate": "0%",
"Profit-Loss Ratio": "0",
"Alpha": "0",
"Beta": "0",
"Annual Standard Deviation": "0",
"Annual Variance": "0",
"Information Ratio": "0",
"Tracking Error": "0",
"Treynor Ratio": "0",
"Total Fees": "$871.36",
"Estimated Strategy Capacity": "$650000.00",
"Lowest Capacity Asset": "MRUS 2T",
"Portfolio Turnover": "300.56%"
},
Mia Alissi
It seems there isn't specific documentation addressing the issue of zero statistics in local Lean backtests. However, here are some steps you can take to troubleshoot and potentially resolve the issue:
Verify Subscription Limitations: Ensure that the "Researcher" subscription doesn't have limitations on local backtesting statistics compared to cloud backtests.
Check Lean CLI Configuration: Make sure that the Lean CLI is correctly configured and that all necessary components for calculating statistics are enabled.
Review Algorithm Code: Double-check your algorithm code to ensure it is correctly implemented and that there are no errors that might prevent statistics from being calculated.
Inspect Backtest Logs: Review the logs generated during the backtest for any warnings or errors that might indicate why statistics are not being calculated.
Update Lean CLI: Ensure that the Lean CLI and all related packages are up to date, as updates may contain bug fixes or improvements.
Consult QuantConnect Forums: Reach out to the QuantConnect community forums or support to see if others have experienced similar issues and found solutions.
Test with a Simple Algorithm: Run a simple, known-working algorithm to determine if the issue is specific to your current strategy or a broader problem with the setup.
If you continue to experience issues, consider reaching out to QuantConnect support for more detailed assistance.
Sources: Charting - QuantConnect.com, Debugging Tools - QuantConnect.com, Results - QuantConnect.com, Algorithm Statistics - QuantConnect.com, Results - 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.
Ahmed Sobhy Khattab
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!