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 () and force persistence to exactly one (, writing ). What's left is the exponentially weighted moving average of squared returns:
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 the name — today's variance is a weighted sum of all past squared returns with weights decaying geometrically. Yesterday matters most; last month whispers; last year is gone.
What you give up versus full GARCH: because , there is no unconditional variance ( divides by zero — the answer to D1-07's closing prediction) and hence no mean reversion. EWMA's forecast for every future horizon is just 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 — no three-parameter fit to go wrong, no unstable — usually wins.
Effective lookback: about 17 days
A geometric decay has no hard cutoff, but its center of mass sits at roughly
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 — the same tension as choosing a rolling window length, minus the cliff.
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:
- 20-day rolling std: vol jumps when the crash enters, stays flat at the elevated level for 20 days (the crash has equal weight whether it was yesterday or three weeks ago), then cliff-drops on day 21 when the crash exits. That second move — the echo — is pure artifact: your risk estimate, and thus position size, lurches on a day when nothing happened.
- EWMA: vol jumps immediately (a fresh observation carries weight , the largest of any single day — EWMA reacts faster), then decays smoothly by a factor per day. No anniversary, no echo, no phantom resize.
Faster reaction and graceful forgetting for one parameter is why EWMA is the practical default. One upgrade worth knowing exists: realized volatility built from higher-frequency (e.g. 5-minute) returns estimates each single day's variance far more precisely and is the modern research standard — we only wave at it here, since daily bars are what you have from free data.
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
Worked example: target 10% annualized, EWMA forecast says the asset currently runs 20% — 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, which 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