Core Path · L2.5.01

Measuring volatility

12 minMarket riskStatistics

By the end you will be able to

  1. 1Estimate volatility from a series of returns with the sample standard deviation (dividing by n − 1).
  2. 2Scale a volatility to another horizon with the square root of time, and say when that rule fails.
  3. 3Explain how the choice of data window changes the estimate.
  4. 4Describe how an exponentially weighted estimate gives more weight to recent days.

Why it matters

Two analysts measure the volatility of the same equity index fund on the same day. One reports 14.1% a year, the other 24.0%. Neither has made a mistake. They just used different stretches of history.

Core explanation

From a list of returns to one number

You met volatility in L1.1.08: Returns and risk: a first look as the size of a typical swing, and in L1.5.06: Equity returns and volatility as the standard deviation of returns, scaled to a year. Every risk measure in this module starts from it. Here we estimate it properly from data, and look at the choices that change the answer.

Illustrative dataThe Module 2.5 data set

500 trading days of daily returns for an equity index fund, a bond fund and a bank share, generated for this module by a seeded model with a calm stretch, a turbulent spell and a few extreme days. It is not real market history. The same series runs through every lesson in the module, so the numbers line up. The fund we follow is worth $10 million: $6 million in the equity index fund and $4 million in the bond fund.

All returns are daily simple returns. Day 1 is the oldest, day 500 the most recent. The turbulent spell runs from about day 381 to day 440.

Estimating daily volatility in five steps

  1. Collect the daily returns for the period you want to use.
  2. Work out their average (the mean).
  3. For each day, take the gap between that day's return and the mean, and square it.
  4. Add up the squares and divide by n − 1, where n is the number of days. This is the variance.
  5. Take the square root. This is the daily volatility.

Why n − 1 and not n? The mean was worked out from the same returns, so the returns sit a little closer to it than to the true, unknown average. Dividing by n − 1 makes up for that. The result is the sample standard deviation, and it is the convention in this module whenever a standard deviation is estimated from data. With 10 days it makes the answer 5.4% larger than dividing by n; with 500 days, only 0.10%.

Over all 500 days, the equity index fund's daily volatility is 1.10% and the bond fund's is 0.32%.

Scaling with the square root of time

Volatility is usually quoted per year. If each day's return is independent of the others and has the same volatility, the variances of the days add up. Over h days the variance is h times the daily one, so the volatility is h\sqrt{h} times the daily one. We use 252 trading days a year:

  • Equity index fund: 1.10% × √252 = 17.4% a year, or 3.47% over 10 days.
  • Bond fund: 0.32% × √252 = 5.1% a year.

The square-root-of-time rule is the standard convention, but it rests on assumptions that real markets break:

  • Volatility clusters. Calm days follow calm days and stormy days follow stormy days (volatility clustering). Today's regime says more about the next 10 days than the long-run average does.
  • Returns are not independent. If moves tend to continue, they pile up and the long-run spread is wider than √h suggests. If they tend to reverse, it is narrower.
  • Positions change. Over a long horizon a portfolio is traded and hedged, so the thing whose volatility you scaled no longer exists.
  • Tails behave differently. The rule scales the standard deviation, not the shape of the extremes. That matters for value at risk (L2.5.06: Value at risk: the idea).

Quick checks

How much history? The window

The window is how many past days go into the estimate. Here is the equity index fund, measured on day 500 with five different windows:

WindowDaily volatilityAnnualised
Last 20 days0.885%14.1%
Last 60 days0.829%13.2%
Last 120 days1.512%24.0%
Last 250 days1.256%19.9%
Last 500 days1.099%17.4%

The 120-day window covers the turbulent spell from about day 381 to day 440, so it gives 24.0%. The 20- and 60-day windows see only the calm weeks since, and give 14.1% and 13.2%. That is the hook's puzzle. A short window reacts quickly to a change in conditions but jumps around; a long window is steady but slow, and can remember a storm long after it has passed.

A popular middle way gives every day a weight that fades with age. In the exponentially weighted moving average (EWMA), yesterday's squared return gets weight 1 − λ, the day before (1 − λ)λ, and so on. RiskMetrics used λ = 0.94 for daily data. On day 500 that gives the equity fund an annualised volatility of 12.8%: closer to the calm recent weeks, but still remembering the storm.

Your callWhich window would you use?

0 of 3
  1. A trading desk's daily risk limit must respond within days when markets turn stormy, so traders cut positions in time.
  2. A pension fund's board wants a stable picture of how risky its equity holdings are over the long run, without the figure jumping every month.
  3. Volatility has just spiked. Your 500-day estimate has barely moved; your 20-day estimate has doubled. Which is the true volatility?

The formal version

Write rtr_t for the return on day tt, nn for the number of days and rˉ\bar r for their mean, rˉ=1n∑t=1nrt\bar r = \frac{1}{n}\sum_{t=1}^{n} r_t. The sample variance is new notation, so let's build it one piece at a time.

The square-root-of-time rule, on a few lines. Over hh days the return is (approximately, for small daily moves) the sum of the daily returns. If the days are independent with the same variance σ2\sigma^2:

Var⁡(r1+r2+⋯+rh)=Var⁡(r1)+Var⁡(r2)+⋯+Var⁡(rh)=h σ2σh=h σsoσannual=252 σdaily\begin{aligned} \operatorname{Var}(r_1 + r_2 + \dots + r_h) &= \operatorname{Var}(r_1) + \operatorname{Var}(r_2) + \dots + \operatorname{Var}(r_h) \\ &= h\,\sigma^2 \\ \sigma_h &= \sqrt{h}\,\sigma \qquad \text{so} \qquad \sigma_{\text{annual}} = \sqrt{252}\,\sigma_{\text{daily}} \end{aligned}

The first line is where independence is used: without it, covariance terms between days appear (you will meet covariance in L2.5.03: Correlation and diversification). The sum of daily returns is exact for log returns and a close approximation for simple returns over a few days (L1.5.06: Equity returns and volatility).

Conventions in this module

Daily simple returns. Sample standard deviation, dividing by n − 1. Annualised with √252 (252 trading days a year). Volatilities quoted as decimals in formulas and as percentages in the text. The maths of variance is in M-C03: Variance and standard deviation; estimating it from data is in M-D01: Estimating mean and volatility.

Try it

Start with the equity index fund and a 60-day window. Slide the window up to 120 days and watch the estimate jump as the turbulent spell comes in. Then try 500, and switch to the bond fund. In the lower chart, notice how much a 20-day window swings compared with a 250-day one.

Try itVolatility estimator

Real risk factor histories →

Series (illustrative data)

Scale to a horizon of

Annualised volatility, last 60 days
13.2%
Daily (sample SD)0.829%
Over 10 days (× √10)2.62%
All 500 days, annualised17.4%
Daily returns, days 1 to 500The shaded band is the window the estimate uses.
−6%−3%0%3%6%1100200300400500
Rolling 60-day volatility, annualisedEach point uses the 60 days up to that day. Dashed: all 500 days.
0%10%20%30%40%1100200300400500

Worked example

Ten days of the equity index fund

Estimate the equity index fund's volatility from its last 10 days (days 491 to 500), then compare with the full 500 days. Returns are shown in per cent, so the squared deviations are in per cent squared. Try each step before revealing it.

Sample standard deviation from 10 returns

Step 1 of 6
  1. 1

    The mean

    The 10 returns add up to −1.0139%, so the mean is rˉ=−1.0139%÷10=−0.1014%\bar r = -1.0139\% \div 10 = -0.1014\%.

Regulatory lens

Supervisors care about the data window because a model fed only calm data underestimates risk. When the Basel Committee first allowed banks to use their own value-at-risk models for market risk capital, in the 1996 Market Risk Amendment, it required at least one year of historical data, updated at least every three months. After the 2008 crisis, the 2009 revisions (known as Basel 2.5) added a stressed VaR, calibrated to a 12-month period of significant market stress, so that capital could not fall just because markets had been quiet. The detail is in M4.3: Market risk capital (FRTB) and CVA, part of Level 4: Regulation, Capital & Accounting.

Sparks

SparkLarge changes follow large changes
In 1963 the mathematician Benoit Mandelbrot, studying cotton prices, noted that “large changes tend to be followed by large changes, of either sign, and small changes tend to be followed by small changes”. Volatility clustering, as it came to be called, is one of the most reliable patterns in financial data, and the main reason the square-root-of-time rule needs care.
Sparkλ = 0.94
In 1994 J.P. Morgan published RiskMetrics, a free methodology and data set for measuring market risk. Its daily volatility estimates used an exponentially weighted average with a decay factor of 0.94, so yesterday's squared return carries 6% of the weight. The choice became an industry habit, and many systems still offer 0.94 as the default.

Key takeaways

  • Daily volatility is estimated by the sample standard deviation of daily returns: square the deviations from the mean, add them, divide by n − 1 and take the square root.
  • Annualise with the square root of time: σ_annual = σ_daily × √252. Over h days, multiply by √h, never by h.
  • The square-root rule assumes independent days with constant volatility. Volatility clustering, trends, mean reversion and changing positions all break it.
  • The window matters: short windows react fast but are noisy; long windows are steady but slow. Always state the window.
  • EWMA weights recent days more heavily, a middle way between the two.

Reaction

Check what stuck

Question 1 · objective 1

Four daily returns: +1%, −2%, +3% and 0%. What is their sample standard deviation (dividing by n − 1), in per cent, to two decimal places?

%

Question 2 · objective 2

A share's daily volatility is 1.2%. Using 252 trading days, what is its annualised volatility, in per cent?

%

Question 3 · objective 2

A bond fund's daily volatility is 1.5%. Assuming independent days, what is its 10-day volatility, in per cent?

%

Question 4 · objective 3

Markets turned stormy three weeks ago. Which estimate of daily volatility has probably risen the most since then?

Question 5 · objective 2

In which case is the square-root-of-time rule most likely to understate the volatility over a month?

Glossary

Volatility
The standard deviation of an asset's returns: how widely they typically swing around their average.
Sample standard deviation
The standard deviation estimated from data, dividing the sum of squared deviations by n − 1.
Annualise
Restate a figure for a shorter period, such as a day, as its equivalent for a year.
Square-root-of-time rule
Scaling a volatility from one horizon to another by the square root of the ratio of the horizons.
Window
The stretch of past data used for an estimate, such as the last 60 or 250 trading days.
Volatility clustering
The tendency of calm days to follow calm days and stormy days to follow stormy days.
EWMA
An exponentially weighted moving average: each older squared return gets a smaller weight, set by a decay factor λ.

Deep Dives & Origins

Deep Dives

  • J. C. Hull, Risk Management and Financial Institutions, Wiley, the chapter on volatility (estimating volatility, EWMA and GARCH). Intermediate.
  • P. Jorion, Value at Risk: The New Benchmark for Managing Financial Risk, 3rd edition, McGraw-Hill, 2007, the chapter on forecasting risk. Intermediate.

Origins

  • B. Mandelbrot, “The Variation of Certain Speculative Prices”, Journal of Business, 36(4), 1963, pp. 394–419.
  • J.P. Morgan and Reuters, RiskMetrics: Technical Document, 4th edition, 1996.
  • Basel Committee on Banking Supervision, Amendment to the Capital Accord to Incorporate Market Risks, January 1996.
  • Basel Committee on Banking Supervision, Revisions to the Basel II Market Risk Framework, July 2009.

Watch this lesson

Video version

Prefer to watch? The same lesson as a 12-minute video will sit here, made from this page's script.