I need to confirm a few things related to the exponential weighted moving average function for pandas.
If I have a df dataset for which I need to find a 12-day exponential moving average, will there be a correct method below.
exp_12=df.ewm(span=20,min_period=12,adjust=False).mean()
Given that the data set contains 20 readings, the range (Total number of values) should be 20.
Since I need to find a moving average of 12 days, therefore, min_period = 12. I interpret the interval as the total number of values in the data set or the total covered time.
Can anyone confirm the correctness of my interpretation? I can not understand the meaning of the adjustment.
I have attached a link to the pandas.df.ewm documentation below.
http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.ewm.html
user7616021
source
share