EWMA model

hsmirror

New Member
Hi, I have a question about the EWMA model equation. How comes we are using the previous day's return? I thought we are using today's return as \[ r_n=\ln(s_n/s_{n-1}) \].
 

David Harper CFA FRM

David Harper CFA FRM
Subscriber
Hi @hsmirror I don't have the context but EWMA is a summation of the series of (weighted) squared-returns: σ^2(EWMA) = α(1)*r^2(t-1) + α(2)*r^2(t-2) + ... + α(n)*r^2(t-n) where the weights, α(i), happen to decline exponentially. The weight applied to yesterday's (t-1) squared-return, r^2, is (1-λ); the weight applied to the previous day's (t-2) squared-return is (1-λ)*λ, etc ... so each successive (going back in time) weight is lambda (λ) multiplied by the nearer day's weight. The weights apply to the history of returns (that are squared) in order to retrieve an updated variance/volatility estimate. When we say yesterday's return is assigned the (highest) weight of (1-λ), where typical is (1-0.94) = 6.0%, we really just refer to the most recent return. Some author's will call that today's return in service of estimating tomorrow's EWMA volatility; others may say the most recent return in service of estimating the current volatility. It's actually semantic because volatility is unobservable, it exists as a statistical model that requires a series of returns an as input; the current (aka, updated) EMWA is whatever uses the most recent series. I have a video on EMWA here at https://forum.bionicturtle.com/thre...nentially-weighted-moving-average-ewma.22356/

P.S. As some might notice, you are showing a continuously compounded return (aka, geometric or log) but into EWMA we can also approximate with the simple return r(n) = S(n)/S(n-1) - 1; aka, arithmetic. I hope that's helpful,
 

hsmirror

New Member
Hi David, thanks for the reply. I think my confusion comes from the notation. I have watched your video for EWMA. Please correct me if my understanding is wrong.

In the video, when talking about returns, the day is forward counting as Day i-1 is the day previous to Day i. When calculating EWMA as shown in the table, the day is backward counting as Day 0 is today and Day n is the last day. And for the volatility for today (\[ \sigma_n \]), the return between day 0 and day 1 is used although it is denoted as \[ r_{n-1} \]. I thought \[ r_{n-1} \] meant the return between day 1 and day 2 before.
 

David Harper CFA FRM

David Harper CFA FRM
Subscriber
Hi @hsmirror They both should count in the same direction where "+" is forward in time and "-" is backward in time: if S(i) is today then yesterday is S(i-1) and if σ^2(n) is today's (aka, updated) variance estimate then σ^2(n-1) is yesterday's (aka, most recent) variance, and we can refer to an estimate of the expected E[σ^2(n+t)] in +t days.

Today is Friday, say the closing prices for the week were (Mon = $10.00, 14, 16, 18, Fri = $20.00). Five prices gives us four returns, in sequence: ln(14/10) = 33.65%, ln(16/14) = 13.35%, ln(18/16) = 11.78%, and most recently ln(20/18) = 10.54%. Each return is ln[S(i)/(i-1)] or ln[S(n)/(n-1)] or ln(price_day/price_previous_day), or even ln[S(i+1)/(i)] because (i) is just an index.

That's a vector of returns ordered in time: (33.65%, 13.35%, 11.78%, 10.54%) where 10.54 is the most recent return. EWMA updates the most recent variance (i.e., computed at the end of yesterday after yesterday's price close); semantically, that might updating yesterday's (end of day) variance or today's (beginning of day) variance to today's (end of day) variance or even tomorrow's (beginning of day) variance. Maybe yesterday's variance was σ^2(n-1) = 15.55% such that the updated variance estimate is given by σ^2(n) = λ*σ^2(n-1) + (1-λ)*r^2(n-1) = λ*15.55% + (1-λ)*10.54%^2.

I think I'm following Hull:
"Define σ(n) as the volatility of a market variable on day n, as estimated at the end of day n-1. The square of the volatility, σ^2(n), on day n is the variance rate. We described the standard approach to estimating σ(n) from historical data in Section 15.4. Suppose that the value of the market variable at the end of day i is S(i). The variable u(i) is defined as the continuously compounded return during day i (between the end of day i-1 and the end of day i): u(i) = ln[S(i)/S(i-1)]" -- Hull, John C.. Options, Futures, and Other Derivatives (p. 520). Pearson Education. Kindle Edition.

... if it helps, but I think the reason I don't get bogged down in this notional aspect is that I actually have to calculate it often. When you perform the calculation (given a price vector as input), you'll see that it's just a series (vector) of prices that determine the returns and EWMA is updating those returns. Prices are points in time, the returns are immediately after each price but really describe a function during the day (between two points in time), and the volatility is "just a statistic" (itself unobservable) that summarizes a vector of returns, EWMA being one of an infinite variety. Hope that helps. If you click thru to the actual YouTube comments, you'll see that I do have a mistake in the XLS, but I think it's different than your point (although it wouldn't help clarify your point either). I hope that's helpful,
 
Last edited:
Top