I've spent over 80 hours between the forums, searching, LLM's, and anything else I can think of and I can't get a straight answer on this.
We're running LEAN locally and have our own futures data. We want to roll on different days than the standard and for some symbols we want to trade only certain months.
I've tried every example given online and nothing is working:
- I tried to adjust the map_file to set a specific date, that doesn't work
- I tried to adjust the open interest in the .zip file, that didn't work
- I tried to remove the contract from the universe file a few days early, that didn't work
- I tried to remove the price data for the early contract, that didn't work
Is this just not possible? Specifically I'm trying to roll the March S&P mini on 3/17 instead of 3/20. No combination of the above is working, and to make it worse, on 3/20 we're getting an onData call with both the March AND the June contracts.
Some options involve custom-building LEAN but that seems like overkill. While I wasn't expecting this to be as easy as overriding an interface that takes a symbol + contract and you give it a date, I can't beleive we're the only ones trying to do this.
Jeff Zimniewicz
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!