Exponential Moving Average

From Wiki
Jump to navigation Jump to search

Given a sequence of numbers <math>x_1, x_2, ..., x_N</math> we estimate the n-day exponential moving average for <math>x_N</math> to be

<math>\mbox{EMA}(n, N) = \frac{2}{n+1}\sum_{k=0}^{n-1}(\frac{n-1}{n+1})^k x_{N-k-1} +(\frac{n-1}{n+1})^n \frac{1}{n} \sum_{k=0}^{n-1} x_{N-k-1}</math>

(Note that we don't include <math>x_N</math> in the average).