Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Zipline problems with data.history
API

Hi,

I'm trying to use the new data.history() method in Zipline, but it doesn't seem to work.

In fact, when I try to run one of the examples I get the following error:

  File "./dual_moving_average.py", line 43, in handle_data  
    short_mavg = data.history(context.sym, 'price', 100, '1d').mean()  
AttributeError: 'BarData' object has no attribute 'history'  

I've checked that I am running version 0.9.0 of zipline (with python -c "import zipline; print(zipline.__version__)" )

Can anyone help me solve this error?

Thanks!
Iñaki

2 responses

I think there's a google group for zipline.

Did you ever figure out your issue?

I'm seeing the same error. I'm running in a notebook on quantopian though.

PS found your post on the google group: https://groups.google.com/forum/#!topic/zipline/xFvhLdEIIf8 but since I'm on quantopian, I don't think I can update my version