Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Questions regarding runtime error and history data

I tried to test trend following strategy for futures, however I got a error like this. It seems like some historical data cannot be called after around late of 2016. However it's not true for every futures I am using. All of them are still actively traded on exchange based on the introduction page.

There was a runtime error.
TypeError:an integer is required
Line: 108 inrebalance
history = data.history(context.futures,'price', 117, '1d')

Could anyone help me with this problem?

1 response

One more question! If I start my test from early 2003, I always get runtime error due to forward looking chain of some certain futures. I checked it how many chains are recorded from the testing day, some of them seem available over next periods, even though I get runtime error. Could anyone help me with this??