Pricing with the H-expansion¶
The H-expansion approximates the log characteristic function as a Taylor series in \(\Delta H = H - H_0\) around an anchor \(H_0\):
where the coefficients \(f_n\) are obtained by differentiating the Riccati–Volterra equation recursively. At order \(N = 0\) the result equals the quasi-exact benchmark. Higher orders extend the valid range of \(|\Delta H|\).
Anchor at \(H_0 = 0\) ("root_pade" base)¶
Useful when pricing across a range of small \(H\) values.
# Anchor at H₀ = 0, target H = 0.1
param_anchor0 = RoughHestonParam(
lam=0.3, theta=0.3*0.02, nu=0.3, rho=-0.7, V0=0.02,
H=0.0, # anchor H₀ = 0
)
model_expansion = RoughHeston(
param_anchor0, riskfree=0.0, base_solution="root_pade"
)
ivs_N4 = model_expansion.eur_call_put(
K=K,
maturity=T,
implied_vol=True,
expansion_order=4, # 4th-order Taylor in H
H=0.1, # evaluate at this target H
L=200.0,
)
Anchor at \(H_0 = \tfrac{1}{2}\) ("exact_heston" base)¶
Useful near the classical Heston regime.
param_half = RoughHestonParam(
lam=0.3, theta=0.3*0.02, nu=0.3, rho=-0.7, V0=0.02,
H=0.5, # anchor: classical Heston
)
model_half = RoughHeston(
param_half, riskfree=0.0, base_solution="exact_heston"
)
ivs_N2 = model_half.eur_call_put(
K=K,
maturity=T,
implied_vol=True,
expansion_order=2, # 2nd-order Taylor in H around ½
H=0.4, # evaluate at H = 0.4
L=200.0,
)
Pricing across multiple \(H\) values¶
Pass an array to H to price all values simultaneously. The expensive Volterra fields are computed once and shared:
H_values = np.array([0.05, 0.1, 0.15, 0.2])
# Returns shape (N_K, N_H)
ivs_grid = model_expansion.eur_call_put(
K=K,
maturity=T,
implied_vol=True,
expansion_order=4,
H=H_values,
L=200.0,
)
print(ivs_grid.shape) # (5, 4)
Choosing expansion order¶
| Order \(N\) | Truncation error | Cost |
|---|---|---|
| 0 | \(\mathcal{O}(\Delta H)\); the base solution itself at \(H = H_0\) | baseline |
| 1 | \(\mathcal{O}(\Delta H^2)\) | \(+1\) Volterra solve |
| 2 | \(\mathcal{O}(\Delta H^3)\) | \(+2\) solves |
| 4 | \(\mathcal{O}(\Delta H^5)\) | \(+4\) solves |
Accuracy¶
The error depends on \(|\Delta H|\), the maturity, how far out of the money the strikes are, and the model parameters. We compared order 4 from an anchor at \(H_0 = 0\) ("root_pade" base, library defaults) with a converged direct solve at the target \(H\), on 18 parameter sets. Largest implied-vol error over strikes within two standard deviations of the forward, \(\lvert\log(K/F)\rvert \le 2\sqrt{V_0 T}\), for the 15 sets with \(\rho \ge -0.7\):
| \(\lvert\Delta H\rvert\) | 1 day | 1 week | 1 month | 3 months | 1 year | 5 years |
|---|---|---|---|---|---|---|
| 0.05 | 0.6 bp | 0.3 bp | 0.2 bp | 0.2 bp | 0.1 bp | 0.06 bp |
| 0.1 | 30 bp | 3 bp | 0.3 bp | 0.2 bp | 0.1 bp | 0.06 bp |
| 0.2 | fails | 170 bp | 15 bp | 4.5 bp | 0.2 bp | 0.1 bp |
("fails": some prices come out invalid.)
- Strikes further out are harder at short maturities. At one week and \(\lvert\Delta H\rvert = 0.1\), the largest error is 0.7 bp within one standard deviation, 3 bp within two and 48 bp within three. At one and two years it stays below 0.4 bp out to three standard deviations.
- Steep skews (\(\rho \le -0.9\)) raise the largest error to about 2–10 bp from one month to one year. Most of that is the root-Padé base: with
base_solution="direct_riccati"it stays below 1 bp for \(\lvert\Delta H\rvert \le 0.1\). - Targets above the anchor are harder than targets below it at short maturities: at one day, \(H = 0.1\) gives 30 bp and \(H = -0.1\) gives 8 bp.
- At a week or less with \(\lvert\Delta H\rvert \gtrsim 0.1\), price at the target directly (anchor at the target, order 0).
eur_call_put checks its own accuracy and warns (UserWarning) when the estimated implied-vol error exceeds accuracy_tol (default 1 bp) at a strike whose out-of-the-money price is at least \(10^{-6} S_0\). The returned values do not change.
- H-expansion (\(N \ge 1\)): it also computes order \(N+1\) and takes the change of the implied vols at the lowest and the highest target \(H\). On the same sets and maturities (orders 1–3, from \(H_0 = 0\) with the implicit-\(\pi\) base and from \(H_0 = \tfrac12\) with exact Heston; 4158 smile–order cases) the estimate was within 0.76–1.18 times the true error for 80 % of the cases above 1 bp. It missed 21 of the 2247 cases above 1 bp, by at most 1.7 bp, and warned on 10 of the 1911 below.
- Padé bases away from \(H_0 = \tfrac12\): it compares the two
log_cf_integrandformulas at the anchor. Both are exact for the exact Riccati solution, and"rhs"amplifies the error of an approximate one, so they differ by about the error of"rhs". With"root_pade"the default"solution"is 3–10 times more accurate than that difference, so there the check uses a third of it. On 756 root-Padé smiles it warned on 25 of the 26 above 1 bp (it missed one at 1.4 bp) and on 11 of the 730 below.
The check adds about 10–35 % run time. accuracy_check=False turns it off.