Skip to content
hagerpaPublic

About

Signature Maximum Discrepancy for Levy Rough Paths

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

8 Commits

Folders and files

Repository files navigation

levymmd

Expected signature kernels and maximum mean discrepancies for inhomogeneous Lévy processes.

Companion code for P. K. Friz and P. P. Hager, Expected Signature Kernels for Lévy Rough Paths, arXiv:2509.07893.

The expected signature of an inhomogeneous Lévy process is the development of an absolutely continuous path in the extended tensor algebra, driven by the characteristic velocities of the process. The kernel between two such laws therefore solves a PDE system — a Goursat problem in the Gaussian martingale case — and can be evaluated directly, without simulating either process. This package implements that evaluation and the MMD statistics built on it.

Installation

pip install -e .          # add [test] for the test dependencies

Tensor arithmetic comes from tensordev, installed from PyPI.

The package

levymmd.levy builds a process from its characteristic triplet. LevyProcess composes a drift, a diffusion and a jump part — each available in homogeneous, separable and general time dependence — and each part reports its characteristic velocities as well as simulating. MixtureProcess and SwitchingProcess compose whole processes. The worked examples of the paper, such as sin_cos_gaussian_martingale and covariance_loop_martingale, are constructors in levymmd.levy.examples.

levymmd.mmd turns laws and observed paths into kernels. Three families cover the combinations of the two argument types:

against a path sample against a Lévy law
path sample path_path_kernel path_levy_kernel
Lévy law — levy_levy_kernel

each with a _gram form for many pairs at once and an _mmd form for the squared discrepancy. Paths enter as Sample, laws as Law, and inner_products evaluates any requested blocks of the resulting Gram matrix in a single pass, so several statistics on the same data cost one computation rather than one each. finite_grid_statistics contracts those blocks into the signature and quadratic-variation statistics the paper compares.

Reproducing the paper

Each experiment is a notebook that runs top to bottom. Open it, run all cells, and that part of the paper reappears.

Notebook Produces
notebooks/gof/gof.ipynb Figure fig:gof_power, Table tab:gof_size_variance
notebooks/validation/mc_validation.ipynb Figures fig:numerics_gaussian_irregular, fig:numerics_gaussian_paths
notebooks/truncation/truncation_analysis.ipynb Figure fig:trunc_circle

The Monte Carlo sample pools are not distributed, so a first run computes them — hours for the goodness-of-fit study, less for the other two. They are then kept locally and git-ignored, and each notebook reuses what it finds: an interrupted study resumes where it stopped, and redrawing a figure never reruns a simulation. Each experiment's REPORT.md records its results and how they were obtained.

Tests

pytest tests

About

Signature Maximum Discrepancy for Levy Rough Paths

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages