why does the following code throw an
def initialize(context):
context.sidid = 24
context.stock = sid(24)
Will be called on every trade event for the securities you specify.
def handle_data(context, data):
log.debug('-----------------------')
for stock in data.keys():
log.debug(stock)
def before_trading_start(context):
context.sidid = context.sidid + 1
log.debug(context.sidid)
sec = sid(context.sidid) <-- throws exception "The sid(id) method takes one parameter"
update_universe(sec)