0% found this document useful (0 votes)
128 views4 pages

Calculate Exponentially Weighted Moving Average

The document describes how to calculate the exponentially weighted moving average (EWMA). It defines the EWMA formula which weights recent observations higher than older observations. It also provides the formulas for calculating population variance, sample variance, and equal weighted variance using daily stock price returns and adjusting the sample variance formula to replace m-1 with m.

Uploaded by

Thiên Hàn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLS, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
128 views4 pages

Calculate Exponentially Weighted Moving Average

The document describes how to calculate the exponentially weighted moving average (EWMA). It defines the EWMA formula which weights recent observations higher than older observations. It also provides the formulas for calculating population variance, sample variance, and equal weighted variance using daily stock price returns and adjusting the sample variance formula to replace m-1 with m.

Uploaded by

Thiên Hàn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLS, PDF, TXT or read online on Scribd

"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