Expand description
Heston (1993) stochastic volatility model.
Dynamics under the risk-neutral measure:
dS = (r - q) S dt + sqrt(v) S dW_s
dv = kappa (theta - v) dt + vol_of_vol * sqrt(v) dW_v, d<W_s, W_v> = rho dtSemi-analytic pricing uses the characteristic function in the
“little Heston trap” formulation (Albrecher et al. 2007), which is
branch-cut stable under the principal complex logarithm, integrated
with composite Simpson. Vanilla calls/puts and both binary types come
from the same two probabilities:
call = S e^{-qT} P1 - K e^{-rT} P2, cash-or-nothing = e^{-rT} P2,
asset-or-nothing = S e^{-qT} P1.
Monte Carlo simulation lives in the Monte Carlo engine through
HestonProcess: Andersen
QE with martingale correction by default, full-truncation Euler on
request.
Structs§
- Heston
Fit - Calibration outcome: fitted parameters plus fit diagnostics.
- Heston
Params - Heston parameters.
thetais the long-run variance,v0the initial variance,vol_of_volthe volatility of variance (often written xi or sigma),rhothe spot-variance correlation. - Heston
Quote - One vanilla market quote for calibration.
Functions§
- analytic_
npv - calibrate
- Calibrate Heston parameters to European vanilla quotes.
- cos_
smile - Price a whole strike strip in one COS pass: the characteristic
function is swept once for the expiry and every strike reuses it, so
a 20-strike smile costs about the same as one option. Agrees with
heston_price(the independent P1/P2 integration oracle) to ~1e-6. - heston_
binary_ asset_ price - Semi-analytic Heston price of an asset-or-nothing binary
(
S e^{-qT} P1for a call). - heston_
binary_ cash_ price - Semi-analytic Heston price of a cash-or-nothing binary
(
cash * e^{-rT} * P(S_T beyond K)). - heston_
price - Semi-analytic Heston price of a European vanilla option.