Hi there,
I've been struggling with learning how to use the fetcher for a CSV file in google docs. I've tried it using the data on Quandl and Google Sheets, but I seem to get the same error for both:
KeyError: 'date' There was a runtime error on line 9.
Here's the code that I am using.
def preview(df):
log.info(df.head())
return df
def initialize(context):
context.investment_size = (context.portfolio.cash / 10.0)
context.stop_loss_pct = 0.995
set_symbol_lookup_date('2015-10-01')
fetch_csv('https://www.quandl.com/api/v3/datasets/WIKI/IOSP.csv', pre_func = preview)
context.stocks = symbols('AAPL')
It seems to work using the tutorial that Quantopian recommended here, but once I replace it with Quandl or Google Sheets, it gives me the error. With Google Sheets, I use 'https://docs.google.com/spreadsheets/d/1vF5_kf0oU9tONtcPt_YOHTZOW3pIQYCugYmY0bXRQIM/edit?usp=sharing' as the URL.
Thanks in advance!