Hello all,
I've been able to pull futures data and backtest on the cloud without any problems, but I've been running into significant issues when trying to locally backtest futures and get data/contracts to function.
As of right now, I'm running LEAN-CLI to develop locally & push my changes to the cloud.
Here are my primary problems:
1. I've generated random data using LEAN-CLI for all of my futures tickers. The data is present and exists.
My backtest logs show "Processed XX,XXX data points", so clearly the data is there.
The problem is, the OnData() event *never* triggers; no matter how many backtests or local debug runs I've run.
When I add an Equity, it triggers. When I only use AddFuture, nothing ever goes through the OnData() event.
2. I'm not sure what data I'm missing to be able to debug futures locally using randomly generated data, just like I'm able to do in the cloud.
How do I add "mock" contracts with expiration dates?
I'm not able to find where this is located locally... and where this data needs to be populated.
I just want to create some mock contract rollovers to debug locally.
Any help is appreciated!
Dantash
UPDATE:
Actually, I take that back!
I have done AddEquity("SPY"), and I still never have the OnData() section trigger…
For reference, I'm using JetBrains Rider (with remote debug attachment)
When I place a breakpoint on Initialize(), it always works. No breakpoints on “OnData()” ever trigger, however…
Dantash
UPDATE #2:
Was missing data for the date range.
Now I've added data for SPY in the date range, and it has worked.
The issue still remains, however – I'm not able to get a FuturesChain to ever show up locally ^
Dantash
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!