Markets: A Rigorous Course

9.2 Measuring realised volatility

Advanced about 30 min

Motivation

Every trade in this module compares implied volatility with a realised-vol estimate. A noisy estimate gives a noisy edge. Range-based estimators extract several times more information per day from the high and low than the close alone, which means a usable vol estimate from 10 days instead of 50.

9.2.1Close-to-close#

Let rt=ln⁡(Ct/Ct−1)r_t=\ln(C_t/C_{t-1}), with nn daily returns. The estimator

σ^CC2=1n−1∑t=1n(rt−rˉ)2(9.1)\hat\sigma^2_{CC}=\frac{1}{n-1}\sum_{t=1}^{n}(r_t-\bar r)^2 \tag{9.1}

is unbiased for the daily variance if returns are i.i.d. Under Gaussian returns with known zero mean, the single-day estimator rt2r_t^2 has

E[rt2]=σ2,Var⁡(rt2)=2σ4.(9.2)E[r_t^2]=\sigma^2,\qquad \operatorname{Var}(r_t^2)=2\sigma^4. \tag{9.2}

So the relative standard error of σ^2\hat\sigma^2 from nn days is 2/n\sqrt{2/n}, and that of σ^\hat\sigma is about 1/2n1/\sqrt{2n} (delta method). With n=20n=20 that is 16% of the volatility itself: a measured 12% vol is consistent with anything from about 10% to 14%. This is the baseline against which efficiency is measured:

eff(σ^X2)=Var⁡(rt2)Var⁡(σ^X,t2)(per-day estimators, both unbiased).(9.3)\text{eff}(\hat\sigma^2_X)=\frac{\operatorname{Var}(r_t^2)}{\operatorname{Var}(\hat\sigma^2_{X,t})}\quad\text{(per-day estimators, both unbiased).} \tag{9.3}

An efficiency of 5 means one day of estimator XX carries as much information as five days of closes.

9.2.2The range of Brownian motion and Parkinson's estimator#

Notation

For day tt with open OtO_t, high HtH_t, low LtL_t, close CtC_t and previous close Ct−1C_{t-1}, write

ot=ln⁡OtCt−1,ut=ln⁡HtOt,dt=ln⁡LtOt,ct=ln⁡CtOt.(9.4)o_t=\ln\frac{O_t}{C_{t-1}},\quad u_t=\ln\frac{H_t}{O_t},\quad d_t=\ln\frac{L_t}{O_t},\quad c_t=\ln\frac{C_t}{O_t}. \tag{9.4}

oto_t is the overnight return, ctc_t the open-to-close return, ut≥0≥dtu_t\ge 0\ge d_t, and the log range is ut−dt=ln⁡(Ht/Lt)u_t-d_t=\ln(H_t/L_t).

Assumption During the session, ln⁡S\ln S is a driftless Brownian motion with variance σ2\sigma^2 per day, observed continuously. No overnight gap for now.

Proposition 9.1moments of the Brownian range

Let R=max⁡s≤1Ws−min⁡s≤1WsR=\max_{s\le 1}W_s-\min_{s\le 1}W_s for a standard Brownian motion WW on [0,1][0,1]. Then for p≥1p\ge 1

E[Rp]=4 E∣Z∣p η(p−1),Z∼N(0,1),η(s)=∑k≥1(−1)k−1ks,(9.5)E[R^p]=4\,E|Z|^p\,\eta(p-1),\qquad Z\sim N(0,1),\quad \eta(s)=\sum_{k\ge1}\frac{(-1)^{k-1}}{k^{s}}, \tag{9.5}

with η(0)=12\eta(0)=\tfrac12 (Abel sum) and η(1)=ln⁡2\eta(1)=\ln 2. In particular E[R]=22/πE[R]=2\sqrt{2/\pi}, E[R2]=4ln⁡2E[R^2]=4\ln 2, E[R4]=9ζ(3)E[R^4]=9\zeta(3). For Brownian motion with volatility σ\sigma over time TT, multiply by (σT)p(\sigma\sqrt T)^p.

Proof

Step 1 (the density, cited). For a,b>0a,b>0, the probability that WW stays in (−a,b)(-a,b) on [0,1][0,1] is given by the method of images: reflect the Gaussian kernel repeatedly in the two barriers, with alternating signs (Feller, An Introduction to Probability Theory and Its Applications, Vol. II, §X.5). Differentiating in aa and bb gives the joint density of (−min⁡W,max⁡W)(-\min W,\max W), and integrating along a+b=ra+b=r gives the density of the range. Feller (1951) carried this out and obtained

fR(r)=8∑k=1∞(−1)k−1k2 φ(kr),r>0,f_R(r)=8\sum_{k=1}^{\infty}(-1)^{k-1}k^2\,\varphi(kr),\qquad r>0,

where φ\varphi is the standard normal density.

Step 2 (moments). For each kk, substitute x=krx=kr:

∫0∞rp φ(kr) dr=k−(p+1)∫0∞xpφ(x) dx=12k−(p+1)E∣Z∣p.\int_0^\infty r^p\,\varphi(kr)\,dr=k^{-(p+1)}\int_0^\infty x^p\varphi(x)\,dx=\tfrac12 k^{-(p+1)}E|Z|^p.

Hence E[Rp]=8∑k(−1)k−1k2⋅12k−(p+1)E∣Z∣p=4E∣Z∣p∑k(−1)k−1k1−p=4E∣Z∣pη(p−1)E[R^p]=8\sum_k(-1)^{k-1}k^2\cdot\tfrac12k^{-(p+1)}E|Z|^p=4E|Z|^p\sum_k(-1)^{k-1}k^{1-p}=4E|Z|^p\eta(p-1). For p>2p>2 the series converges absolutely and the interchange of sum and integral is justified by dominated convergence. For 1≤p≤21\le p\le 2 the series is conditionally convergent (or Abel-summable at p=1p=1); the identity still holds by Abel's theorem applied to ∑k(−1)k−1k1−pxk\sum_k(-1)^{k-1}k^{1-p}x^k as x↑1x\uparrow1, which is the route Feller takes.

Step 3 (special values). E∣Z∣=2/πE|Z|=\sqrt{2/\pi}, EZ2=1E Z^2=1, EZ4=3E Z^4=3; η(0)=12\eta(0)=\tfrac12, η(1)=ln⁡2\eta(1)=\ln 2, η(3)=(1−2−2)ζ(3)=34ζ(3)\eta(3)=(1-2^{-2})\zeta(3)=\tfrac34\zeta(3). So E[R]=22/π≈1.5958E[R]=2\sqrt{2/\pi}\approx1.5958, E[R2]=4ln⁡2≈2.7726E[R^2]=4\ln2\approx2.7726, E[R4]=4⋅3⋅34ζ(3)=9ζ(3)≈10.8185E[R^4]=4\cdot3\cdot\tfrac34\zeta(3)=9\zeta(3)\approx10.8185. Brownian scaling WsT=dTWsW_{sT}\overset{d}{=}\sqrt T W_s gives the (σT)p(\sigma\sqrt T)^p factor.∎

The code (range_moment_exact) evaluates (9.5) and the tests compare it with simulated ranges.

Proposition 9.2Parkinson 1980

Under the assumption above, the per-day estimator

σ^P,t2=(ln⁡Ht/Lt)24ln⁡2(9.6)\hat\sigma^2_{P,t}=\frac{(\ln H_t/L_t)^2}{4\ln 2} \tag{9.6}

is unbiased for σ2\sigma^2, and its efficiency relative to rt2r_t^2 is

effP=29ζ(3)16(ln⁡2)2−1≈20.4073≈4.91.\text{eff}_P=\frac{2}{\dfrac{9\zeta(3)}{16(\ln2)^2}-1}\approx\frac{2}{0.4073}\approx 4.91.
Proof

ln⁡(Ht/Lt)=ut−dt\ln(H_t/L_t)=u_t-d_t is the range of the intraday log path, which has the law of σR\sigma R. Unbiasedness: E[σ2R2]/(4ln⁡2)=σ2E[\sigma^2R^2]/(4\ln2)=\sigma^2 by Proposition 9.1. Variance: Var⁡(σ2R2/(4ln⁡2))=σ4 (ER4−(ER2)2)/(4ln⁡2)2=σ4 (9ζ(3)−16(ln⁡2)2)/(16(ln⁡2)2)=σ4(9ζ(3)/(16(ln⁡2)2)−1)\operatorname{Var}(\sigma^2R^2/(4\ln2))=\sigma^4\,(E R^4-(E R^2)^2)/(4\ln2)^2=\sigma^4\,(9\zeta(3)-16(\ln 2)^2)/(16(\ln 2)^2)=\sigma^4(9\zeta(3)/(16(\ln2)^2)-1). Numerically 9ζ(3)=10.81859\zeta(3)=10.8185 and 16(ln⁡2)2=7.687216(\ln2)^2=7.6872, so the bracket is 0.40730.4073. Divide 2σ42\sigma^4 (9.2) by 0.4073σ40.4073\sigma^4.∎

You will see "about 5" quoted for Parkinson's efficiency. The exact continuous-monitoring value is 4.91.

9.2.3Garman–Klass, Rogers–Satchell, Yang–Zhang#

Garman–Klass (1980) combine the range with the open-to-close return. The practical form is

σ^GK,t2=12(ut−dt)2−(2ln⁡2−1) ct2.(9.7)\hat\sigma^2_{GK,t}=\tfrac12(u_t-d_t)^2-(2\ln2-1)\,c_t^2. \tag{9.7}

Unbiasedness is one line: E[(u−d)2]=4ln⁡2 σ2E[(u-d)^2]=4\ln2\,\sigma^2 and E[c2]=σ2E[c^2]=\sigma^2, so E=2ln⁡2 σ2−(2ln⁡2−1)σ2=σ2E=2\ln2\,\sigma^2-(2\ln2-1)\sigma^2=\sigma^2. Garman and Klass derive the weights by minimising variance within a class of quadratic estimators; they report efficiency of about 7.4 for this family.

Rogers–Satchell (1991) remove the zero-drift assumption:

σ^RS,t2=ut(ut−ct)+dt(dt−ct).(9.8)\hat\sigma^2_{RS,t}=u_t(u_t-c_t)+d_t(d_t-c_t). \tag{9.8}

Rogers and Satchell prove it is unbiased for any constant drift. For zero drift you can check it yourself (Problem 3): reflection W↦−WW\mapsto-W maps (u,d,c)↦(−d,−u,−c)(u,d,c)\mapsto(-d,-u,-c), so both terms have the same mean, and Lévy's theorem (max⁡W−W1=d∣W1∣\max W-W_1\overset{d}{=}|W_1|) gives E[uc]=σ2/2E[uc]=\sigma^2/2, hence E[u(u−c)]=σ2−σ2/2=σ2/2E[u(u-c)]=\sigma^2-\sigma^2/2=\sigma^2/2.

Yang–Zhang (2000) handle the overnight gap. Over a window of nn days,

σ^YZ2=VO+k VC+(1−k) VRS,k=0.341.34+n+1n−1,(9.9)\hat\sigma^2_{YZ}=V_O+k\,V_C+(1-k)\,V_{RS},\qquad k=\frac{0.34}{1.34+\frac{n+1}{n-1}}, \tag{9.9}

where VOV_O and VCV_C are the sample variances of oto_t and ctc_t and VRSV_{RS} is the mean of (9.8). The overnight term carries the gap variance that every range estimator misses; the weights kk and 1−k1-k minimise the estimator's variance, with the constant 0.34 chosen by Yang and Zhang from their variance calculation. It is unbiased for drift and gaps, and among their class it has the smallest variance.

9.2.4Efficiencies and what breaks them#

Estimator Uses Unbiased under Efficiency vs close-to-close Breaks when
Close-to-close (9.1) C anything i.i.d. 1 never biased; just noisy
Parkinson (9.6) H, L zero drift, no gaps, continuous monitoring 4.91 (exact) overnight gaps, trends, discrete ticks
Garman–Klass (9.7) O, H, L, C zero drift, no gaps ≈ 7.4 gaps, drift
Rogers–Satchell (9.8) O, H, L, C any drift, no gaps ≈ 6 (simulation) gaps
Yang–Zhang (9.9) O, H, L, C, prev C drift and gaps highest of the five (≈ 7.6–8.1 in our 20-day, 20%-gap simulation; see below) jumps inside the session, microstructure

Numerical check (Exercise m09_realised_vol) The simulations below draw driftless Brownian intraday paths with NumPy's default_rng(seed); we report seed 0 and, in brackets, the range over seeds 0–4, so that you can see how much is Monte Carlo noise. On 40,000 simulated days with 20,000 intraday steps per day, the per-day estimators had sample variances (in units of σ4\sigma^4) of 1.98 (close-to-close), 0.400 (Parkinson), 0.263 (Garman–Klass) and 0.326 (Rogers–Satchell): efficiencies 1.0, 4.93 [4.92–5.00], 7.51 [7.46–7.71] and 6.06 [6.00–6.19]. The Parkinson value converges to 4.91 as the sampling becomes continuous. With 2,000 steps per day, the range estimators were biased low, because a discretely sampled path misses the true extremes: Parkinson by 2.7–3.2% and Garman–Klass and Rogers–Satchell by 3.9–4.5% across the five seeds (even at 20,000 steps a bias of about 1% remains). With 30% of the variance arriving overnight (2,000 steps), Parkinson captured only 68% of the true variance (67.7–68.1%), while Yang–Zhang captured 97–98% (97.4% for seed 0). For the table's Yang–Zhang entry: on 20,000 windows of 20 days, with 20% of the variance overnight and 390 intraday steps (simulate_ohlc, seed 0), the variance of the zero-mean close-to-close window estimator was 7.86 times that of Yang–Zhang (7.64–8.05 over seeds 0–4).

9.2.5Practitioner notes#

  • Gaps. Nifty's overnight move reflects global news (US close, SGX/GIFT Nifty trading, Asian open). Range estimators computed only on the 09:15–15:30 session miss it. Use Yang–Zhang, or add ot2o_t^2 explicitly.
  • Discrete sampling bias. The recorded high and low come from discrete trades, so the observed range is smaller than the continuous range; the bias is of order σΔt\sigma\sqrt{\Delta t} per extreme. With 1-minute data it is small; with 15-minute bars it is not.
  • Microstructure. A single bad print sets the high. Use exchange OHLC, not a vendor's tick-filtered series of unknown provenance, and look at outliers.
  • Which window? A shorter window tracks regime changes but is noisier. Desks plot several windows together ("volatility cones": the distribution of realised vol by window length over history) and compare the current implied vol with that distribution.
  • Range estimators sit closer to implied vol than you expect. Because they are more efficient, a range-based 10-day realised vol is a reasonable input to a short-horizon forecast. GARCH (M13) gives a model-based alternative.

Worked exampleillustrative numbers

Suppose Nifty's previous close was 24,800, and today O = 24,850, H = 25,050, L = 24,760, C = 25,000. Then o=ln⁡(24850/24800)=0.00201o=\ln(24850/24800)=0.00201, ln⁡(H/L)=0.011644\ln(H/L)=0.011644, c=ln⁡(25000/24850)=0.006018c=\ln(25000/24850)=0.006018, u=0.008016u=0.008016, d=−0.003628d=-0.003628.

  • Close-to-close: r2=(ln⁡25000/24800)2=6.452×10−5r^2=(\ln 25000/24800)^2=6.452\times10^{-5}; annualised 252×6.452×10−5=12.75%\sqrt{252\times6.452\times10^{-5}}=12.75\%.
  • Parkinson: 0.0116442/(4ln⁡2)=4.890×10−50.011644^2/(4\ln2)=4.890\times10^{-5}; 11.10%.
  • Garman–Klass: 0.5(0.011644)2−0.38629(0.006018)2=5.381×10−50.5(0.011644)^2-0.38629(0.006018)^2=5.381\times10^{-5}; 11.64%.
  • Rogers–Satchell: 0.008016(0.008016−0.006018)+(−0.003628)(−0.003628−0.006018)=5.102×10−50.008016(0.008016-0.006018)+(-0.003628)(-0.003628-0.006018)=5.102\times10^{-5}; 11.34%.

One day proves nothing; the point is the mechanics. Over many days the range-based numbers have roughly a fifth of the variance of close-to-close (efficiency about 5), so their standard deviation is a little under half as large.

Create a free account

Reading is open to everyone. An account keeps your progress, answers, notes and code drafts, and gives you the study plan, the journals and the simulator. Running code needs an account approved for it.