Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Need help for creating a factor to access the previous day's exponential moving average

Trying to create a factor that outputs yesterday's exponential moving average. I know how to do this for simple moving average, but can't seem to get it for EXPMA. Any help is much appreciated.

Cory

1 response

using this

class Factor_N_Days_Ago(CustomFactor):
def compute(self, today, assets, out, input_factor):
out[:] = input_factor[0]

I get the following error ValueError: ExponentialWeightedMovingAverage does not have multiple outputs.