Skip to main content

Mean Field Tools

A Python library for numerically solving McKean-Vlasov forward-backward stochastic differential equations (MV-FBSDEs) under common noise using elicitability, deep learning and Picard iterations.

It accompanies the paper Deep Learning and Elicitability for McKean-Vlasov FBSDEs With Common Noise — see How to cite this work.

Features

  • Deep BSDE (Backward Stochastic Differential Equation) solvers
  • Forward-Backward SDE implementations with Picard iteration
  • Neural-network function approximators (including ResNet architectures)
  • Mean field flow measure approximations (with common-noise support)
  • Filtration tools for Brownian motion and stochastic state tracking

Installation

# Clone the repository
git clone https://github.com/fjpAntunes/mean-field-tools.git
cd mean-field-tools

# Install with Poetry
poetry install

Usage

See mean_field_tools/deep_bsde/README.md for a detailed overview of the components, and mean_field_tools/deep_bsde/script/experiments/ for runnable examples (systemic risk, portfolio hedging, economic growth, and more).

Testing

The project uses pytest for testing. Tests are organized into unit and integration tests within the mean_field_tools/deep_bsde/test/ directory.

# Run all tests
pytest

# Run specific test categories
pytest mean_field_tools/deep_bsde/test/unit/
pytest mean_field_tools/deep_bsde/test/integration/

# Run a specific test file
pytest mean_field_tools/deep_bsde/test/unit/test_function_approximator.py

Structure

  • mean_field_tools/deep_bsde/: Core library — the Deep BSDE solver and its components
    • filtration.py: Brownian motion generation and stochastic state tracking
    • forward_backward_sde.py: Forward/Backward SDE classes and Picard iteration
    • function_approximator.py: Neural-network approximators
    • measure_flow.py: Mean field flow measure approximations
    • artist.py: Plotting and diagnostics
    • script/experiments/: Example applications
    • test/: Unit and integration tests

How to cite this work

If you use this library in your research, please cite:

Felipe J. P. Antunes, Yuri F. Saporito, and Sebastian Jaimungal. Deep Learning and Elicitability for McKean-Vlasov FBSDEs With Common Noise, 2026. arXiv:2512.14967.

@misc{antunes2026deeplearningelicitabilitymckeanvlasov,
      title={Deep Learning and Elicitability for McKean-Vlasov FBSDEs With Common Noise},
      author={Felipe J. P. Antunes and Yuri F. Saporito and Sebastian Jaimungal},
      year={2026},
      eprint={2512.14967},
      archivePrefix={arXiv},
      primaryClass={cs.LG},
      url={https://arxiv.org/abs/2512.14967},
}

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mean_field_tools-0.1.0.tar.gz (20.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mean_field_tools-0.1.0-py3-none-any.whl (22.9 kB view details)

Uploaded Python 3

File details

Details for the file mean_field_tools-0.1.0.tar.gz.

File metadata

  • Download URL: mean_field_tools-0.1.0.tar.gz
  • Upload date:
  • Size: 20.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for mean_field_tools-0.1.0.tar.gz
Algorithm Hash digest
SHA256 bb004c5abfe4035d4c2141c6c8afa1e0b0bbc8f1e2d4c024c6a9d127af721443
MD5 7edb5acb5e0eb9dab6526b55142d426a
BLAKE2b-256 71c1d0dfef6d551dba39bcdac09ca1bab2e577670eefbcb3a12634a34d40b793

See more details on using hashes here.

Provenance

The following attestation bundles were made for mean_field_tools-0.1.0.tar.gz:

Publisher: main-release.yml on fjpAntunes/mean-field-tools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mean_field_tools-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mean_field_tools-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f44c0fe6c0d5a2f5c85b4a02426bb2d5f9794ed41ce33184705feca5190b91ec
MD5 552fb083fa8c21a3eaea3a8a369ba885
BLAKE2b-256 512eada69f85e132bb90c80d473eb451efad629f7b3f9c5a7dd892f81e142f64

See more details on using hashes here.

Provenance

The following attestation bundles were made for mean_field_tools-0.1.0-py3-none-any.whl:

Publisher: main-release.yml on fjpAntunes/mean-field-tools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

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