Skip to main content

Jump-Diffusion Parameter Estimation

PyPI version Python versions Documentation Status DOI License: MIT

A comprehensive Python library for simulating and estimating parameters of jump-diffusion processes with asymmetric jump distributions.

🚀 Features

  • Flexible Simulation: Generate jump-diffusion paths with customizable parameters
  • Maximum Likelihood Estimation: Robust parameter estimation using mixture distributions
  • Pluggable Jump Distributions: Skew-normal, Normal (Merton), and the Skewed Generalized Error Distribution (SGED) built in, with a simple interface (jump_distribution=) to add more
  • Goodness-of-Fit Comparison: Rank candidate jump distributions on the same data via AIC/BIC and a simulation-based Kolmogorov-Smirnov test
  • Validation Tools: Monte Carlo experiments for method validation
  • Extensible Architecture: Easy to add new models, jump distributions, and estimation methods
  • Educational Focus: Comprehensive documentation and tutorials

📊 Model

Our implementation focuses on jump-diffusion processes of the form:

dX_t = μ dt + σ dW_t + J_t dN_t

Where:

  • μ: drift parameter
  • σ: diffusion volatility
  • W_t: Brownian motion
  • J_t: jump sizes (asymmetrically distributed)
  • N_t: jump arrival times (Bernoulli approximation)

🛠️ Installation

# Install from PyPI
pip install jump-diffusion-estimation

Or install the latest development version from source:

git clone https://github.com/jdospina/jump-diffusion-estimation.git
cd jump-diffusion-estimation
pip install -e .

🎯 Quick Start

import numpy as np
from jump_diffusion import JumpDiffusionSimulator, JumpDiffusionEstimator

# Create simulator
simulator = JumpDiffusionSimulator(
    mu=0.05,           # 5% annual drift
    sigma=0.2,         # 20% annual volatility
    jump_prob=0.1,     # 10% jump probability per period
    jump_scale=0.15,   # jump magnitude scale
    jump_skew=2.0      # positive skewness
)

# Simulate a path
times, path, jumps = simulator.simulate_path(T=1.0, n_steps=252)

# Estimate parameters
increments = np.diff(path)
dt = times[1] - times[0]
estimator = JumpDiffusionEstimator(increments, dt)
results = estimator.estimate()

print(f"Estimated drift: {results['parameters']['mu']:.4f}")
print(f"Estimated volatility: {results['parameters']['sigma']:.4f}")

Using a different jump distribution

Jumps follow a skew-normal distribution by default. Other distributions can be plugged in via jump_distribution, both when simulating and when estimating:

from jump_diffusion.distributions import SGEDJump

simulator = JumpDiffusionSimulator(
    mu=0.05, sigma=0.2, jump_prob=0.1,
    jump_distribution=SGEDJump(),
    jump_loc=0.0, jump_scale=0.15, jump_nu=1.5, jump_xi=2.0,
)
times, path, jumps = simulator.simulate_path(T=1.0, n_steps=252)

increments = np.diff(path)
dt = times[1] - times[0]
estimator = JumpDiffusionEstimator(increments, dt, jump_distribution=SGEDJump())
results = estimator.estimate()

Distributions without a known closed-form likelihood (like SGED) fall back to a generic FFT-based convolution to approximate the mixture density, so adding a new distribution only requires implementing its pdf.

Robust estimation with differential evolution

The default L-BFGS-B optimizer needs a reasonable initial guess and can stall on harder mixture likelihoods (SGED in particular). Differential evolution searches globally instead, needing no initial guess — the applied finding of the thesis this library is based on:

results = estimator.estimate(method="differential_evolution", seed=42)

It costs thousands of likelihood evaluations (seconds instead of milliseconds), with defaults ported from the thesis (rand/1 strategy, DEoptim-style population sizing, early stopping on convergence).

Standard errors via Likelihood Profiling

In complex jump-diffusion mixture models, the numerical Hessian is often unstable or ill-conditioned. Standard errors and 95% confidence intervals can be robustly calculated using Profile Likelihood. After estimating the parameters (preferably with global optimization), you can run:

# Compute standard errors and confidence intervals using a Wilks' theorem threshold
se_results = estimator.estimate_standard_errors(n_points=5, confidence_level=0.95)

# The results table now includes standard errors and CI bounds
estimator.diagnostics()

# Visualize the profile log-likelihood curves
estimator.plot_profiles()

Comparing jump distributions

JumpDistributionComparison fits several candidate jump distributions to the same data and ranks them by AIC/BIC plus a simulation-based Kolmogorov-Smirnov test:

from jump_diffusion.distributions import NormalJump, SGEDJump, SkewNormalJump
from jump_diffusion.validation import JumpDistributionComparison

comparison = JumpDistributionComparison(increments, dt)
comparison.fit("Normal", NormalJump())
comparison.fit("SkewNormal", SkewNormalJump())
comparison.fit("SGED", SGEDJump())

print(comparison.compare())  # ranked by AIC, includes KS statistic/p-value
comparison.plot_comparison()

📚 Examples

Ready-to-run scripts live in the examples/ directory:

Interactive notebooks live in the notebooks/ directory. Every notebook is available in English and in Spanish (suffix _spanish):

  • getting_started.ipynb Open In Colab – The canonical end-to-end tutorial: simulate, estimate (L-BFGS-B and Differential Evolution), quantify uncertainty via the three inference routes (profile / Wald / bootstrap), test for jumps, and compare jump distributions. Start here.
    • 🇪🇸 getting_started_spanish.ipynb Open In Colab – Tutorial completo de principio a fin: simulación, estimación (L-BFGS-B y Evolución Diferencial), inferencia por tres rutas (perfil / Wald / bootstrap), contraste de saltos y comparación de distribuciones.
  • jump_diffusion_playground.ipynb Open In Colab – Interactive playground: pick a jump distribution (Normal, Skew-Normal, SGED, Kou, Student-t), wiggle the sliders, simulate, and play the "guess the parameters" game.
  • differential_evolution_showcase.ipynb Open In Colab – Differential Evolution vs. L-BFGS-B on the multimodal mixture likelihood of the SGED jump-diffusion model.
  • sp500_case_study.ipynb Open In Colab – Real S&P 500 data: parameter estimation, simulated-vs-real comparison, and a ranking of all five jump distributions by AIC/BIC and bootstrap KS.
    • 🇪🇸 sp500_case_study_spanish.ipynb Open In Colab – Datos reales del S&P 500: estimación de parámetros, comparación simulado-vs-real y ranking de las cinco distribuciones de salto por AIC/BIC y KS bootstrap.

Notebook setup

Install optional dependencies and launch Jupyter to explore the notebooks:

pip install notebook ipywidgets matplotlib
jupyter notebook

📖 Academic References

The numerical methods and statistical models implemented in this library build on the following literature:

  1. Calibration with Differential Evolution and the SGED:

    • Ospina Arango, J. D. (2009). MSc thesis. Universidad Nacional de Colombia. (Foundations of applying the SGED and Differential Evolution to jump-diffusion processes.)
    • Ardia, D., Ospina, J. D., & Giraldo, N. D. (2011). Jump-diffusion calibration using differential evolution. Wilmott, 2011(55), 76-79.
    • Storn, R., & Price, K. (1997). Differential evolution–a simple and efficient heuristic for global optimization over continuous spaces. Journal of global optimization, 11(4), 341-359.
  2. Jump-diffusion models and distributions:

    • Merton, R. C. (1976). Option pricing when underlying stock returns are discontinuous. Journal of financial economics, 3(1-2), 125-144.
    • Theodossiou, P. (2015). Skewed Generalized Error Distribution of Financial Assets and Option Pricing. Multinational Finance Journal, 19(4), 223-266.
  3. Statistical inference (likelihood profiling):

    • Wilks, S. S. (1938). The large-sample distribution of the likelihood ratio for testing composite hypotheses. The Annals of Mathematical Statistics, 9(1), 60-62.

🤝 Contributing

We welcome contributions! Please see our Contributing Guidelines for details.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

  • Inspired by classical jump-diffusion literature
  • Built with love for the quantitative finance community
  • Special thanks to contributors and users

Metadata

Release files for jump-diffusion-estimation 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jump-diffusion-estimation 0.2.2
File Size Uploaded Provenance Actions
jump_diffusion_estimation-0.2.2.tar.gz 44.2 kB With provenance Details for jump_diffusion_estimation-0.2.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for jump-diffusion-estimation 0.2.2
File Interpreter ABI Platform Actions
jump_diffusion_estimation-0.2.2-py3-none-any.whl Python 3 none any Details for jump_diffusion_estimation-0.2.2-py3-none-any.whl

Total release size: 94.0 kB

Release files / jump_diffusion_estimation-0.2.2.tar.gz

Download URL jump_diffusion_estimation-0.2.2.tar.gz
Size 44.2 kB
Tags Source
SHA-256 checksum
How to use checksums
5d06027b9baf9811da4eceefe943175af45fb8cb112db07e948ba27aa4e09ed4
BLAKE2b-256 checksum
How to use checksums
daa36542edde90aabe7f1d22cc980386c77c43889bd1c5e561494e803759e44a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 14, 2026.

Transparency log

Release files / jump_diffusion_estimation-0.2.2-py3-none-any.whl

Download URL jump_diffusion_estimation-0.2.2-py3-none-any.whl
Size 49.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fa765722754db37583515af45a8a3152754f11f7bb8e4a039876de801d5ca928
BLAKE2b-256 checksum
How to use checksums
7c2d4514b22938c8d5a3d75e6b8b2f483b6296018cf0b16d2487a83b78e86f62
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 14, 2026.

Transparency log

Security for jump-diffusion-estimation 0.2.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for jump_diffusion_estimation-0.2.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 14, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page