TQBTHEQUANTBATEMAN
TQB/ learn/ equity/ stochastic volatilityEN · DARK
volatility · advanced

Stochastic volatility

Adding an explicit random variance state and the dynamics a static surface cannot supply

BY THE END, YOU CAN

01Separate spot and variance state dynamics.

02Explain leverage correlation and vol-of-vol.

03Derive the first moments of mean-reverting variance.

04Identify simulation and calibration risks.

01
INTUITION

Build the state before the equation.

Stochastic-volatility models make variance a random state. Correlation between spot and variance innovations creates skew dynamics; mean reversion and vol-of-vol shape the term structure and distribution of future variance.

01

Variance becomes a hedge factor rather than a deterministic surface lookup.

02

Negative spot-variance correlation produces leverage-style downside skew.

03

The discretization scheme is part of the implemented model.

02
WHY MARKETS CARE

The product exists before the model.

Stochastic volatility improves forward smile dynamics and prices payoffs exposed to variance path and convexity.

INSTRUMENTS

forward-start options

cliquets

barriers

variance and volatility derivatives

QUOTE CONVENTION

Parameters are model states or risk-neutral dynamics, not directly observed market quotes. State whether calibration is in premium or implied-vol space.

03
MATHEMATICS

Notation, units and exact claims.

v_t: instantaneous varianceκ: mean-reversion speedθ: long-run varianceη: vol of varianceρ: spot-variance correlation
QUANT NOTESYNTHETIC · EDUCATIONAL

Generic variance dynamics

Mean reversion plus state-dependent variance diffusion.

dvt=κ(θvt)dt+ηg(vt)dWtvdv_t=\kappa(\theta-v_t)dt+\eta g(v_t)dW_t^v
Read the equation together with its financial domain and convention.
QUANT NOTESYNTHETIC · EDUCATIONAL

Leverage channel

Correlation transmits spot shocks into the variance state.

dWS,Wvt=ρdtd\langle W^S,W^v\rangle_t=\rho\,dt
Read the equation together with its financial domain and convention.
QUANT NOTESYNTHETIC · EDUCATIONAL

Conditional mean

Variance shocks decay toward the long-run level at speed κ.

Et[vt+τ]=θ+(vtθ)eκτ\mathbb E_t[v_{t+\tau}]=\theta+(v_t-\theta)e^{-\kappa\tau}
Read the equation together with its financial domain and convention.
04
DERIVATION

Do not jump to the final expression.

DERIVATION

The mean-reverting variance state

Take conditional expectation of the variance SDE; the martingale diffusion term vanishes.

  1. 01

    Start from the SDE

    Use a drift pulling variance toward θ and a zero-mean diffusion innovation.

  2. 02

    Take conditional expectation

    The Itô integral has zero conditional expectation under integrability conditions.

    dm(τ)=κ(θm(τ))dτdm(\tau)=\kappa(\theta-m(\tau))d\tau
  3. 03

    Solve the linear ODE

    Apply an integrating factor or recognize exponential decay.

    m(τ)=θ+(vtθ)eκτm(\tau)=\theta+(v_t-\theta)e^{-\kappa\tau}
  4. 04

    Interpret term dynamics

    Large κ localizes variance shocks in short maturities; θ anchors the long end.

  5. 05

    Restore distributional risk

    The mean omits η, ρ and higher moments; pricing requires the full joint process and a risk-neutral parameterization.

Mean reversion explains level decay, while vol-of-vol and correlation determine smile curvature and leverage dynamics.

05
MODEL / PRICING

Fit, compute, then challenge the assumptions.

METHOD

Choose a variance process compatible with the payoff and numerical engine; validate moments, positivity behavior and limiting cases.

CALIBRATION

Fit liquid surface nodes with constrained multi-start optimization, then evaluate parameter stability and exotic hedge behavior.

LIMITATIONS

Parameters can be weakly identified.

Risk-neutral and physical dynamics differ.

Naive discretization biases variance and can cross zero.

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

Mean-reverting variance paths

Simulate a positive teaching process and verify the conditional mean direction.

REUSABLE EXAMPLE
01from __future__ import annotations
02
03import numpy as np
04
05def variance_paths(paths: int = 10_000, steps: int = 252, seed: int = 4) -> np.ndarray:
06 rng = np.random.default_rng(seed)
07 v = np.full(paths, 0.09)
08 dt, kappa, theta, eta = 1 / steps, 2.0, 0.04, 0.35
09 for _ in range(steps):
10 vp = np.maximum(v, 0.0)
11 v += kappa * (theta - vp) * dt + eta * np.sqrt(vp * dt) * rng.standard_normal(paths)
12 return np.maximum(v, 0.0)
13
14v = variance_paths()
15assert np.isfinite(v).all() and np.all(v >= 0.0)
16assert abs(float(v.mean()) - 0.04) < 0.03
17print(round(float(v.mean()), 5))
EXPECTED OUTPUTA deterministic terminal mean near the long-run variance.
SANITY CHECKS

Seed is fixed.

Diffusion uses non-negative variance.

Mean-reversion direction is tested.

07
INTERACTIVE LAB

Move the state. Challenge the equation.

RANDOM VARIANCE STATE AND MEAN REVERSION

Variance-state lab

Shock κ, θ, vol-of-vol and correlation; animate variance paths and surface response.

SYNTHETIC · CONTROLLED SCENARIOS
Long-run vol20.00%
κ3.20
Vol-of-vol0.35
ACTIVE STATE

Fast reversionVariance shocks decay rapidly. Move the intensity control and inspect every series with pointer or touch.

08
FRONT OFFICE

Where the model meets the book.

ON THE DESK
A parameter is hedgeable only through the instruments that move it.
VISIBLE INPUTS

surface snapshot

variance proxy

parameter bounds

engine

weights

CALIBRATION

Fit liquid surface nodes with constrained multi-start optimization, then evaluate parameter stability and exotic hedge behavior.

RISK

variance delta

vol-of-vol

correlation

parameter drift

DAILY WORKFLOW
  1. select process
  2. calibrate
  3. validate moments
  4. simulate
  5. stress hedges
Production failure modes
  • negative variance scheme
  • optimizer traps
  • unstable Greeks
  • measure confusion
09
MACRO CONNECTION

Map the transmission channel.

MACRO CONNECTION

Volatility as a persistent state

Risk shocks lift a variance state that decays rather than disappearing at the next close, producing clustering and term-structure effects.

Risk shock

raises variance state

Vol-of-vol

controls state dispersion

Mean reversion

sets persistence

Surface dynamics

moves level and skew

10
COMMON PITFALLS

Most failures begin outside the formula.

01

Reading risk-neutral parameters as physical forecasts.

02

Ignoring the variance discretization scheme.

03

Equating a good static fit with stable hedges.

04

Calibrating without multiple starts.

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 ↗