# Exponential Moving Average smoothing factor

I learn best my reading about a concept and then trying to implement it using math and a programming language.

Right now, I'm trying to implement an Exponential Moving Average indicator, but I'm sort of stuck on the smoothing factor. What I've come up with:

$$\frac{1}{N}\sum\limits_{k=0}^N \alpha^{k} P_k$$ Where N is the window of days in consideration, k loops through the days, $\alpha$ is a smoothing factor and P is the price.

What should I use for a smoothing factor? Is there any general guidelines? And am I even near the final product?

• I think there are choices you have here: Polynomially distributed lags (Almon Lags etc)..Perhaps you could use Non Linear Least Squares and then choose different windows. (Constrain the coefficients to be equal). To choose between windows, you could try different information criteria (AIC, BIC, SIC) Nov 10 '15 at 16:10