I'm trying to use fetch_csv to import data into my algo which is not really time series data. However I did add the columns needed (I thought) to pretend that it could be.
The file is on a google-drive but this is all it is...
date,symbol,structure,w1,w2,w3,w4,w5,w6,w7,w8,w9,w10,w11,w12,w13,w14,w15,w16,w17,w18,w19,w20,w21,w22,w23,w24,w25,w26,w27,w28,w29,w30,w31,w32,w33,w34,w35,w36,w37
2014-1-27,network,[[100100010][100101100][111111000]][[[1111][0011][1001][0100][1110]][[1][1][1]][[-]],3.96489983052,0.256267928294,2.58264955512,-3.02993251828,-0.612409291844,2.86787389432,-1.89348562646,-3.13479725416,-1.01000592679,0.977270740461,-0.872816523585,0.663956467671,2.92114547775,1.50545732285,-2.44931115262,0.760518144019,-2.51452218298,-0.744949743825,-1.55683875615,-0.648191368613,0.0172223126075,-0.779474079962,1.4852870671,-0.837721859841,1.81820255163,1.97897433171,0.831748710153,0.0882299791464,-0.103895015628,0.331294397245,1.08311485906,0.137883248438,0.517014392756,-0.27755271172,1.9031025167,-0.985003230088,-1.8757665386
When I try to build the algo I get an error: "KeyError: u'no item named date'"
what have I done wrong?
Here is the code I'm using to test to make sure I can import the data...
def initialize(context):
context.STOCKS = [sid(8551)]
fetch_csv('https://drive.google.com/uc?id=0B7H0VnE16WlORWhLcEtPdDkwb1k',symbol='network',date_column= 'date',date_format = '%y-%m-%d')
pass
def handle_data(context, data):
pass