It appears that the formula was chosen to equate the statistical properties (variances in this case) of the N-day exponential moving average (EMA) and the N-day simple moving average (SMA).Originally posted by rrisch
Can anyone explain why a 10% EMA is associated with 19 days? I am wondering where the familiar formula,
Percentage = 2/(N + 1), comes from.![]()
If we assume that the prices are independently and identically distributed with variance V, then the variance of SMA is V/N.
So we are looking for the value of K such that the variance of EMA is equal to V/N.
From the formula for EMA, we have:
Var[EMA(t)] = K^2*Var[P(t)] + (1-K)^2*Var[EMA(t-1)]
<=> V/N = K^2*V + (1-K)^2*(V/N)
<=> 1 = N*K^2 + (1-K)^2
which can be easily solved to get K=2/(N+1)
Footnote
The following properties of Var are used:
Var(aX+b) = a^2*Var(X)
For independent random variables, X and Y,
Var(X+Y) = Var(X) + Var(Y)
Bingo tom_p, you made my weekend.