Andersen QE Scheme For Heston
A clever trick for simulating the Heston stochastic-volatility model on a computer without the variance path going negative or blowing up, by approximating its true, messy distribution with a simpler one that matches its moments.
The Heston model describes an asset's variance as itself randomly wandering over time, mean-reverting around a long-run level. The problem: naively simulating this variance process step by step (Euler discretization) regularly produces negative variance, which is meaningless — you can't have negative volatility-squared — and standard fixes like flooring it at zero introduce their own bias.
The quadratic-exponential (QE) scheme, introduced by Leif Andersen, sidesteps this by not simulating the exact, awkward distribution of next-period variance at all. Instead, at each time step it matches the first two moments (mean and variance) of the true distribution and substitutes a simpler, always-positive stand-in: a squared Gaussian when variance is relatively high, and a distribution with a point mass at zero mixed with an exponential tail when variance is low (where the true distribution's shape gets highly skewed and hard to approximate with a smooth curve). Switching between the two regimes based on a moment-matching threshold is exactly what makes the scheme "quadratic-exponential."
The payoff is large step sizes with much less bias than naive Euler discretization: a QE-simulated Heston path can use, say, 20 time steps a year and stay close to the true option price, where a naive scheme might need hundreds of steps and still misprice deep-in-the-money options due to leftover negative-variance truncation bias.
The Andersen QE scheme simulates Heston variance by matching moments to a simple, always-positive substitute distribution (Gaussian-squared or exponential-with-a-point-mass) rather than sampling the true distribution exactly — this eliminates negative-variance issues and lets simulations use far fewer time steps for the same accuracy.
Further reading
- Andersen, Efficient Simulation of the Heston Stochastic Volatility Model, 2008