In the interest of being more specific, here's the error I get:
KeyError: Equity(8941, symbol=u'CWEI', asset_name=u'CLAYTON WILLIAMS ENERGY INC', exchange=u'NEW YORK STOCK EXCHANGE', start_date=Timestamp('1993-05-20 00:00:00+0000', tz='UTC'), end_date=Timestamp('2016-03-04 00:00:00+0000', tz='UTC'), first_traded=None, auto_close_date=Timestamp('2016-03-09 00:00:00+0000', tz='UTC'))
There was a runtime error on line 629.
There are two things that trip me up here:
- Line 629 is a function call, so the actual error is elsewhere in my code.
- As far as I can tell I am only accessing the symbol property on stocks. Is there any reason why I would not be able to access the symbol here? This error happens a long way into my backtest, so it is unlikely that this is a line of code that is otherwise not being executed.
Thanks,
Sunil