Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
KeyError in Futures Calendar

Hi,

I've ran a few backtests and came up with the following error on July 31st/August 1st 2016:

There was a runtime error.
KeyError:1074201706
Line: 189 inbefore_trading_starts
hist = data.history(context.my_futures, 'price', context.slow_ma_days, '1d')

Seems there is some missing data for the future corresponding to that Key. The backtest runs fine from Jan 1 2006 up until that date.

Anyone know how I can skip to next future if the line produces an error? The results wouldn't be perfect but at least it would complete.

1 response

Hi support, no response on this? Kind of annoying to have the backtest run 10 years of data on a 15 assets and have it crap out 18 months before the end...

If this is not a data issue, please advise, but really seems like a data quality issue.