TQBTHEQUANTBATEMAN
TQB/ learn/ volatility/ volatility surfaceEN · DARK
volatility · front-office

Volatility surface

A market-consistent map across strike and maturity—and a hypothesis about everything between the quotes

BY THE END, YOU CAN

01Read a surface as linked smile and term slices rather than a decorative 3D object.

02Distinguish quoted nodes, interpolation choices and model-generated dynamics.

03Use total variance and option-price checks to reason about static arbitrage.

04Connect the surface to vanilla marking, local volatility, stochastic volatility and hedge behavior.

01
INTUITION

Build the state before the equation.

A volatility surface stacks option-implied volatility across strike and expiry. Every visible point is a compact encoding of an option price under a stated convention; every gap between liquid points is a modelling decision.

01

A smile slice answers how downside, ATM and upside options differ at one expiry.

02

A term slice answers how the market distributes uncertainty and event risk through time.

03

The fitted surface marks vanilla books today. A dynamics model determines how it moves tomorrow.

02
WHY MARKETS CARE

The product exists before the model.

Desks need continuous values for marking, interpolation, scenario risk and calibration even though only a sparse set of options trades reliably.

INSTRUMENTS

listed or OTC vanilla grids

variance-sensitive products

barriers and digitals

forward-start and cliquet structures

QUOTE CONVENTION

This lesson uses spot moneyness K/S and ACT/365-like maturity for education. Production equity, FX and rates surfaces require their native forward, delta, premium, ATM and normal/lognormal conventions.

03
MATHEMATICS

Notation, units and exact claims.

k = log(K/F_T): log-forward moneynessw(k,T) = σ_imp²(k,T)T: total implied varianceC(K,T): call-price surfaceσ_loc(K,T): local volatility
QUANT NOTESYNTHETIC · EDUCATIONAL

Surface coordinate

Forward log-moneyness makes strike geometry comparable across maturities.

(k,T)σimp(k,T),k=log(K/FT)(k,T)\mapsto \sigma_{imp}(k,T),\qquad k=\log(K/F_T)
Read the equation together with its financial domain and convention.
QUANT NOTESYNTHETIC · EDUCATIONAL

Total variance

Many no-arbitrage and interpolation questions are more naturally expressed in total variance than volatility.

w(k,T)=σimp2(k,T)Tw(k,T)=\sigma_{imp}^2(k,T)T
Read the equation together with its financial domain and convention.
QUANT NOTESYNTHETIC · EDUCATIONAL

Risk-neutral density

Convex call prices imply a non-negative risk-neutral terminal density.

KKC(K,T)=D(0,T)fSTQ(K)0\partial_{KK}C(K,T)=D(0,T)\,f_{S_T}^{\mathbb Q}(K)\ge 0
Read the equation together with its financial domain and convention.
QUANT NOTESYNTHETIC · EDUCATIONAL

Dupire local variance

A sufficiently smooth arbitrage-consistent vanilla surface identifies one local-volatility diffusion.

σloc2(K,T)=TC+(rq)KKC+qC12K2KKC\sigma_{loc}^2(K,T)=\frac{\partial_T C+(r-q)K\partial_K C+qC}{\tfrac12K^2\partial_{KK}C}
Read the equation together with its financial domain and convention.
04
DERIVATION

Do not jump to the final expression.

DERIVATION

From a call-price surface to local volatility

Dupire’s result is an inversion of the forward equation. It shows why surface smoothness and convexity are numerical requirements, not styling preferences.

  1. 01

    Assume risk-neutral local dynamics

    Let instantaneous volatility depend on state and time while the drift remains risk-neutral.

    dSt=(rq)Stdt+σloc(St,t)StdWtdS_t=(r-q)S_tdt+\sigma_{loc}(S_t,t)S_tdW_t
  2. 02

    Write the forward density equation

    The transition density evolves under the Fokker–Planck equation associated with the diffusion.

    Tp=S((rq)Sp)+12SS(σloc2S2p)\partial_T p=-\partial_S((r-q)Sp)+\tfrac12\partial_{SS}(\sigma_{loc}^2S^2p)
  3. 03

    Differentiate option prices by strike

    Breeden–Litzenberger links the strike curvature of call prices to the discounted risk-neutral density.

    KKC=D(0,T)p(K,T)\partial_{KK}C=D(0,T)p(K,T)
  4. 04

    Differentiate by maturity

    Insert the forward density evolution into the maturity derivative of the call payoff integral and integrate by parts.

    C(K,T)=D(0,T)K(SK)p(S,T)dSC(K,T)=D(0,T)\int_K^{\infty}(S-K)p(S,T)dS
  5. 05

    Isolate local variance

    Rearrange the resulting forward PDE. A non-positive denominator or noisy derivative makes the inferred local variance unstable.

    σloc2=TC+(rq)KKC+qC12K2KKC\sigma_{loc}^2=\frac{\partial_T C+(r-q)K\partial_K C+qC}{\tfrac12K^2\partial_{KK}C}

A surface is simultaneously market data, an interpolation object and an input to dynamics. Those roles should never be silently conflated.

05
MODEL / PRICING

Fit, compute, then challenge the assumptions.

METHOD

Normalize option quotes, infer implied volatilities, choose a stable coordinate system, fit each slice, connect maturities and validate reconstructed premiums and static-arbitrage diagnostics.

CALIBRATION

The educational workbench exposes level, skew, curvature and term slope directly. Production calibration minimizes weighted premium or volatility errors subject to stability, liquidity and no-arbitrage constraints.

LIMITATIONS

Sparse wings force extrapolation choices.

A perfect static fit does not guarantee realistic forward dynamics.

Volatility-space interpolation can hide option-price arbitrage.

MODEL COMPARISON

Static fit is not dynamics.

QuestionBlack–ScholesLocal volatilityHeston
Volatility stateOne constant σσ(S,t) deterministicvₜ stochastic
Fits today’s surfaceNoExactly, in ideal theoryApproximately by calibration
Forward dynamicsFlat smileSpot-drivenVariance + correlation driven
Primary strengthTransparent baselineVanilla-consistent diffusionRicher smile dynamics
Primary failureNo smileOften unrealistic forward skewParameter and calibration instability
ComputeLowMedium: PDE/MCMedium–high: Fourier/PDE/MC
Hedge implicationGreeks at one σState-localized vol hedgeVariance and vol-of-vol risk
Implementation with current QuantLib

Current QuantLib 1.42 introduced PiecewiseBlackVarianceSurface for ragged grids and provides Black variance surfaces, smile sections and SABR structures. A library supplies tested representations; the user must still choose conventions, quotes, interpolation and extrapolation deliberately.

API authority: upstream QuantLib reference pinned in the source registry.
06
PYTHON LAB

Theory → implementation → checks.

PYTHON 3 · NUMPY / SCIPY

Vectorized educational surface

Build one deterministic surface grid with explicit parameters, units and sanity checks.

REUSABLE EXAMPLE
01from __future__ import annotations
02
03from dataclasses import dataclass
04import numpy as np
05from numpy.typing import NDArray
06
07FloatArray = NDArray[np.float64]
08
09@dataclass(frozen=True)
10class SurfaceShape:
11 atm: float = 0.20
12 skew: float = -0.18
13 curvature: float = 0.55
14 term_slope: float = 0.025
15
16def educational_surface(
17 log_moneyness: FloatArray,
18 maturity: FloatArray,
19 shape: SurfaceShape,
20) -> FloatArray:
21 """Return a deterministic teaching surface; never market data."""
22 if np.any(maturity <= 0.0):
23 raise ValueError("maturity must be positive")
24 vol = (
25 shape.atm
26 + shape.skew * log_moneyness
27 + shape.curvature * log_moneyness**2
28 + shape.term_slope * np.log1p(maturity)
29 )
30 return np.maximum(vol, 0.01)
31
32tenors = np.array([7 / 365, 30 / 365, 0.25, 0.5, 1.0, 2.0])
33moneyness = np.linspace(0.70, 1.30, 25)
34k = np.log(moneyness)[None, :]
35t = tenors[:, None]
36surface = educational_surface(k, t, SurfaceShape())
37
38assert surface.shape == (tenors.size, moneyness.size)
39assert np.isfinite(surface).all() and np.all(surface > 0.0)
40print(f"ATM 1Y: {surface[4, 12]:.2%}")
EXPECTED OUTPUTATM 1Y: 21.73%shape: 6 maturities × 25 moneyness nodes
SANITY CHECKS

All maturities are positive.

Every output is finite and positive.

The result is explicitly synthetic and not a calibration.

07
INTERACTIVE LAB

One surface, four linked views.

LOADING VISUAL ENGINEBuilding one deterministic surface grid…
08
FRONT OFFICE

Where the model meets the book.

ON THE DESK
The mark is a surface. The hedge is a view about how that surface moves.
VISIBLE INPUTS

bid/offer vanilla grid

spot and forwards

discount/dividend curves

corporate-action calendar

expiry/settlement conventions

CALIBRATION

Fit liquid nodes more strongly, preserve bid/offer awareness and inspect residuals in premium as well as volatility space.

RISK

vega buckets

vanna and volga

skew/term scenarios

spot-vol correlation

calendar roll

DAILY WORKFLOW
  1. ingest and timestamp quotes
  2. normalize strikes/deltas
  3. clean crossed or stale nodes
  4. fit
  5. reprice quotes
  6. publish surface and risk
  7. monitor drift
Production failure modes
  • stale spot or forward
  • calendar-arbitrage from interpolation
  • wing extrapolation instability
  • quote holes
  • parameter jumps across recalibrations
  • cache and version mismatch
09
MACRO CONNECTION

Map the transmission channel.

MACRO CONNECTION

A surface is a map of event pricing

Macro regimes affect the level, asymmetry and timing of protection demand rather than moving every option uniformly.

Inflation / growth surprise

changes policy and earnings distribution

Rates and forward

move carry and moneyness coordinates

Risk sentiment

changes downside protection demand

Surface

reprices level, skew and term structure

10
COMMON PITFALLS

Most failures begin outside the formula.

01

Treating a smooth plot as proof of no arbitrage.

02

Mixing spot and forward moneyness.

03

Fitting mid quotes without spreads or liquidity weights.

04

Using a static surface as a claim about future smile dynamics.

05

Showing synthetic scenarios as market observations.

11
SOURCES / FURTHER READING

Attribution with implementation authority.

researchBSD-3-Clause

Lectures 04 and 07 — implied and stochastic volatility

Research path for the volatility progression; all explanations and implementation are original.

Source
Computational Finance Course
Author
L. A. Grzelak
Ref
main
OPEN ORIGINAL SOURCE ↗LICENSE ↗
implementation referenceQuantLib permissive license

ql/termstructures/volatility and QuantLib 1.42 release notes

Current implementation reference for smile sections, SABR and variance-surface representations.

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