Reproducing the paper¶
The numerical results in Section 4 of Hager & Kreher (2026, arXiv:2606.16619v1) were computed with the code as of June 2026. Version 0.1.0 refines that code and changes its defaults (see the changelog). Only one of these changes affects the published numbers, and only slightly. Around \(H_0 = \tfrac12\) the linearised equations of the expansion have an exponential kernel, which 0.1.0 integrates exactly; the earlier code used the trapezoidal rule. This moves the smiles of Figure 2 with \(N \ge 1\) by up to \(1.4 \cdot 10^{-5}\) in implied volatility, and it changes Table 1 at \((H, T, N) = (0.2, 0.019, 4)\) from 0.3965 to 0.3966.
To reproduce the published numbers exactly, install commit 320dfd9 in a separate environment. It is version 0.0.1 with its import error fixed.
pip install "git+https://github.com/hagerpa/roughprix@320dfd9792f8f2b32a1e85ef66309440e37a7f35"
With the paper's parameters and strikes, these calls reproduce Figures 2 and 3:
import numpy as np
from dataclasses import replace
from roughprix import RoughHeston, RoughHestonParam
param = RoughHestonParam(lam=0.3, theta=0.3*0.02, nu=0.3, rho=-0.7, V0=0.02, H=0.5)
T = 0.083 # 0.019, 0.083, 0.25 or 1
K = np.exp(np.sqrt(T) * np.linspace(-1.0, 0.5, 76)) # S_0 = 1, r = 0
pricing = dict(implied_vol=True, integration="adaptive_panel",
adaptive_L_candidates=[110, 150, 200, 270, 350, 500, 700, 1000])
# Benchmark at each target H: implicit product integration with 2000 steps
bench = RoughHeston(replace(param, H=0.2), 0.0, base_solution="direct_riccati",
direct_riccati_solver="implicit_pi")
iv_bench = bench.eur_call_put(K, T, R=0.5, time_steps=2000, time_grid="uniform",
adaptive_tol=1.5e-4, **pricing)
# Expansion around H0 = 1/2 (Figure 2)
half = RoughHeston(replace(param, H=0.5), 0.0, base_solution="exact_heston")
iv_half = half.eur_call_put(K, T, H=[0.2, 0.3, 0.4], expansion_order=4, R=0.5,
time_steps=500, time_grid="symmetric_graded", **pricing)
# Expansion around H0 = 0 (Figure 3): root-Padé of degree 7 with tail matching
zero = RoughHeston(replace(param, H=0.0), 0.0, base_solution="root_pade",
root_pade_degree=7, root_pade_tail_match=True)
iv_zero = zero.eur_call_put(K, T, H=[-0.3, -0.2, -0.1, 0.0, 0.1, 0.2], expansion_order=4,
R=0.5, time_steps=500, time_grid="symmetric_graded", **pricing)
- Tables 1 and 2 price the expansions with
R=1.2instead ofR=0.5, and Table 2 also usesroot_pade_tail_match=False. The benchmark is the same. - Price all target \(H\) of a figure in one call, as above. The adaptive loop then raises the cutoff until the implied vols at all of them have converged.
- Figure 1 uses the root-Padé base of degree 7 without tail matching at both expansion points, \(H_0 = 0\) and \(H_0 = \tfrac12\):
u = np.linspace(1, 300, 300)
z = 0.5 - 1j * u # R - iu with R = 1/2
fbar = {}
for H0 in (0.0, 0.5):
model = RoughHeston(replace(param, H=H0), 0.0, base_solution="root_pade",
root_pade_degree=7, root_pade_tail_match=False)
state = model.expansion_state(-1j * z, maturity=1.0, order=12, # order=20 for R*
time_steps=500, time_grid="graded", return_lists=True)
# max over the time grid of |d^n/dH^n psi(t; H0, z)|, n = 0, ..., 12
fbar[H0] = [np.abs(np.asarray(f.values)).max(axis=-1) for f in state.f_list]
With commit 320dfd9 these calls reproduce all 64 table entries in all printed digits. They reproduce the smiles of Figures 2 and 3 to \(10^{-8}\) in implied volatility, the precision of the published figures, and the data of Figure 1 to \(10^{-14}\).
With version 0.1.0 or later, add log_cf_integrand="rhs" to each RoughHeston(...). Otherwise roughprix uses another formula for the log characteristic function at anchors \(H_0 \neq \tfrac12\), which includes the benchmark. The results then agree with the published numbers to the same precision, apart from the change above. Many of these calls then warn, either from the accuracy check or because the cutoff reaches 1000 without meeting adaptive_tol (mostly at \(T \le 0.083\)). The warnings do not change the values.