I think I found my own answer. The problem with the CSV above is the lack of a symbol identifier. In my case, SPY is really only a placeholder. The signals that follow it have no relation, though the script fails without it.
New CSV:
Date,symbol,a,b,c,d
11/09/2016,SPY,0,2,0,1
Working script:
def initialize(context):
schedule_function(my_rebalance,
date_rules.every_day(),
time_rules.market_open(minutes=10))
fetch_csv('https://linktodropbox.csv',
date_column = 'Date',
date_format = '%d/%m/%Y',
symbol='SPY')
context.stock = symbol('SPY')
def my_rebalance(context, data):
a = data['SPY']['a']
b = data['SPY']['b']
c = data['SPY']['c']
d = data['SPY']['d']
Is there better code for getting the signals out of the CSV instead "data[symbol][signal]"?