Download as xls, pdf, or txt
Download as xls, pdf, or txt
You are on page 1of 4

"How to calculate the exponentially weighted moving average (EWMA)"

Simple %
S  Si 1 Continuously
 S 
Return
ui  i Compounded
Return
u i  ln  i 
Si 1  Si 1 
Population variance
1 m  n2  varian ce rate p er d ay
 2
n 
m
 (u
i 1
n i  u) 2
m
u
 m ost recen t m observat ion s
 th e m ean / average of all d aily ret u rn s (u i )

Sample variance
Simple variance:
1 m
n 
2
 (u n i  u )2 1 m
m  1 i 1  2
n
m
u i 1
2
n i

1. Assume average daily return is 0


2. Replace m-1 with m
(EWMA)"

ion s
d aily retu rn s (u i )
Google (GOOG) - Daily Stock Prices
Adj. Period
Price Return Return^2 Equal aReturn^2
Date Close Weight

25-Aug-06 $373.26 -0.126% 0.00016% 0.196% 0.000000%


24-Aug-06 373.73 0.080% 0.00006% 0.196% 0.000000%
23-Aug-06 373.43 -1.293% 0.01672% 0.196% 0.000033%
22-Aug-06 378.29 0.262% 0.00069% 0.196% 0.000001%
21-Aug-06 377.3 -1.593% 0.02539% 0.196% 0.000050%
2 Years (500+ days) collapsed (Data>Group) below… 0.000000%
20-Aug-04 108.31 7.643% 0.58420% 0.196% 0.001148%
19-Aug-04 100.34 100%

 S  Variance 0.058%
u i  ln  i 
 Si 1 

or 0.058%
m
1
 2
n 
m
 n i
u 2

i 1

You might also like