Skip to content
All library documents

Why a Heston Barrier Engine Needs Leverage Calibration for Local Volatility

Article Quant Q&A · Author: user35980

Summary

The document explains why supplying a local volatility surface to QuantLib’s Heston barrier engine does not automatically make it reproduce local volatility prices. The engine combines the asset diffusion with a stochastic Heston variance process and a leverage function. The supplied surface is used as the leverage input, but it is not by itself the calibrated leverage function required by a stochastic local volatility model.

For a calibrated SLV model, leverage must be chosen so that its squared value times the conditional expected variance at a given spot and time matches the squared local volatility. Without that calibration, setting the mixing factor to zero leaves the Heston variance component in the asset’s instantaneous variance, so the local volatility result need not follow. The answer describes a degenerate parameter choice that removes stochastic variance and recovers local volatility directly. It also notes that general SLV calibration typically requires an iterative method, such as one based on the Fokker–Planck equation; the discussion is specific to the engine setup described.

Key ideas

  • The engine’s local volatility surface input acts as a leverage function, not automatically as calibrated local volatility.
  • SLV calibration matches local variance using conditional expected Heston variance.
  • Zeroing the mixing factor alone does not remove the remaining stochastic variance contribution.
  • A trivial reduction to local volatility is possible by fixing variance at one and removing its dynamics.
  • General leverage calibration may require an iterative Fokker–Planck approach.

Tags

Full text
# FdHestonBarrierEngine in quantlib


# FdHestonBarrierEngine in quantlib












I've been looking at Quantlib's `FdHestonBarrierEngine` fed with a well-behaved local vol surface. Just wanted to clarify something: is this is a proper local stochastic vol (LSV) implementation for Heston?

From the code it seems to be applying a leverage function (presumably extracted from the supplied local vol surface) on the stochastic term in the diffusion. But with mixing factor set to 0.0 I would expect this to match the local vol pricing from `FdBlackScholesBarrierEngine` for instance, but it doesn't. Anyone else explored this?

The parameters seem too sparse for this to be a "sincere" LSV (calibration via FD on Fokker-Planck would likely be more a more involved process). So I just wanted to be sure about what exactly this engine is doing when used in the aforementioned manner.

## Answer by user35980 (score 2)

https://quant.stackexchange.com/a/84077

Ok, so it seems this engine is essentially an "uncalibrated" LSV implementation. More precisely, the diffusion is $$dS_t = (r-q)S_t dt + L(S_t,t)\,\sqrt{\nu_t}\,S_t\,dW_t^S$$ with $\nu_t$ following standard Heston dynamics:$$d\nu_t = \kappa(\theta - \nu_t)dt + \eta \,\sigma \sqrt{\nu_t}\, dW_t^\nu$$ along with the mixing factor $\eta\in[0,1]$. The catch is the leverage function $L(S_t,t)$: the engine takes this argument as a local vol surface but it's not the local vol itself - therein lies the confusion. In SLV theory the leverage function must satisfy the calibration condition $$L^2(S,t)\,\mathbb{E}[\nu_t \mid S_t = S] = \sigma^2_{\text{local}}(S,t).\tag{1}$$ Setting $\eta=0$ without calibrating $L(S,t)$ the effective instantaneous variance becomes $$L^2(S,t)\,\nu_t\neq\sigma^2_{\text{local}}(S,t)$$ since we have an uncalibrated (albeit deterministic, mean reverting but non-constant) $\nu_t$ from Heston left over.

With no parameters to calibrate (1) in this set-up, the only choice we have to recover local vol pricing is to kill the Heston dynamics in the diffusion entirely i.e. set $\nu_t=1$, $\kappa=0$, $\theta=1$, $\sigma=0$, $\rho=0$. Then the leverage function satisfies (1) trivially and the engine reduces to the local vol diffusion $$dS_t = (r-q)S_t dt + \sigma_{\text{local}}(S_t,t)\,S_t\,dW_t.$$ In summary, the calibration (1) is the key step for a proper SLV implementation (usually done via a Fokker-Planck method) to find an iterative solution for $L(S_t,t)$ for arbitrary $\nu_t$ so that local vol is recovered (and not just for the trivial case of $\nu_t=1$). This crucial step is not present in this engine.

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.