Stochastic volatility
Adding an explicit random variance state and the dynamics a static surface cannot supply
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.
Identify the state variables and the behavior they add.
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.
Variance becomes a hedge factor rather than a deterministic surface lookup.
Negative spot-variance correlation produces leverage-style downside skew.
The discretization scheme is part of the implemented model.
Ask which instruments can identify the dynamics.
Stochastic volatility improves forward smile dynamics and prices payoffs exposed to variance path and convexity.
forward-start options
cliquets
barriers
variance and volatility derivatives
Parameters are model states or risk-neutral dynamics, not directly observed market quotes. State whether calibration is in premium or implied-vol space.
Write the dynamics before interpreting parameters.
Generic variance dynamics
Mean reversion plus state-dependent variance diffusion.
Open in AnalyticsLeverage channel
Correlation transmits spot shocks into the variance state.
Open in AnalyticsConditional mean
Variance shocks decay toward the long-run level at speed κ.
Open in AnalyticsShort derivation
The mean-reverting variance state
Take conditional expectation of the variance SDE; the martingale diffusion term vanishes.
- 01
Start from the SDE
Use a drift pulling variance toward θ and a zero-mean diffusion innovation.
- 02
Take conditional expectation
The Itô integral has zero conditional expectation under integrability conditions.
- 03
Solve the linear ODE
Apply an integrating factor or recognize exponential decay.
- 04
Interpret term dynamics
Large κ localizes variance shocks in short maturities; θ anchors the long end.
- 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.
Inputs
v_t: instantaneous varianceκ: mean-reversion speedθ: long-run varianceη: vol of varianceρ: spot-variance correlation
Assumptions and limits
- Parameters can be weakly identified.
- Risk-neutral and physical dynamics differ.
- Naive discretization biases variance and can cross zero.
Calibrate, compute, and challenge the dynamics.
Choose a variance process compatible with the payoff and numerical engine; validate moments, positivity behavior and limiting cases.
Fit liquid surface nodes with constrained multi-start optimization, then evaluate parameter stability and exotic hedge behavior.
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.
- 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.
Mean-reverting variance paths
Simulate a positive teaching process and verify the conditional mean direction.
from __future__ import annotations import numpy as np def variance_paths(paths: int = 10_000, steps: int = 252, seed: int = 4) -> np.ndarray: rng = np.random.default_rng(seed) v = np.full(paths, 0.09) dt, kappa, theta, eta = 1 / steps, 2.0, 0.04, 0.35 for _ in range(steps): vp = np.maximum(v, 0.0) v += kappa * (theta - vp) * dt + eta * np.sqrt(vp * dt) * rng.standard_normal(paths) return np.maximum(v, 0.0) v = variance_paths()assert np.isfinite(v).all() and np.all(v >= 0.0)assert abs(float(v.mean()) - 0.04) < 0.03print(round(float(v.mean()), 5))Shock one parameter and trace the full response.
Variance-state lab
Shock κ, θ, vol-of-vol and correlation; animate variance paths and surface response.
Fast reversion: Variance shocks decay rapidly.
- conditional mean
- path A
- path B
Use Left/Right or Up/Down arrows to inspect values; Home and End jump to the bounds.
Where the model meets the book.
“A parameter is hedgeable only through the instruments that move it.”
surface snapshot
variance proxy
parameter bounds
engine
weights
Fit liquid surface nodes with constrained multi-start optimization, then evaluate parameter stability and exotic hedge behavior.
RISKvariance delta
vol-of-vol
correlation
parameter drift
- select process
- calibrate
- validate moments
- simulate
- stress hedges
Production failure modes
- negative variance scheme
- optimizer traps
- unstable Greeks
- measure confusion
09MACRO CONNECTIONOpen the transmission channel.
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.
transmitsraises variance state
transmitscontrols state dispersion
transmitssets persistence
outputmoves level and skew
10COMMON PITFALLSOpen the failure checklist.
Reading risk-neutral parameters as physical forecasts.
Ignoring the variance discretization scheme.
Equating a good static fit with stable hedges.
Calibrating without multiple starts.
11SOURCES / FURTHER READINGOpen sources and continue the track.
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
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