I have a function (basically taken from help section) that works but somehow crashes my backtests (even when I'm not using it). I'm providing the code.
If you comment out the lines:
price_history = history(bar_count=2, frequency='1d', field='price', ffill=True)
prev_bar = price_history[st][-2]
curr_bar = price_history[st][-1]
The code will run.
It is interesting to note that the same thing happens when I'm trying to use .returns()
Deleting the records for the day of the crash makes it run:
TAS,-1,4/15/2014,4/15/2014,16,46
EDS,-1,4/15/2014,4/15/2014,17,0
But will only make it crash later on. What tickers make it crash and why?
Thankful for any suggestions!