Hey guys !
I'm trying to migrate one of algorithms from q1 to q2 but I'm a bit puzzled as to how I need to migrate the following code:
def ordering_logic(context, data):
record(leverage=context.account.leverage*100)
if 'Close' in data['VIX'] and 'Close' in data['VXV']:
vix = data['VIX']['Close']
#vxst = data['VXST']['Close']
vxv = data['VXV']['Close']
#slope = (vix/vxst)
The data[sid(N)] format should turn into data.current ?
I've been fiddling with it for quite some time now and I can't seem to find out what I'm doing wrong. I don't have a lot of experience with programming and I'm more into math so please don't kill me :)