Objective
Every volatility forecast has to be scored against something, and the true variance of a day is never observed. This lesson is about measuring volatility after the fact as precisely as possible: realised variance from intraday data, what goes wrong when you sample too often, how to squeeze more out of daily open/high/low/close bars, and how to annualise without bias. The GARCH lesson in Time Series treated the squared daily return as the proxy; here we see how bad that proxy is and how to do better.
Realised variance
Let the log price follow . The quantity we want for day is the integrated variance
Split the day into intervals and take the intraday log returns . Realised variance is
the quadratic variation of the log price. The drift does not matter: its contribution to each return is , so to each squared return , and the sum is .
How precise is it? With constant volatility, each intraday return is , so has mean and variance . Summing independent terms:
With (the squared close-to-close return) the relative error is : the proxy is unbiased but almost useless for a single day. With 78 five-minute returns in a 6.5-hour session it is . With stochastic volatility the formula becomes (integrated quarticity), but the rate is the same.
Microstructure noise
The infinite-sampling limit breaks on real data. Observed prices are the efficient price plus noise from the bid–ask bounce, discreteness and stale quotes: with i.i.d., mean 0, variance . Observed returns are then
which have negative first-order autocorrelation (the bounce) and an extra variance of each. Summing of them,
The signal is fixed while the noise grows linearly in : sample every tick and you measure the spread, not the volatility. Keeping the leading terms, the mean squared error is
minimised where :
In practice people plot average RV against sampling interval (the volatility signature plot), and pick the interval where the curve flattens; 5 minutes is the conventional default for liquid stocks. Better still are estimators that use all the data and remove the noise: subsampling and averaging (two-scale RV), realised kernels that add back the autocovariances of returns, and pre-averaging. All of them exploit the same fact: noise shows up as negative autocorrelation of high-frequency returns.
Worked example
the best sampling frequency
A stock has daily volatility 1% () and microstructure noise with standard deviation 5 basis points (). The session is 390 minutes. What is the expected RV from 1-minute and from 5-minute returns? Roughly what sampling interval minimises the MSE, and how precise is RV there?
Show solutionHide solution
Bias. With 1-minute returns, and the bias is , so the expected RV is : nearly three times the true variance, a "volatility" of instead of . With 5-minute returns, and the bias is : expected RV , still 39% too high.
Optimum. returns, one every minutes.
Precision there. Bias and standard deviation , so the RMSE is , about 30% of . Compare 141% for the squared daily return.
A simulation of this exact setup (20,000 days) agrees: RMSE about 33% of for 10–15 minute sampling, against 45% at 5 minutes and 196% at 1 minute. The approximation slightly understates the error because it drops the variance contributed by the noise itself. Note how flat the curve is near the optimum: anything from 8 to 20 minutes is within about 6% of the best RMSE.
Range-based estimators
Without intraday data you usually still have the open, high, low and close. The range carries much more information than the close alone, because the path had to visit both extremes. Write for log prices, with by convention.
Parkinson (1980). For Brownian motion without drift, , so
Its variance is about , against for : an efficiency (variance ratio) of about . One day of ranges is worth about five days of closes.
Garman–Klass (1980). Combine the range with the open-to-close return:
with efficiency about . The subtracted term corrects for the part of the range already explained by the net move.
Rogers–Satchell stays unbiased under a non-zero drift, , and Yang–Zhang adds the overnight (close-to-open) return, which none of the others see.
Failure modes. All range estimators assume continuous monitoring. Real prices trade discretely, so the observed high is below the true high and the observed low above the true low: range estimators are biased downward, more so for illiquid names. Bid–ask bounce pushes the other way (the high tends to be an ask and the low a bid). Jumps at the open and the overnight gap are missed entirely. And the efficiency figures are for constant intraday volatility; the U-shaped intraday pattern changes them.
Worked example
estimators from one daily bar
A stock opens at 100, trades between 98 and 103, and closes at 101. Estimate the day's variance using the close-to-close return (assume the previous close was 100), Parkinson and Garman–Klass, and annualise each.
Show solutionHide solution
Log quantities: , so ; , so .
- Close-to-close: , volatility , annualised .
- Parkinson: , volatility , annualised .
- Garman–Klass: , volatility , annualised .
The close says "quiet day"; the range says the stock moved 5% intraday and came back. Any single-day estimate is noisy, but the range estimators are telling you something the close cannot. Over many days, all three are estimating the same variance; the range-based ones just get there with far fewer observations.
A simulation you can run
The script simulates 20,000 days of a Brownian log price with 1% daily volatility on a one-minute grid, adds 5bp of i.i.d. noise to the observed prices, and compares estimators by their mean and RMSE relative to the true variance. The range estimators use the efficient (noise-free) minute prices, so they show only the discrete-monitoring effect.
import numpy as np
rng = np.random.default_rng(3)
days, n, sigma, eta = 20_000, 390, 0.01, 0.0005 # 1% daily vol, 5bp noise
# efficient log price: Brownian motion sampled every minute, starting at 0
steps = rng.normal(0, sigma / np.sqrt(n), (days, n))
p = np.concatenate([np.zeros((days, 1)), steps.cumsum(axis=1)], axis=1)
obs = p + rng.normal(0, eta, p.shape) # what the tape shows
def rv(x, k): # realised variance, every k minutes
return (np.diff(x[:, ::k], axis=1) ** 2).sum(axis=1)
o, c = p[:, 0], p[:, -1]
hl = p.max(axis=1) - p.min(axis=1)
est = {
"close-to-close r^2": (c - o) ** 2,
"Parkinson": hl**2 / (4 * np.log(2)),
"Garman-Klass": 0.5 * hl**2 - (2 * np.log(2) - 1) * (c - o) ** 2,
"RV 5-min, no noise": rv(p, 5),
"RV 5-min, noisy": rv(obs, 5),
"RV 1-min, noisy": rv(obs, 1),
}
print(f"{'estimator':20s} {'mean/true':>9s} {'RMSE/true':>10s}")
for name, e in est.items():
print(f"{name:20s} {e.mean() / sigma**2:9.3f} {np.sqrt(((e - sigma**2) ** 2).mean()) / sigma**2:10.3f}")
Output:
estimator mean/true RMSE/true
close-to-close r^2 1.003 1.417
Parkinson 0.933 0.623
Garman-Klass 0.906 0.500
RV 5-min, no noise 1.000 0.160
RV 5-min, noisy 1.390 0.451
RV 1-min, noisy 2.949 1.963
Read it line by line against the theory:
- Close-to-close: unbiased, RMSE .
- Parkinson and Garman–Klass: RMSE near the continuous-monitoring values and , but biased down 7–9% because a 390-step grid misses the true extremes.
- Clean 5-minute RV: unbiased with RMSE , the best here by far.
- Noisy RV: the bias is at 5 minutes and at 1 minute, exactly as derived. Sampling more often made the estimate worse.
Annualisation
Variance, not volatility, scales with time (for uncorrelated returns). So:
- Annual variance average daily variance; annual volatility , with .
- Average variances, then take the root. Averaging daily volatilities understates volatility by Jensen's inequality, , and the gap widens exactly when volatility is volatile.
- Mind the overnight return. RV over trading hours misses the close-to-open move, a substantial share of an equity's total daily variance. Either add the squared overnight return or scale intraday RV up to match the close-to-close variance over a long sample.
- Mind the calendar. Use trading days for trading-day returns (252), calendar days if the series includes weekends, and remember that implied volatility is usually quoted on a calendar or business-day convention that may differ from yours.
- If returns are autocorrelated (stale prices, illiquid assets), scaling is wrong; the variance of a sum includes the autocovariances.
Knowledge check
Under constant volatility and no noise, roughly how many equally spaced intraday returns are needed for realised variance to have a relative standard error of 10%?
Knowledge check
You switch a realised-volatility estimate from 5-minute to tick-by-tick returns on a stock with a wide bid–ask spread. What happens to the average estimate, and why?
Knowledge check
Four days have daily realised variances of 1, 1, 4 and 1 (in percent squared). What is the annualised volatility over the period?
Key takeaways
- Realised variance converges to integrated variance; its relative error is about , against 141% for one squared daily return.
- Microstructure noise adds of bias, so there is an optimal frequency ; use a signature plot, or noise-robust estimators (two-scale, realised kernels, pre-averaging).
- Parkinson () and Garman–Klass () are far more efficient than close-to-close, but biased down by discrete monitoring and blind to overnight gaps.
- Annualise variances, not volatilities; include the overnight return; average variances before taking roots.
Practice problems
Finished reading?
Answer the 3 knowledge checks to complete this lesson (0 done).