Hi everyone,
I am trying to call on yesterday's S&P 500 by using data.history in my initialize function.
However, it seems that the data. does not work in initialize.
def initialize(context):
context.spy=sid(8554)
data.history(context.spy,'price',2,'1d')
When I run the code above I get an error saying
- Undefined name 'data'
Is anyone else having this issue?
Thank you for your help in advance.