Skip to content

roughprix

European option prices in the rough Heston model, by Fourier inversion, with a Taylor expansion in the Hurst exponent \(H\).

Get started Paper GitHub

  • Fast Fourier pricing


    A smile of nine strikes in about 40 to 80 ms, with JAX-compiled Riccati solvers.

  • Expansion in \(H\)


    Price many Hurst exponents from one anchor solve: the coefficients come from linear Volterra equations.

  • Closed-form bases


    Exact Heston at \(H = \tfrac12\), and a tail-matched root-Padé approximation for rough \(H\).

  • Checked accuracy


    Default prices within 0.003 bp of 72 reference smiles; a built-in check warns when an approximation is off.

Installation

pip install roughprix

or, from a clone of the repository, pip install -e ..

Requires Python ≥ 3.10, NumPy, SciPy, JAX, and Numba.

Quick start

import numpy as np
from roughprix import RoughHeston, RoughHestonParam

param = RoughHestonParam(
    lam=0.3,        # mean-reversion speed λ
    theta=0.3*0.02, # drift constant θ; long-run variance θ/λ = 0.02
    nu=0.3,         # vol-of-vol ν
    rho=-0.7,       # spot–vol correlation ρ
    V0=0.02,        # initial variance V₀
    H=0.1,          # Hurst exponent H
)

model = RoughHeston(param, riskfree=0.0)

K = np.array([0.8, 0.9, 1.0, 1.1, 1.2])
T = 1.0

Continue with Pricing and the H-expansion.

Model

The spot \(S\) and instantaneous variance \(V\) satisfy

\[ \frac{dS_t}{S_t} = \sqrt{V_t}\, dW_t, \]
\[ V_t = V_0 + \frac{1}{\Gamma(H+\tfrac{1}{2})} \int_0^t (t-s)^{H-\tfrac{1}{2}} \Bigl[(\theta - \lambda V_s)\, ds + \nu\sqrt{V_s}\, dB_s\Bigr], \]
\[ d\langle W, B\rangle_t = \rho\, dt, \]

where \(H \in (-\tfrac{1}{2}, \tfrac{1}{2}]\) is the Hurst exponent. \(H = \tfrac{1}{2}\) recovers classical Heston.

The coefficients are raw: \(\theta\) is the drift constant, and the long-run variance is \(\theta/\lambda\). For the usual form \(\kappa(\bar v - V_s)\), set \(\lambda = \kappa\) and \(\theta = \kappa \bar v\).

Methods implemented

Method base_solution Description
Adams–PECE "direct_riccati" Fractional Adams predictor–corrector (El Euch & Rosenbaum 2019); high accuracy, \(\mathcal{O}(J^2)\) in time steps
Implicit-\(\pi\) "direct_riccati" Product-integration implicit solver; the default away from \(H = \tfrac{1}{2}\), more stable than Adams for small \(H\) or non-uniform grids
Padé \([m/m]\) "pade" Gatheral closed-form Padé approximant to the Riccati solution; fast, no ODE solve, but much less accurate than root-Padé; kept for comparison
Root-Padé \([m/(m+1)]\) "root_pade" Root-transformed Padé that matches the short-time series and the leading long-time tail (Hager & Kreher 2026, App. D.3); fast, and much more accurate than the plain Padé near \(H = 0\)
\(H\)-expansion any base Taylor series \(\sum_{n=0}^{N} \frac{(\Delta H)^n}{n!} f_n\) around an anchor \(H_0\); coefficients \(f_n\) obtained by recursive differentiation of the Riccati equation

With base_solution="direct_riccati", the default direct_riccati_solver="auto" uses implicit-\(\pi\). Adams is opt-in via direct_riccati_solver="adams" and requires a uniform time grid (time_grid="uniform"; the default is "graded"); it can return NaN for \(H \le 0\) or on coarse grids.

Roadmap

The following extensions are planned:

  • Further European payoffs — spreads, variance swaps.
  • Path-dependent options — barriers, Asians, and lookbacks.
  • Rough Bergomi model.
  • American options.