AAPL
<class 'pandas.core.frame.DataFrame'> DatetimeIndex: 253 entries, 1990-01-02 00:00:00+00:00 to 1990-12-31 00:00:00+00:00 Data columns: AAPL 253 non-null values dtypes: float64(1)
Yes, see load_bars_from_yahoo() which returns OHLC which you can pass into the .run() method as well. data['price'] will then be closing but there's also gonna be 'open' etc.
Thomas
--
You received this message because you are subscribed to the Google Groups "Zipline Python Opensource Backtester" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zipline+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
df.rename(columns={'adjclose': 'price'}, inplace=True)
df.drop('mycode', axis=1, inplace=True)
df['Date'] = pd.to_datetime(df['Date'])
df= df.set_index('Date')
df.index = df.index.tz_localize(pytz.UTC) #Quantopian/zipline's dates include the timezone data. I need to look into this more, but UTC is the default. This may need to be changed to be suitable for the correct jurisdiction.
#Get dataframe into correct order
df = df[['open', 'high', 'low', 'close', 'volume','price']]
#create panel
dataDict = OrderedDict()
dataDict['AAPL'] = df
data = pd.Panel(dataDict)
#set minor axis (major is already set with date index)
data.minor_axis = ['open', 'high', 'low',
'close', 'price', 'volume']