ewma calculation

Post on 21-Feb-2015

756 Views

Category:

Documents

1 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Nicholas  Bucheleres  October  31,  2010    Exponentially  Weighted  Moving  Average  Calculation      Step  1:  Determine  Time/Price  Series    Step  2:  Calculate  Periodic  Returns      

xi = ln Ri

Ri−1

⎝ ⎜

⎠ ⎟  

Natural  Log  of  (today’s  returns  over  yesterday’s  returns).      Step  3:  Average  Squared  Returns  

 

σ2 =1m

xn−12

i=1

m

∑    

The  average  of  the  summation  of  squared  returns  over  period  ‘m’  returns  the  simple  (non-­weighted)  moving  average.    Now  we  have  the  average  of  the  squared  returns  (simple  moving  average).    In  order  to  exponentially  weight  this  average,  we  are  going  to  assign  a  decreasingly  weighted  “tail”  to  our  price  series.    We  are  going  to  use  the  lambda  coefficient  to  apply  a  proportionally  weighted  significance  to  (n-­‐1)  trailing  time  periods.    The  most  recent  periodic  return  receives  a  weight  of  (1-­‐  

λ),  which  means  that  today’s  squared  return  receives  a  weight  of    (1-­‐x%)  of  the  series.  Industry  convention  dictates  that  

λ=94%,  so  today  receives  a  6%  weighting,  yesterday  receives  a  weighting  of  (6%)*(  

λ=94%),  so  5.6%,  and  so  on.    Each  period  receives  94%  of  the  weighting  that  one  more  recent  does.          This  process  can  be  reduced  into  one  streamlined  formula:    

n2

σ = λ n−12

σ + (1− λ) n−12x  

 The  weighted  squared  returns  of  period  ‘n=today’  equals  (yesterday’s  variance  times  the  lambda  coefficient)  plus  (1  minus  lambda)  times  yesterday’s  squared  return.        Note:  

λ  +  (1-­‐  

λ)  =  1  

top related