Hi,
I'm using the zipline package on python, and for some reason when I run the code below, I get the error "Cannot compare tz-naive and tz-aware timestamps". I was wondering whether anybody could help me?
from zipline.api import order, record, symbol
from zipline import run_algorithm
from datetime import datetime
def initialize(context):
pass
def handle_data(context, data):
order(symbol('AAPL'), 10)
record(AAPL=data.current(symbol('AAPL'), 'price'))
res = run_algorithm(start=datetime(2015, 1, 1, 0, 0, 0),
end=datetime(2016,1,1, 0, 0, 0),
initialize=initialize,
capital_base=10000.0,
data_frequency='daily')
Thanks,
Jack