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 componentsfiltration.py: Brownian motion generation and stochastic state trackingforward_backward_sde.py: Forward/Backward SDE classes and Picard iterationfunction_approximator.py: Neural-network approximatorsmeasure_flow.py: Mean field flow measure approximationsartist.py: Plotting and diagnosticsscript/experiments/: Example applicationstest/: 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bb004c5abfe4035d4c2141c6c8afa1e0b0bbc8f1e2d4c024c6a9d127af721443
|
|
| MD5 |
7edb5acb5e0eb9dab6526b55142d426a
|
|
| BLAKE2b-256 |
71c1d0dfef6d551dba39bcdac09ca1bab2e577670eefbcb3a12634a34d40b793
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mean_field_tools-0.1.0.tar.gz -
Subject digest:
bb004c5abfe4035d4c2141c6c8afa1e0b0bbc8f1e2d4c024c6a9d127af721443 - Sigstore transparency entry: 2866578284
- Sigstore integration time:
-
Permalink:
fjpAntunes/mean-field-tools@f445cadf0836602871670594e6596b1474ef283d -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/fjpAntunes
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
main-release.yml@f445cadf0836602871670594e6596b1474ef283d -
Trigger Event:
push
-
Statement type:
File details
Details for the file mean_field_tools-0.1.0-py3-none-any.whl.
File metadata
- Download URL: mean_field_tools-0.1.0-py3-none-any.whl
- Upload date:
- Size: 22.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f44c0fe6c0d5a2f5c85b4a02426bb2d5f9794ed41ce33184705feca5190b91ec
|
|
| MD5 |
552fb083fa8c21a3eaea3a8a369ba885
|
|
| BLAKE2b-256 |
512eada69f85e132bb90c80d473eb451efad629f7b3f9c5a7dd892f81e142f64
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mean_field_tools-0.1.0-py3-none-any.whl -
Subject digest:
f44c0fe6c0d5a2f5c85b4a02426bb2d5f9794ed41ce33184705feca5190b91ec - Sigstore transparency entry: 2866578634
- Sigstore integration time:
-
Permalink:
fjpAntunes/mean-field-tools@f445cadf0836602871670594e6596b1474ef283d -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/fjpAntunes
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
main-release.yml@f445cadf0836602871670594e6596b1474ef283d -
Trigger Event:
push
-
Statement type: