funcsim
Lightweight, functional stochastic simulation
Documentation: https://funcsim.readthedocs.io/
Features:
- static (cross-sectional) and recursive-dynamic simulations from a single user-written function
- pseudo-random numbers with an explicit seed (so that results are reproducible and comparable across runs or scenarios)
- stratified/Latin hypercube sampling
- painless multi-core simulations
- fitting and comparison of univariate distributions, kernel density estimates, and goodness-of-fit tests
- multivariate normal (fitted to data or specified by a mean vector and covariance matrix) and multivariate KDE distributions; Gaussian, Student's t, Clayton, Gumbel, and Frank copulas, fitted to pseudo-observations or specified by their parameters (implemented natively, no additional packages required); information-criterion comparison of copula families; Iman-Conover; covariance shrinkage
- expected utility and cumulative prospect theory calculations
- plotly-based fan charts and diagnostic plots
- highly flexible, and as simple as possible (but no more)
- functional paradigm
Requirements:
- python >= 3.11
- numpy >= 2.2.0
- scipy >= 1.16.0
- pandas >= 2.2.0 (pandas 2.2+ and 3.x are both supported)
- xarray >= 2025.4.0
For optional functionality, additional packages are needed:
- plotting: plotly (
pip install "funcsim[plotting]"); kaleido for static image export
Additionally, to run the tests and build the docs:
- pytest
- sphinx, sphinx-autodoc-typehints (
pip install "funcsim[docs]")
installation
pip install funcsim
building html docs
From the top-level funcsim directory...
sphinx-build -W -b html docs/source/ docs/build/
running tests
From the top-level funcsim directory...
python3 -m pytest
Release files for funcsim 0.2.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| funcsim-0.2.7.tar.gz | 76.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| funcsim-0.2.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 159.8 kB
Release files / funcsim-0.2.7.tar.gz
| Download URL | funcsim-0.2.7.tar.gz |
|---|---|
| Size | 76.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
29c7859e7dac4318d3a963b5cb8ee34cf36e9a95bacbb1af92f21e236ddf89d1
|
|
BLAKE2b-256 checksum How to use checksums |
d3732bd971adfeabac33aed51016f6ebba815d56cf7a1dd1a4ccac3c5f067245
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / funcsim-0.2.7-py3-none-any.whl
| Download URL | funcsim-0.2.7-py3-none-any.whl |
|---|---|
| Size | 83.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6284cc2c6d798097648f82eeca4c40a7986f00bd1f938b126bf887eb0e2ee35e
|
|
BLAKE2b-256 checksum How to use checksums |
b8bd0f0c985d0109cb10871d65dbe72bd54bc9e541bc9112d5061be4513409e7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|