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

Build the state before the equation.

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

The product exists before the model.

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

Notation, units and exact claims.

vₜ: instantaneous varianceκ: mean-reversion speedθ: long-run varianceσᵥ: vol-of-volρ: Brownian correlation
QUANT NOTESYNTHETIC · EDUCATIONAL

Risk-neutral dynamics

Spot diffusion uses the stochastic variance state.

dSt=(rq)Stdt+vtStdWtSdS_t=(r-q)S_tdt+\sqrt{v_t}S_tdW_t^S
Read the equation together with its financial domain and convention.
QUANT NOTESYNTHETIC · EDUCATIONAL

Variance process

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

dvt=κ(θvt)dt+σvvtdWtvdv_t=\kappa(\theta-v_t)dt+\sigma_v\sqrt{v_t}dW_t^v
Read the equation together with its financial domain and convention.
QUANT NOTESYNTHETIC · EDUCATIONAL

Leverage correlation

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

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

Feller condition

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

2κθσv22\kappa\theta\ge\sigma_v^2
Read the equation together with its financial domain and convention.
04
DERIVATION

Do not jump to the final expression.

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

    Transform the state

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

    xt=logStx_t=\log S_t
  2. 02

    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)
  3. 03

    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
  4. 04

    Solve and integrate

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

    C(K,T)=F1[ϕ(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.

05
MODEL / PRICING

Fit, compute, then challenge the assumptions.

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.

LIMITATIONS

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.

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

Theory → implementation → checks.

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

Move the state. Challenge the equation.

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%
ACTIVE STATE

Negative rhoSelloffs 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
09
MACRO CONNECTION

Map 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.

Risk-off shock

spot falls and protection demand rises

Variance state

jumps above long-run mean

Mean reversion

controls decay of the shock

Option surface

level and skew reprice

10
COMMON PITFALLS

Most failures begin outside the formula.

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.

11
SOURCES / FURTHER READING

Attribution with implementation authority.

researchBSD-3-Clause

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

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