Skip to main content

Module heston

Module heston 

Source
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 dt

Semi-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 (full-truncation Euler; the Andersen QE scheme is the planned upgrade).

Structs§

HestonParams
Heston parameters. theta is the long-run variance, v0 the initial variance, vol_of_vol the volatility of variance (often written xi or sigma), rho the spot-variance correlation.

Functions§

analytic_delta
analytic_gamma
analytic_npv
analytic_rho
analytic_theta
analytic_vega
Sensitivity to a parallel shift of the instantaneous and long-run vol.
heston_binary_asset_price
Semi-analytic Heston price of an asset-or-nothing binary (S e^{-qT} P1 for 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.