1
$\begingroup$

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?

$\endgroup$
  • 1
    $\begingroup$ Do you mean $\frac{1}{\sum_{k=0}^N \alpha^{k} }\sum_{k=0}^N \alpha^{k} P_k$? $\endgroup$ – Gordon Nov 10 '15 at 16:32
  • 1
    $\begingroup$ A key property of a moving average is that if all observations are equal to P (a constant) the moving average should also be equal to P. See Gordon's remark. $\endgroup$ – noob2 Nov 10 '15 at 17:26
1
$\begingroup$

The smoothing factor is a way to specify the memory of your estimator. This view provides a simple and natural way to tune $a$. Say you want the $k$th term in the past to weight for 1% in your estimation. It gives you $$\frac{\alpha^k}{ A} = \frac{1}{100},$$ with $A$ your normalizing factor (see @Gordon's remark).

Of course you can do better than that. For instance if you assume a model on $P(t)$ dynamics, plug it into the moving average and try to control the variance of the sliding estimator.

$\endgroup$
0
$\begingroup$

In the proprietary/branded Risk Metrics implementation of EWMA, I believe a smoothing factor of .97 is used. Here is a paper that discusses different smoothing factors for EWMA

http://www.tandfonline.com/doi/abs/10.1080/00036846.2014.982853?journalCode=raec20

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.