Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Why am I getting an error on line 13

import numpy as np
import pandas as pd
def initialize(context):
context.acrx = sid(40827)
context.selling = False
context.holding = False

def trade(context, data):
curr_price = data.current(context.acrx, 'price')
prices = data.history(acrx, 'close', 2, '1d')
prev_day_close = prices.iloc[-1:]
curr_price = data.current(acrx,'price')
2dMA = np.std(prices[context.acrx]) HERE
zscore =1

The IDE keeps telling me its invalid syntax but it works for other examples and I tried making a new algorithm and trying the same code

1 response

Thanks! I'm new so I'm not familiar with community norms, good info for next time