I have a simple tail hedge strategy. 99% of portfolio in SPY and 1% in a put hedge. It rebalances every month. Backtesting from 1/1/2008 to 6/30/2020.

Everything seems to run fine, until 5/2/2011 when it stops backtesting and the error log shows :"Runtime Error: In Scheduled Event 'SPY: MonthStart: SPY: 90 min after MarketOpen', ArgumentNullException : Value cannot be null."

On 5/2/2011, it looks like the orders are still filled, but I see a tag on the buy of the put hedge that states "Warning: fill at stale price". I'm not sure if this is related to the runtime error, but I'm guessing so.

I can't figure out how to fix this issue, or what's really causing it. Any help would be much appreciated! I will post the code below.

Author