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