TQBTHEQUANTBATEMAN
TQB/ learn/ volatility/ heston modelEN · DARK
Volatility · front-office

Heston model

Mean-reverting stochastic variance with price–variance correlation

BY THE END, YOU CAN

01Interpret each Heston parameter through surface shape and dynamics.

02State the variance positivity and Feller-condition nuance.

03Separate pricing-engine selection from calibration-objective design.

04Recognize parameter degeneracy and recalibration instability.

01
INTUITION

Identify the state variables and the behavior they add.

Heston replaces constant volatility with a random, mean-reverting variance process. Negative price–variance correlation creates equity-like downside skew; vol-of-vol controls smile curvature; mean reversion governs how quickly the variance state forgets shocks.

01

v₀ anchors short-dated variance.

02

θ anchors the long-run variance level.

03

κ controls mean-reversion speed, σᵥ the variance-of-variance and ρ the leverage channel.

02
WHY MARKETS CARE

Ask which instruments can identify the dynamics.

One parameter set can generate a full surface and richer dynamics than Black–Scholes, making Heston a durable benchmark for exotics, calibration studies and model comparison.

INSTRUMENTS

vanilla option calibration grids

barriers and forward-starts

variance-sensitive exotics

QUOTE CONVENTION

Calibration inputs must first be normalized under the asset class’s actual quote and forward conventions. Heston parameters are not portable across inconsistent surfaces.

03
MATHEMATICS

Write the dynamics before interpreting parameters.

Formula · Full derivation

Affine characteristic function

ϕ(u,τ)=exp⁡(C(u,τ)+D(u,τ)vt+iuxt)\phi(u,\tau)=\exp(C(u,\tau)+D(u,\tau)v_t+iux_t)

The conditional log-price transform is exponential-affine in the current variance and log spot, reducing the pricing problem to Riccati equations.

Open in Analytics
Full derivation
Full derivation

Why the Heston characteristic function is affine

Fourier pricing is practical because the log-price/variance transform has an exponential-affine form.

  1. 01

    State the risk-neutral spot dynamics

    Begin with the joint risk-neutral spot and variance state; the spot diffusion uses the same stochastic variance factor that enters the affine transform.

    dSt=(r−q)Stdt+vtStdWtSdS_t=(r-q)S_tdt+\sqrt{v_t}S_tdW_t^S
  2. 02

    Transform the state

    Use log spot x = log S so the diffusion generator is polynomial-affine in variance.

    xt=log⁡Stx_t=\log S_t
  3. 03

    Propose an affine transform

    Conditioned on the current state, assume the characteristic function is exponential-affine in log spot and variance.

    ϕ(u,τ)=exp⁡(C(u,τ)+D(u,τ)vt+iuxt)\phi(u,\tau)=\exp(C(u,\tau)+D(u,\tau)v_t+iux_t)
  4. 04

    Insert into the backward equation

    Matching constant and variance coefficients produces coupled Riccati ordinary differential equations for C and D.

    ∂τD=a(u)+b(u)D+cD2\partial_\tau D=a(u)+b(u)D+cD^2
  5. 05

    Solve and integrate

    The closed transform is inserted into a stable Fourier inversion or COS method to recover vanilla prices.

    C(K,T)=F−1[ϕ(u,T)]C(K,T)=\mathcal F^{-1}[\phi(u,T)]

Affine structure makes Heston computationally tractable; it does not make calibration uniquely identified or hedging dynamics correct by construction.

Inputs
  • vₜ: instantaneous variance
  • κ: mean-reversion speed
  • θ: long-run variance
  • σᵥ: vol-of-vol
  • ρ: Brownian correlation
  • φ(u,τ): conditional characteristic function
Assumptions and limits
  • Five parameters can be weakly identified on sparse grids.
  • A good vanilla fit does not guarantee exotic hedge performance.
  • Naive Euler variance discretization can become negative.
Formula · Full derivation

Variance process

dvt=κ(θ−vt)dt+σvvtdWtvdv_t=\kappa(\theta-v_t)dt+\sigma_v\sqrt{v_t}dW_t^v

CIR-style mean reversion supports a non-negative variance state under suitable schemes.

Open in Analytics
Formula · Definition

Leverage correlation

d⟨WS,Wv⟩t=ρ dtd\langle W^S,W^v\rangle_t=\rho\,dt

Negative correlation links spot selloffs to variance shocks and generates downside skew.

Open in Analytics
Formula · Short derivation

Feller condition

2κθ≥σv22\kappa\theta\ge\sigma_v^2

A sufficient condition for the continuous-time variance process to stay strictly positive; market calibrations can violate it, demanding careful numerics.

Open in Analytics
05
MODEL / PRICING

Calibrate, compute, and challenge the dynamics.

METHOD

Use an analytical characteristic-function engine, COS/Fourier inversion, PDE or a validated Monte Carlo scheme depending on payoff and required sensitivities.

CALIBRATION

Minimize weighted premium or volatility residuals across a selected grid. Constrain parameters, use multiple initial guesses and report parameter stability alongside fit error.

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 exposes HestonProcess, HestonModel and several engines. The process/model/engine separation is valuable, but API use comes after convention alignment and numerical validation.

API authority: upstream QuantLib reference pinned in the source registry.
06PYTHON IMPLEMENTATIONOpen the implementation and checks.
ARCHITECTURE
  • Separate the Heston process from pricing engines.
  • Validate parameter domains and correlation.
  • Benchmark analytical, numerical and Monte Carlo prices.
  • Track fit error and parameter drift through calibration runs.
PYTHON 3 · NUMPY / SCIPY

Full-truncation Heston paths

Simulate a stable educational path set with deterministic randomness and non-negative variance in diffusion terms.

REUSABLE EXAMPLE
01from __future__ import annotations
02
03import numpy as np
04
05def heston_paths(*, paths: int = 20_000, steps: int = 252, seed: int = 7) -> tuple[np.ndarray, np.ndarray]:
06 rng = np.random.default_rng(seed)
07 dt = 1.0 / steps
08 spot = np.full(paths, 100.0)
09 variance = np.full(paths, 0.04)
10 kappa, theta, vol_of_vol, rho, rate = 2.0, 0.04, 0.45, -0.70, 0.03
11 for _ in range(steps):
12 z1 = rng.standard_normal(paths)
13 z2 = rho * z1 + np.sqrt(1.0 - rho**2) * rng.standard_normal(paths)
14 v_pos = np.maximum(variance, 0.0)
15 spot *= np.exp((rate - 0.5 * v_pos) * dt + np.sqrt(v_pos * dt) * z1)
16 variance += kappa * (theta - v_pos) * dt + vol_of_vol * np.sqrt(v_pos * dt) * z2
17 return spot, np.maximum(variance, 0.0)
18
19spot_t, variance_t = heston_paths()
20assert np.isfinite(spot_t).all() and np.all(spot_t > 0.0)
21assert np.isfinite(variance_t).all() and np.all(variance_t >= 0.0)
22print(round(float(spot_t.mean()), 4), round(float(variance_t.mean()), 6))
EXPECTED OUTPUTDeterministic terminal spot and variance summary for seed 7.
SANITY CHECKS

✓ Spot remains positive under the log update.

✓ Diffusion uses truncated non-negative variance.

✓ A deterministic seed makes regression checks repeatable.

07
INTERACTIVE LAB

Shock one parameter and trace the full response.

HESTON VARIANCE STATE AND LEVERAGE CORRELATION

Heston dynamics lab

Move mean reversion, long-run variance, vol-of-vol and correlation; inspect variance persistence and smile response.

SYNTHETIC · CONTROLLED SCENARIOS
ρ-0.75
Vol-of-vol0.45
Long-run vol20.00%
Variance / smile response by Maturity (years)

Negative rho: Selloffs lift variance and downside skew.

  • expected variance
  • downside skew response
Maturity (years): 0.0Y. expected variance: 0.0776. downside skew response: 0.0187.

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

ACTIVE STATE

Negative rho — Selloffs lift variance and downside skew. Move the intensity control and inspect every series with pointer or touch.

08
FRONT OFFICE

Where the model meets the book.

ON THE DESK
“Calibration error is visible. Parameter instability is often more expensive.”
VISIBLE INPUTS

clean vanilla surface

curves and forwards

calibration weights

parameter bounds

engine tolerances

CALIBRATION

Use liquid strikes, multiple starts and stable parameter transforms. Evaluate premium residuals, bid/offer coverage and day-over-day parameter movement.

RISK

surface-vega buckets

spot/variance correlation

vol-of-vol exposure

forward smile dynamics

calibration jump risk

DAILY WORKFLOW
  1. freeze market snapshot
  2. select instruments
  3. calibrate
  4. validate repricing
  5. compare parameters
  6. run exotic risk
  7. approve or fall back
Production failure modes
  • local optimizer traps
  • characteristic-function branch errors
  • bad variance discretization
  • unstable finite-difference Greeks
  • parameters pinned at constraints
09MACRO CONNECTIONOpen the transmission channel.
MACRO CONNECTION

Leverage and variance regimes

Risk-off moves often combine falling spot, higher variance and stronger downside skew—the channel represented by negative spot–variance correlation.

01Risk-off shocktransmits

spot falls and protection demand rises

02Variance statetransmits

jumps above long-run mean

03Mean reversiontransmits

controls decay of the shock

04Option surfaceoutput

level and skew reprice

10COMMON PITFALLSOpen the failure checklist.
01

Reading calibrated parameters as directly observable economic constants.

02

Ignoring Feller violations in simulation choices.

03

Comparing fits without the same quote weights.

04

Using one calibration start and declaring uniqueness.

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

Lectures 07 and 10 — stochastic volatility and Heston Monte Carlo

Research source for model progression and numerical experiments; text and code are independently implemented.

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

Heston process, model, engines and test suite

Current implementation reference and validation architecture.

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