Heston ModelCharacteristic FunctionLewis FormulaCalibrationImplied Volatility Surface

Heston Model Calibration in Practice — Fitting the Smile

Module 4 of 530 min readLevel: HardCalibration Lab

Interactive lab available

Heston Calibration Cockpit90 min lab with live computation, 5 charts, and 4 verifiable challenges.

Launch Lab →

Setup

The Heston (1993) stochastic volatility model is the canonical starting point for equity and FX vol surface calibration. Its five parameters (κ,vˉ,ξ,ρ,v0)(\kappa, \bar{v}, \xi, \rho, v_0) produce a parsimonious smile that captures the key features of observed implied vol surfaces: skew (driven by ρ\rho), curvature (driven by ξ\xi), and term structure (driven by κ\kappa and vˉ\bar{v}).

Calibrating Heston to a market surface requires: (i) a fast semi-analytic pricer (via the characteristic function), (ii) a method to invert model prices to implied vols, (iii) a weighted NLS objective, and (iv) a robust solver (LM) with a sensible starting point. Getting each step right is necessary for a production-quality calibration.

INSIGHT

Financial Insight. The Heston model is daily calibrated on every equity derivatives desk. It is the benchmark against which more complex models (local-stochastic vol, rough vol) are measured. Even when Heston is known to be wrong (it cannot produce short-dated smiles as steep as the market), it is used as the interpolation and risk management framework. A quant who cannot implement and calibrate Heston correctly will not survive the first month on a vol desk.

Model assumptions (restated for calibration context):

  • Under the risk-neutral measure Q\mathbb{Q}, the joint dynamics of StS_t and vtv_t are: dSt=rStdt+vtStdWt1dS_t = r S_t\,dt + \sqrt{v_t}\,S_t\,dW_t^1 dvt=κ(vˉvt)dt+ξvtdWt2dv_t = \kappa(\bar{v} - v_t)\,dt + \xi\sqrt{v_t}\,dW_t^2 with dW1,W2t=ρdtd\langle W^1, W^2 \rangle_t = \rho\,dt.
  • κ>0\kappa > 0 (mean reversion speed), vˉ>0\bar{v} > 0 (long-run variance), v0>0v_0 > 0 (initial variance), ξ>0\xi > 0 (vol of vol), ρ(1,1)\rho \in (-1, 1) (correlation).
  • Feller condition: 2κvˉξ22\kappa\bar{v} \ge \xi^2 ensures vt>0v_t > 0 a.s.\ In practice, calibrated parameters often violate this; the process can still be used but the vol process may touch zero.
  • No dividends; continuous compounding at rate rr.
  • Market data: a grid of NN implied vols σijmkt\sigma_{ij}^{\text{mkt}} at strikes KiK_i and expiries TjT_j, reported in Black-Scholes implied vol (log-normal convention, annualised, in decimal).

Theory

The Heston Characteristic Function

The key analytic result of Heston (1993) is a semi-analytic expression for the characteristic function of ln(ST/S0)\ln(S_T/S_0):

THEOREM

Theorem 4.1 (Heston Characteristic Function — Albrecher et al. 2007 stable form). For the Heston model, the characteristic function of XT=ln(ST/S0)X_T = \ln(S_T/S_0) under Q\mathbb{Q} is:

ϕ(u)=EQ ⁣[eiuXT]=exp ⁣(iurτ+A(u,τ)+B(u,τ)v0)\phi(u) = \mathbb{E}^{\mathbb{Q}}\!\left[e^{iuX_T}\right] = \exp\!\left(iur\tau + A(u,\tau) + B(u,\tau)\,v_0\right)

where τ=T\tau = T (time to expiry), and:

d=(κρξiu)2+ξ2(iu+u2)d = \sqrt{(\kappa - \rho\xi iu)^2 + \xi^2(iu + u^2)} g=κρξiudκρξiu+dg = \frac{\kappa - \rho\xi iu - d}{\kappa - \rho\xi iu + d} A(u,τ)=κvˉξ2[(κρξiud)τ2ln ⁣1gedτ1g]A(u,\tau) = \frac{\kappa\bar{v}}{\xi^2} \left[(\kappa - \rho\xi iu - d)\tau - 2\ln\!\frac{1 - g\,e^{-d\tau}}{1 - g}\right] B(u,τ)=κρξiudξ21edτ1gedτB(u,\tau) = \frac{\kappa - \rho\xi iu - d}{\xi^2}\cdot\frac{1 - e^{-d\tau}}{1 - g\,e^{-d\tau}}

The Albrecher (2007) form is used rather than the original Heston (1993) form because it avoids the discontinuous branch of the complex logarithm that causes numerical instability in the original expression when ρ\rho is large or TT is long.

WARNING

Warning — Branch Cut. The original Heston (1993) formula computes AA using ln(1gedτ)\ln(1 - ge^{-d\tau}). The complex logarithm is multi-valued; the branch cut causes discontinuities in the integrand as a function of uu, leading to numerical integration errors. The Albrecher form avoids this by rewriting the logarithm in terms of gg. Always use the Albrecher stable branch for production implementation.

Option Pricing via the Lewis Formula

THEOREM

Theorem 4.2 (Lewis 2000 Call Price Formula). For a European call with strike KK, expiry TT, F=S0erτF = S_0 e^{r\tau} (the forward), and log-moneyness k=ln(F/K)k = \ln(F/K):

C(K,T)=S0FKerτπ0Re ⁣[eiukϕ(ui/2)u2+1/4]duC(K, T) = S_0 - \frac{\sqrt{FK}\,e^{-r\tau}}{\pi} \int_0^\infty \mathrm{Re}\!\left[\frac{e^{-iuk}\,\phi(u - i/2)}{u^2 + 1/4}\right] du

Interpretation: The integral is over real u[0,)u \in [0, \infty). The integrand is smooth and decays for large uu (for well-behaved characteristic functions). Numerical integration via Gauss-Laguerre quadrature or adaptive Simpson's rule on [0,Umax][0, U_{\max}] with Umax500U_{\max} \sim 50010001000 is standard.

REMARK

Remark. The Lewis formula has the integrand evaluated at ui/2u - i/2 (a shift of i/2-i/2 into the complex plane). This shift is chosen so the integrand eiukϕ(ui/2)/(u2+1/4)e^{-iuk}\phi(u-i/2)/(u^2+1/4) decays at large u|u| for both call and put pricing. The factor 1/(u2+1/4)1/(u^2+1/4) appears because C=E[ST1ST>K]KerτE[1ST>K]C = E[S_T\mathbf{1}_{S_T > K}] - Ke^{-r\tau} E[\mathbf{1}_{S_T > K}], and each expectation contributes a factor that combines into this denominator.

Implied vol from Heston price: Given the Heston call price CH(K,T;θ)C^H(K,T;\theta), invert to Black-Scholes implied vol using Newton-Raphson: σ(n+1)=σ(n)CBS(σ(n))CHV(σ(n))\sigma^{(n+1)} = \sigma^{(n)} - \frac{C^{\text{BS}}(\sigma^{(n)}) - C^H}{\mathcal{V}(\sigma^{(n)})}

One or two Newton iterations from the seed σ(0)=2ln(K/F)/T\sigma^{(0)} = \sqrt{2|\ln(K/F)|/T} (Brenner-Subrahmanyam) typically suffice.

The Calibration Objective

DEFINITION

Definition 4.1 (Heston Calibration Problem). Given market implied vols {σijmkt}i=1Mj=1N\{\sigma_{ij}^{\text{mkt}}\}_{i=1}^{M}\,_{j=1}^{N} at strikes {Ki}\{K_i\} and expiries {Tj}\{T_j\}, the Heston calibration problem is:

θ=argminθΘi=1Mj=1Nwij2[σijmktσijHeston(θ)]2\theta^* = \arg\min_{\theta \in \Theta} \sum_{i=1}^{M}\sum_{j=1}^{N} w_{ij}^2 \left[\sigma_{ij}^{\text{mkt}} - \sigma_{ij}^{\text{Heston}}(\theta)\right]^2

with θ=(κ,vˉ,ξ,ρ,v0)\theta = (\kappa, \bar{v}, \xi, \rho, v_0) and feasible set Θ={θ:κ>0,vˉ>0,v0>0,ξ>0,ρ<1}\Theta = \{\theta : \kappa > 0,\, \bar{v} > 0,\, v_0 > 0,\, \xi > 0,\, |\rho| < 1\}.

Optional Feller constraint: add 2κvˉξ22\kappa\bar{v} \ge \xi^2 to Θ\Theta.

Weighting scheme: Use vega weights wij=VijBS/Vˉw_{ij} = \mathcal{V}_{ij}^{\text{BS}} / \bar{\mathcal{V}} where VijBS=STjn(d+)\mathcal{V}_{ij}^{\text{BS}} = S\sqrt{T_j}\,n(d_+) is the Black-Scholes vega at the market ATM vol. This ensures that calibration errors are measured in price-space equivalents, not raw vol-space, correctly down-weighting illiquid deep OTM wings.

The Jacobian of the Heston Objective

The Jacobian entries are:

Jij,k=σijHestonθkJ_{ij,k} = -\frac{\partial \sigma_{ij}^{\text{Heston}}}{\partial \theta_k}

For parameter θk=ξ\theta_k = \xi (vol of vol), the derivative of the Heston implied vol with respect to ξ\xi requires differentiating through: (i) the characteristic function ϕ\phi, (ii) the Lewis integral, and (iii) the Newton inversion of the Black-Scholes formula. By the chain rule and implicit function theorem:

σHθk=1VBS(σH)CHθk\frac{\partial \sigma^H}{\partial \theta_k} = \frac{1}{\mathcal{V}^{\text{BS}}(\sigma^H)} \cdot \frac{\partial C^H}{\partial \theta_k}

where CH/θk\partial C^H / \partial \theta_k is computed by differentiating the Lewis integral with respect to θk\theta_k — this enters the integrand through ϕ(ui/2;θ)\phi(u-i/2; \theta).

In practice, these Jacobian entries are computed by central finite differences on θk\theta_k.

Calibration Diagnostics

A calibrated parameter set θ\theta^* must be validated before being used for pricing:

DEFINITION

Definition 4.2 (Calibration Diagnostics). After calibration, compute:

  1. Root mean square error (RMSE): RMSE=L(θ)2/N\text{RMSE} = \sqrt{\mathcal{L}(\theta^*) \cdot 2/N}. Target: below 1 vol point (0.01 in decimal vol space) for liquid instruments.

  2. Max absolute error: maxijσijmktσijH(θ)\max_{ij}|\sigma_{ij}^{\text{mkt}} - \sigma_{ij}^H(\theta^*)|. Flag any single instrument with error >2> 2 vol points.

  3. Feller ratio: 2κvˉ/ξ22\kappa\bar{v}/\xi^2. If <1< 1, the variance process may touch zero.

  4. Parameter stability: re-run from 5 different starting points. If θ\theta^* changes significantly, the calibration is in a flat region or has multiple local minima.

  5. Term structure of ATM vol: compare model ATM vol σATMH(T)\sigma_{\text{ATM}}^H(T) to market ATM vol at each expiry. Large ATM misfit signals a fundamental term-structure mismatch.

Local Optima and Initialisation

The Heston objective has multiple local minima, particularly in the (κ,vˉ)(\kappa, \bar{v}) subspace (high mean reversion + high long-run vol is similar in effect to low mean reversion

  • low long-run vol over short horizons). Standard initialisation strategies:
  1. Grid search: evaluate L\mathcal{L} on a coarse grid of θ\theta values; take the best as the starting point for LM. Typical grid: κ{0.5,1,2,4}\kappa \in \{0.5, 1, 2, 4\}, vˉ{0.02,0.04,0.08}\bar{v} \in \{0.02, 0.04, 0.08\}, v0=vˉv_0 = \bar{v}, ρ{0.7,0.4,0.1}\rho \in \{-0.7, -0.4, -0.1\}, ξ{0.3,0.6,1.0}\xi \in \{0.3, 0.6, 1.0\} — 432 grid points; each requires one full surface evaluation.

  2. Moment matching: set v0v_0 = variance of short-dated ATM implied vol2^2; vˉ\bar{v} = long-dated ATM variance; κ\kappa from term structure slope; ρ\rho from ATM skew slope; ξ\xi from smile curvature. These give analytic guesses for a flat start.

  3. Previous day's parameters: for intraday or day-over-day recalibration, warm-start from the prior calibration. Converges in 3–10 iterations for small market moves.

EXAMPLE

Example 4.1 (Heston Parameter Interpretation). For θ=(κ=1.5,vˉ=0.04,ξ=0.4,ρ=0.7,v0=0.03)\theta^* = (\kappa=1.5,\, \bar{v}=0.04,\, \xi=0.4,\, \rho=-0.7,\, v_0=0.03):

  • vˉ=0.04\bar{v} = 0.04 \Rightarrow long-run vol =0.04=20%= \sqrt{0.04} = 20\%.
  • v0=0.03v_0 = 0.03 \Rightarrow spot vol =0.0317.3%= \sqrt{0.03} \approx 17.3\%. The market is currently below long-run vol; variance will revert upward.
  • κ=1.5\kappa = 1.5 \Rightarrow half-life =ln2/κ0.46= \ln 2 / \kappa \approx 0.46 years (about 6 months).
  • ρ=0.7\rho = -0.7 \Rightarrow negative correlation → negative skew → downside puts more expensive than upside calls. Consistent with equity smiles.
  • ξ=0.4\xi = 0.4 \Rightarrow significant vol of vol → pronounced short-dated smile curvature.
  • Feller: 2×1.5×0.04=0.12(0.4)2=0.162 \times 1.5 \times 0.04 = 0.12 \ge (0.4)^2 = 0.16? No — Feller is violated. The variance process may reach zero. Numerically this produces a floor at v=0v = 0 (full-truncation Euler in MC) but can cause integration issues.

Validation

The companion notebook implements the full Heston calibration pipeline:

  1. The Albrecher characteristic function evaluated at test parameters.
  2. The Lewis formula integrand plotted (via print output) and the call price verified against a known benchmark.
  3. Implied vol inversion via Newton-Raphson with convergence check.
  4. Generation of a synthetic Heston vol surface.
  5. Calibration to the synthetic surface using scipy.optimize.least_squares (LM backend).
  6. Verification that calibrated parameters recover the true parameters to within 10310^{-3}.
  7. Calibration diagnostics: RMSE, max error, Feller ratio.
PRACTICE

Before opening the notebook: For Heston parameters (κ=2,vˉ=0.04,ξ=0.5,ρ=0.6,v0=0.04)(\kappa=2, \bar{v}=0.04, \xi=0.5, \rho=-0.6, v_0=0.04), r=0.05r=0.05, T=1T=1: (a) Compute dd at u=1u = 1 (real part of the characteristic function argument). (b) State whether the Feller condition is satisfied. (c) Write down the Lewis integrand at u=1u=1, k=0k = 0 (ATM). What simplification occurs?


Limitations

WARNING

Warning — Smile Explosions at Short Dates. Heston produces an implied vol smile that is regular at short maturities (smile curvature ξ2T\sim \xi^2 T for small TT). Observed equity and FX smiles for sub-1-month expiries are much steeper. Calibrating Heston to short-dated options forces ξ\xi to be unrealistically large, distorting the term structure. For short-dated options, rough volatility models (e.g. rough Heston with Hurst parameter H<1/2H < 1/2) or jump models are necessary.

WARNING

Warning — κ\kappa and vˉ\bar{v} Identification. The Heston model has a near-flat objective valley along the line κvˉ=const\kappa \bar{v} = \text{const} (both parameters contribute to the long-run variance). This makes κ\kappa and vˉ\bar{v} separately poorly identified from a single snapshot of the vol surface. Calibrating a time series of surfaces and applying regularisation on parameter changes is the standard fix.

Other limitations:

  • Negative rates: Standard Heston requires St>0S_t > 0. For negative interest rate products (swaptions, where the forward swap rate can be negative), use the displaced Heston or Bachelier-Heston variant.
  • Jump risk: Heston does not include jumps. Market smiles show a jump risk premium (extra vol for out-of-the-money puts) that Heston cannot reproduce without distorting the ATM term structure.
  • Term structure flexibility: One set of 5 global Heston parameters calibrates to the full surface. For a surface with an unusual term structure (e.g., inverted VIX curve), a single Heston often cannot fit all expiries simultaneously. Solution: piecewise-constant (per-expiry) Heston parameters.
  • Numerical integration precision: The Lewis integral with standard Gaussian quadrature requires O(200)O(200) quadrature nodes for 6-digit accuracy. The integration limit UmaxU_{\max} must be large enough to capture the tail of the integrand; for ξ\xi large, Umax=1000U_{\max} = 1000 may be insufficient.

Interview Angle

PRACTICE

L1 (Junior) — Typical questions:

  1. What are the five Heston parameters and what does each control? Expected: κ\kappa (mean reversion), vˉ\bar{v} (long-run variance), ξ\xi (vol of vol), ρ\rho (correlation, controls skew), v0v_0 (initial variance = spot vol squared).

  2. Why is the Heston model preferred over Black-Scholes for vol surface calibration? Expected: BS has flat smile (one vol per expiry); Heston generates a smile with skew and curvature via stochastic vol. Calibrates to the surface, not a single point.

  3. What is the Feller condition? Does violating it cause a problem in practice? Expected: 2κvˉξ22\kappa\bar{v} \ge \xi^2 keeps vt>0v_t > 0 a.s. Violation is common in calibrated parameters. In MC, handled by full truncation. Numerically, the variance process may hit zero and need flooring. Not always a fatal problem but must be noted.

PRACTICE

L2 (Senior) — Typical questions:

  1. Explain the Lewis formula for option pricing under Heston. Why is numerical integration needed rather than a closed-form expression? Expected: characteristic function of lnST\ln S_T is available in closed form; the call price requires inverting it (Fourier inversion). The inversion integral has no closed form → numerical quadrature. Describe the integrand, the integration range, and a numerical method (e.g., Gauss-Laguerre or adaptive Simpson).

  2. Why does the Heston calibration objective have multiple local minima? How do you handle this in production? Expected: non-convex NLS; parameters interact (especially κ\kappa-vˉ\bar{v} and ξ\xi-ρ\rho). Handle via grid search for initialisation + LM refinement, or warm-start from prior day's parameters.

  3. Describe the calibration diagnostics you would run after a Heston calibration. What would you consider a failed calibration? Expected: RMSE, max error, Feller check, parameter stability across starting points, ATM term structure fit. Failure: RMSE >2> 2 vol points, parameters at bounds, gradient norm large at "convergence", or parameters changing dramatically on re-run.

PRACTICE

L3 (Researcher) — Typical questions:

  1. Explain the difference between the original Heston characteristic function and the Albrecher stable form. What is the source of numerical instability in the original form? Expected: original form computes ln(1gedτ)\ln(1 - g e^{-d\tau}); the complex logarithm has a branch cut at the negative real axis, causing discontinuities in the integrand. Albrecher avoids this by expressing the same quantity without a ln\ln of a complex exponential. Detailed derivation expected at L3.

  2. Under what conditions is Heston not appropriate for hedging (as opposed to pricing)? Expected: Heston is a stochastic vol model — it has two risk factors (StS_t and vtv_t) but only one liquid hedging instrument (the underlying). The market is incomplete under Heston; the vol risk premium is not uniquely specified from no-arbitrage alone. For hedging, need to make assumptions about the market price of vol risk λ(t,vt)\lambda(t, v_t). Different choices of λ\lambda produce different hedge ratios — a fundamental ambiguity that Black-Scholes does not have.

  3. How would you extend the Heston calibration to a time-inhomogeneous (piecewise-constant) setting to better fit the term structure? Expected: allow κ(Tj)\kappa(T_j), vˉ(Tj)\bar{v}(T_j) to be piecewise constant in time. The characteristic function extends to the time-inhomogeneous case via the Riccati ODE formulation (the AA and BB functions satisfy a system of ODEs that can be integrated numerically per expiry slice). The calibration then proceeds expiry-by-expiry, significantly increasing the number of parameters.