TQBTHEQUANTBATEMAN
TQB/ learn/ volatility/ local volatilityEN · DARK
volatility · advanced

Local volatility

An arbitrage-consistent diffusion fitted to today’s vanilla surface

BY THE END, YOU CAN

01Derive Dupire local variance from the forward equation.

02Explain why call-price derivatives demand smoothing.

03Contrast exact static fit with forward smile dynamics.

04Design stable interpolation and boundary checks.

01
INTUITION

Build the state before the equation.

Local volatility replaces one constant σ with a deterministic function σloc(S,t). Given a smooth arbitrage-consistent vanilla surface, Dupire identifies a diffusion that matches all European marginal distributions in ideal theory.

01

Exact vanilla fit is a static statement.

02

Differentiation amplifies quote noise.

03

Forward smile dynamics can be less realistic than the initial fit.

02
WHY MARKETS CARE

The product exists before the model.

Local volatility is a baseline for barrier and path-dependent pricing and a building block for local-stochastic volatility models.

INSTRUMENTS

barriers

digitals

autocallables

local-stochastic-volatility hybrids

QUOTE CONVENTION

Surface inputs must share forward, discount, dividend, expiry and strike conventions. Local variance is annualized decimal variance.

03
MATHEMATICS

Notation, units and exact claims.

σloc(S,t): local volatilityC(K,T): call surfaceD(0,T): discount factor∂KKC: density term
QUANT NOTESYNTHETIC · EDUCATIONAL

Local-vol diffusion

Volatility is deterministic conditional on current spot and time.

dSt=(rq)Stdt+σloc(St,t)StdWtdS_t=(r-q)S_tdt+\sigma_{loc}(S_t,t)S_tdW_t
Read the equation together with its financial domain and convention.
QUANT NOTESYNTHETIC · EDUCATIONAL

Dupire formula

The call surface determines local variance where derivatives and density are well behaved.

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

Density requirement

A small or negative denominator makes inversion unstable or invalid.

KKC(K,T)>0\partial_{KK}C(K,T)>0
Read the equation together with its financial domain and convention.
04
DERIVATION

Do not jump to the final expression.

DERIVATION

Inverting the forward equation

Match the Fokker–Planck evolution of the local-vol diffusion to strike derivatives of call prices.

  1. 01

    Start with the diffusion

    Specify risk-neutral drift and a state-time diffusion coefficient.

    dS=(rq)Sdt+σloc(S,t)SdWdS=(r-q)Sdt+\sigma_{loc}(S,t)SdW
  2. 02

    Write density evolution

    The forward Kolmogorov equation evolves terminal density under the diffusion.

  3. 03

    Connect density to calls

    Use Breeden–Litzenberger to replace terminal density by the second strike derivative of call prices.

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

    Differentiate through maturity

    Differentiate the discounted payoff expectation in T and substitute the density evolution.

  5. 05

    Isolate local variance

    Rearrange the forward PDE to obtain Dupire’s numerator over the convexity denominator.

Dupire converts a full static surface into one diffusion, but the inversion is only as reliable as surface cleaning, smoothing and boundary treatment.

05
MODEL / PRICING

Fit, compute, then challenge the assumptions.

METHOD

Build an arbitrage-controlled call-price surface, compute stable derivatives, floor diagnostics rather than values, and solve PDEs with consistent boundaries.

CALIBRATION

The model is implied from the vanilla surface rather than optimized to it; smoothing hyperparameters are the effective calibration choices.

LIMITATIONS

Noise amplification in derivatives.

Unrealistic forward smile dynamics can mis-hedge exotics.

Boundary extrapolation materially changes local vol.

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 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.
06
PYTHON LAB

Theory → implementation → checks.

PYTHON 3 · NUMPY / SCIPY

Dupire denominator diagnostic

Detect unstable density denominators before computing local variance.

REUSABLE EXAMPLE
01from __future__ import annotations
02
03import numpy as np
04
05def convexity(strikes: np.ndarray, calls: np.ndarray) -> np.ndarray:
06 if strikes.shape != calls.shape or strikes.size < 5:
07 raise ValueError("aligned grid with at least five nodes required")
08 h = np.diff(strikes)
09 if not np.allclose(h, h[0]):
10 raise ValueError("teaching implementation requires uniform strikes")
11 return (calls[:-2] - 2.0 * calls[1:-1] + calls[2:]) / h[0]**2
12
13k = np.arange(80.0, 125.0, 5.0)
14c = np.array([22.0, 18.0, 14.5, 11.5, 9.0, 7.0, 5.5, 4.5, 3.8])
15density_term = convexity(k, c)
16assert np.isfinite(density_term).all()
17assert np.all(density_term > 0.0)
18print(float(density_term.min()))
EXPECTED OUTPUTPositive minimum strike convexity for the teaching slice.
SANITY CHECKS

Convexity is positive.

Grid assumptions are validated.

No denominator flooring hides an arbitrage failure.

07
INTERACTIVE LAB

Move the state. Challenge the equation.

SURFACE DERIVATIVES AND DUPIRE STABILITY

Dupire stability lab

Change smoothing and grid spacing; inspect call convexity, local variance and failure regions.

SYNTHETIC · CONTROLLED SCENARIOS
ATM local vol21.96%
Max local vol27.40%
Noise stateSmooth
ACTIVE STATE

SmoothStable convex price slice. Move the intensity control and inspect every series with pointer or touch.

08
FRONT OFFICE

Where the model meets the book.

ON THE DESK
The calibration is exact because the interpolation made the difficult decisions first.
VISIBLE INPUTS

clean call surface

curves and forwards

smoothing rule

grid

boundaries

CALIBRATION

The model is implied from the vanilla surface rather than optimized to it; smoothing hyperparameters are the effective calibration choices.

RISK

local-vol vega

barrier sensitivity

surface derivative risk

grid risk

DAILY WORKFLOW
  1. clean prices
  2. enforce shape
  3. differentiate
  4. diagnose denominator
  5. solve PDE
Production failure modes
  • negative density
  • noisy time derivative
  • wing explosion
  • boundary artifacts
09
MACRO CONNECTION

Map the transmission channel.

MACRO CONNECTION

Spot moves through a state-dependent surface

A local-vol model maps today’s skew into spot-dependent future diffusion, linking selloffs to higher instantaneous volatility without an independent variance shock.

Current skew

defines state dependence

Spot selloff

moves into higher local vol

Path distribution

changes barrier probabilities

Exotic hedge

inherits local dynamics

10
COMMON PITFALLS

Most failures begin outside the formula.

01

Differentiating raw implied vols.

02

Calling exact vanilla fit a validation of dynamics.

03

Flooring negative local variance silently.

04

Ignoring extrapolation in path-dependent pricing.

11
SOURCES / FURTHER READING

Attribution with implementation authority.

researchBSD-3-Clause

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 ↗LICENSE ↗
implementation referenceQuantLib permissive license

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 ↗LICENSE ↗