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.