TQBTHEQUANTBATEMAN
TQB/ learn/ equity/ realized vs implied volatilityEN · DARK
Volatility · foundation

Realized versus implied volatility

Separating a backward-looking path estimate from a forward option-price coordinate

BY THE END, YOU CAN

01Distinguish physical-path estimation from risk-neutral option pricing.

02Define the variance risk premium with sign and horizon conventions.

03Explain why implied volatility need not equal expected realized volatility.

04Build a horizon-matched comparison without look-ahead bias.

01
INTUITION

Separate the quote from the quantity inferred from it.

Realized and implied volatility answer different questions. One summarizes a path under the physical measure; the other translates an option price under a model and embeds risk premia, convexity and supply-demand effects.

01

Match horizon before comparing the two numbers.

02

The spread is not a pure forecast error.

03

Variance is the cleaner additive object for risk-premium analysis.

02
WHY MARKETS CARE

Start from executable inputs and conventions.

The realized-implied relationship drives volatility carry, variance-swap analysis, option relative value and model backtesting.

INSTRUMENTS

listed options

variance swaps

VIX-style indices

delta-hedged option strategies

QUOTE CONVENTION

Compare annualized total variance over the same future window. State whether VRP means implied minus expected realized or the reverse.

03
MATHEMATICS

Transform quotes without losing units or arbitrage constraints.

Formula · Full derivation

Variance risk premium convention

VRP⁡t(T)=EtQ[RVt,t+T2]−EtP[RVt,t+T2]\operatorname{VRP}_t(T)=\mathbb E_t^{\mathbb Q}[RV_{t,t+T}^{2}]-\mathbb E_t^{\mathbb P}[RV_{t,t+T}^{2}]

A positive number under this convention compensates sellers of variance risk.

Open in Analytics
Full derivation
Full derivation

From option value to a variance premium

The two measures differ because pricing weights states by marginal utility and hedging demand, not historical frequency alone.

  1. 01

    Fix a future window

    Pair today’s implied quote with realized variance accumulated over exactly the option’s remaining horizon.

    [t,t+T][t,t+T]
  2. 02

    Express both sides in variance

    Total variance is time-additive under idealized partitioning and avoids comparing square roots prematurely.

    wt(T)=IVt2(T)Tw_t(T)=IV_t^2(T)T
  3. 03

    Separate probability measures

    Physical expectation describes future outcomes; risk-neutral expectation prices hedgeable cash flows after discounting.

    EP[RV2]≠EQ[RV2]\mathbb E^{\mathbb P}[RV^2]\ne\mathbb E^{\mathbb Q}[RV^2]
  4. 04

    Define the premium

    Subtract the physical expected variance from its risk-neutral counterpart and keep the sign convention attached.

    VRP=EQ[RV2]−EP[RV2]VRP=E^{Q}[RV^2]-E^{P}[RV^2]
  5. 05

    Backtest without leakage

    Use only information available at the option timestamp, preserve bid/offer and roll the realized window forward.

Implied-minus-realized is a priced risk spread plus forecast error and implementation effects—not a free return statistic.

Inputs
  • IV_t(T): option-implied volatility
  • RV_{t,t+T}: subsequent realized volatility
  • w=σ²T: total variance
  • P and Q: physical and risk-neutral measures
Assumptions and limits
  • Overlapping windows induce serial dependence.
  • Implied volatility is strike dependent.
  • Transaction costs and tail losses dominate simple carry stories.
Formula · Definition

Ex-post variance spread

VRP^t,T=IVt2(T)−RVt,t+T2\widehat{VRP}_{t,T}=IV_t^2(T)-RV_{t,t+T}^2

A realized outcome useful for backtests, not the ex-ante expected premium itself.

Open in Analytics
05
MODEL / PRICING

Invert, fit, and reprice the market instruments.

METHOD

Construct constant-maturity implied variance and pair it with non-overlapping or carefully adjusted subsequent realized windows.

CALIBRATION

Estimate the physical expectation with a documented forecast; infer risk-neutral variance from option prices or a model-consistent index.

Implementation with current QuantLib

Current QuantLib separates market structures, processes, instruments, engines and calibration helpers. Use those abstractions only after the lesson’s conventions, domains and numerical checks are explicit.

API authority: upstream QuantLib reference pinned in the source registry.
06PYTHON IMPLEMENTATIONOpen the implementation and checks.
ARCHITECTURE
  • Validate domains and units at the boundary.
  • Keep the numerical kernel framework-free and deterministic.
  • Return diagnostics with values.
  • Test analytical limits and failure states.
PYTHON 3 · NUMPY / SCIPY

Horizon-matched variance spread

Compute ex-post variance spreads without mixing volatility and variance units.

REUSABLE EXAMPLE
01from __future__ import annotations
02
03import numpy as np
04
05def variance_spread(implied_vol: np.ndarray, realized_vol: np.ndarray) -> np.ndarray:
06 if implied_vol.shape != realized_vol.shape or np.any(implied_vol < 0) or np.any(realized_vol < 0):
07 raise ValueError("volatility arrays must align and be non-negative")
08 return implied_vol**2 - realized_vol**2
09
10iv = np.array([0.20, 0.24, 0.31])
11rv = np.array([0.17, 0.28, 0.25])
12spread = variance_spread(iv, rv)
13assert np.allclose(spread, np.array([0.0111, -0.0208, 0.0336]))
14print(np.round(spread * 10_000, 1))
EXPECTED OUTPUT[111.0, -208.0, 336.0] variance-basis points.
SANITY CHECKS

✓ Arrays share horizons.

✓ Inputs are decimal volatilities.

✓ Subtraction occurs in variance units.

07
INTERACTIVE LAB

Move the quote and inspect every linked representation.

IMPLIED VARIANCE − SUBSEQUENT REALIZED VARIANCE

Volatility carry laboratory

Shock implied level and subsequent regimes; compare variance spread, carry and tail outcomes.

SYNTHETIC · CONTROLLED SCENARIOS
Mean VRP188.1 bp²
IV22.00%
RV state17.00%
Annualized variance by Forward months

Carry: Implied variance remains above realized.

  • implied variance
  • realized variance
  • variance spread
Forward months: 0. implied variance: 0.0523. realized variance: 0.0316. variance spread: 0.0207.

Use Left/Right or Up/Down arrows to inspect values; Home and End jump to the bounds.

ACTIVE STATE

Carry — Implied variance remains above realized. Move the intensity control and inspect every series with pointer or touch.

08
FRONT OFFICE

Where the model meets the book.

ON THE DESK
“Short volatility earns a premium until the distribution collects it back.”
VISIBLE INPUTS

constant-maturity IV

realized estimator

bid/offer

roll convention

transaction costs

CALIBRATION

Estimate the physical expectation with a documented forecast; infer risk-neutral variance from option prices or a model-consistent index.

RISK

gap risk

short convexity

skew carry

roll-down

DAILY WORKFLOW
  1. align horizons
  2. normalize variance
  3. estimate carry
  4. stress tails
  5. attribute outcome
Production failure modes
  • look-ahead leakage
  • overlapping samples
  • mid-only returns
  • unmatched maturities
09MACRO CONNECTIONOpen the transmission channel.
MACRO CONNECTION

Insurance demand and the variance premium

Risk aversion and demand for crash protection can keep risk-neutral tail variance above the physical expectation.

01Macro uncertaintytransmits

raises protection demand

02Option premiumtransmits

embeds state prices

03Implied variancetransmits

moves above physical expectation

04Volatility carryoutput

compensates tail exposure

10COMMON PITFALLSOpen the failure checklist.
01

Calling IV the market’s unbiased forecast.

02

Subtracting volatilities instead of comparing variance.

03

Ignoring skew and maturity.

04

Backtesting with overlapping observations without robust inference.

11SOURCES / FURTHER READINGOpen sources and continue the track.
research

Volatility, Monte Carlo and stochastic-volatility lectures

Research map for the mathematical progression and numerical experiments; prose, examples and code are original.

Source
Computational Finance Course
Author
L. A. Grzelak
Ref
main
OPEN ORIGINAL SOURCE ↗
implementation reference

Current volatility structures, processes, calibration helpers and tests

Implementation reference for production abstractions and validation patterns.

Source
QuantLib upstream
Author
QuantLib contributors
Ref
v1.42.1
OPEN ORIGINAL SOURCE ↗