Module 3 of 14 · Foundations
Estimating volatility — the input to everything
The sizing formula needs σ, and σ is not a number you can look up. You must estimate it from past returns, and the estimate you choose determines how quickly your positions shrink when markets get rough and how quickly they grow back afterwards.
The standard tool is an exponentially weighted moving average (EWMA) of squared returns. Every day the new squared return gets weight α = 2 ÷ (span + 1) and everything older decays. A short span reacts within days but jumps around; a long span is smooth but lags behind real changes. Volatility clusters — turbulent days follow turbulent days — which is why a span of around a month or so tends to predict the near future well.
A second refinement: volatility also mean-reverts over years. After a long calm spell the next shock is coming, even if the recent past says otherwise. Blending a fraction of a very long-run average (say ten years) into the estimate stops positions from ballooning just because the market has been unusually quiet.
Work in percentage returns of the contract you actually hold. For the price used in trend signals you will use a back-adjusted continuous series (Module 8), but for risk you care about how much the real contract moves.
🎛 Volatility estimator lab
Your estimate
25.3%
avg error vs next month
Same span, no blend
26.6%
Very fast (8d)
30.1%
Very slow (128d)
31.7%
The grey line is the volatility the synthetic market actually used each day — something you never get to see in real life. The amber line is your estimate, built only from past returns. Scores are the average error of each estimate against the realised volatility of the following 21 trading days, so lower is better. Chart shows the last four years of a 14-year synthetic history.
Prediction, not description
A volatility estimate is only useful as a forecast of the risk you are about to take, so score it against the nextmonth. Very short spans track yesterday's noise and score badly; very long spans miss genuine regime changes. The sweet spot sits in between, and a modest long-run blend usually improves it a little more while making positions noticeably steadier.
Steadier matters: every change in your volatility estimate changes your position, and every position change costs money. A good estimator is one that is accurate and calm.
Things to try
- • Set the span to 4 and watch the amber line chase every wiggle — then compare its score with the 32-day default.
- • With span 32, raise the long-run weight from 0% to 30%: the error improves a little, and the troughs in the estimate become shallower — which prevents over-sizing after calm stretches.
- • Go to a span of 160 and find a volatility spike in the chart. Count how many weeks the estimate takes to catch up; your positions would have been too large for that whole time.
Original interactive lesson. Labs run on a seeded synthetic market in your browser, built to illustrate mechanics, not to predict any real market. Contract figures are illustrative; check exchange specifications. Educational analysis, not investment advice.