EWMA and practical volatility — from forecast to position size
▸ Pretest — guess, even if you don't know
You compute vol as a 20-day rolling standard deviation. Twenty-one trading days after a single crash day, your vol estimate suddenly drops by a third — on a completely uneventful day. What happened?
EWMA: GARCH's pragmatic little sibling
Take GARCH(1,1) from D1-07 and make two brutal simplifications. Drop the floor: set ("omega equals zero"). Force persistence to exactly one: . Only one free parameter survives; rename it — the Greek letter lambda, playing the old role. What's left is the EWMA — exponentially weighted moving average — of squared returns:
In words: today's variance equals lambda times yesterday's variance, plus (1 minus lambda) times yesterday's squared return. Lambda is a memory dial between 0 and 1: the closer to 1, the more yesterday's estimate dominates and the less one new day can move it. Concrete numbers: with , yesterday's variance 0.0004, and a −1% day yesterday (squared: 0.0001), today's variance is .
One parameter instead of three, and no fitting: J.P. Morgan's RiskMetrics standardized for daily data in 1996, and much of the industry still runs it. Unrolling the recursion shows where the name comes from. Today's variance is a weighted sum of all past squared returns, where the return days ago gets weight — read "(one minus lambda) times lambda to the power k" — so the weights shrink geometrically with age. Yesterday matters most; last month whispers; last year is gone.
What you give up versus full GARCH: because , the long-run variance formula divides by zero. There is no unconditional (long-run) variance — that's the answer to D1-07's closing prediction — and hence no mean reversion. EWMA's forecast for every future horizon is simply today's estimate, whereas GARCH glides back to the long-run anchor. For 1-to-5-day risk that difference barely matters. For pricing a 1-year option it matters a lot. For a trading desk sizing tomorrow's positions, EWMA's robustness usually wins: no three-parameter fit to go wrong, no unstable .
Effective lookback: about 17 days
A geometric decay has no hard cutoff — old days never get exactly zero weight. But its center of mass sits at roughly
In words: the effective lookback is about one divided by (one minus lambda). At the RiskMetrics , that's 1 divided by 0.06 — about 17 days.
So RiskMetrics EWMA behaves like "a ~17-day window, but blurry at the edges." Raise to 0.97 and you get a smoother, slower ~33-day memory; drop to 0.90 for a twitchy ~10-day one. One dial trades responsiveness against noise. It's the same tension as choosing a rolling window length — minus the cliff you're about to see.
Rolling window vs EWMA: the step response
Think like an engineer and feed both estimators a single impulse — one crash day in an otherwise calm series — then watch each estimate respond:
- 20-day rolling std: vol jumps when the crash enters the window. It then stays flat at the elevated level for 20 days, because the crash carries equal weight whether it happened yesterday or three weeks ago. Then it cliff-drops on day 21, when the crash falls out of the window. That second move is the echo — pure artifact. Your risk estimate, and therefore your position size, lurches on a day when nothing happened.
- EWMA: vol jumps immediately — a fresh observation carries weight , the largest weight any single day ever gets, so EWMA actually reacts faster. Then it decays smoothly, shrinking by a factor each day. No anniversary, no echo, no phantom resize.
Faster reaction and graceful forgetting, for one parameter — that's why EWMA is the practical default. One upgrade is worth knowing about: realized volatility — a day's variance estimated from higher-frequency returns within that day (for example, 5-minute bars). It measures each single day far more precisely and is the modern research standard. We only wave at it here, since daily bars are what free data gives you.
From forecast to position: vol targeting
Here is the whole practical recipe that D1-07 promised. Pick a target volatility for the strategy, then scale the position by
In words: the position weight "w sub t" — your size, as a multiple of one normal unit — is the smaller of two numbers (that's what "min" picks): the target vol divided by the current vol forecast, or a hard cap "w max." The hat on ("sigma-hat sub t") marks it as an estimate — your EWMA forecast, not the unknowable true vol.
Worked example: target 10% annualized (a per-year vol figure), and the EWMA forecast says the asset currently runs 20% — the ratio is 10/20, so hold half a unit. Forecast drops to 5% — the raw ratio says 2×, and the cap decides whether you take it. The cap is not decoration. Vol forecasts are smallest exactly when markets are eerily calm — often right before they aren't. Volatility clusters, but regime breaks arrive unannounced (D1-10). An uncapped vol targeter maximizes leverage at the worst possible moment. Sized this way, dollar risk stays roughly constant across regimes. That stabilizes realized Sharpe and — critically — keeps one wild month from dominating a year's P&L.
Try it
Implement ewma_var(returns, lam, initial_var): array same length as returns with var[0] = initial_var and var[t] = lam*var[t-1] + (1-lam)*returns[t-1]**2. And vol_target_weight(target_vol, forecast_vol, cap): the position weight min(target_vol/forecast_vol, cap).
⧉ Review cardWrite the EWMA variance recursion and its relation to GARCH(1,1).
⧉ Review cardWhat is the effective lookback of EWMA with lam = 0.94?
⧉ Review cardWhat is the echo problem with rolling-window vol, and how does EWMA avoid it?
⧉ Review cardState the vol-targeting position rule and the worked example.
Draw it
On paper, sketch the step response: x-axis is days, one crash on day 0 in an otherwise flat series. Draw two curves of estimated vol — a 20-day rolling std and an EWMA — through day 30. Mark three features: which jumps higher on day 1, the rolling estimate's cliff at day 20, and the EWMA's smooth decay. Label the echo.
Predict before the next lesson
Next is D1-09: cointegration and pairs trading — where we finally hunt mean reversion not in one series but in the gap between two. Predict: two stocks have daily return correlation 0.9. Does that guarantee the ratio of their prices stays bounded over ten years? Sketch why or why not before reading.
◈ Calibration check
Could you implement EWMA vol from memory, explain the echo to a teammate with a sketch, and size a position given a target vol, a forecast, and a cap?
1 = guessing · 5 = could teach it
⏻ End of lesson
Mark it read to book its 4 review cards into your deck.
Sources & further reading
- paperJ.P. Morgan/Reuters (1996), RiskMetrics — Technical Document, 4e
- bookCarver (2015), Systematic Trading — §9, 10
- bookTsay (2010), Analysis of Financial Time Series, 3e — §3