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 and KDE distributions; Gaussian, Student's t, Clayton, Gumbel, and Frank copulas (implemented natively, no additional packages required); Iman-Conover
- 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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
funcsim-0.2.4.tar.gz
(62.1 kB
view details)
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
funcsim-0.2.4-py3-none-any.whl
(68.6 kB
view details)
File details
Details for the file funcsim-0.2.4.tar.gz.
File metadata
- Download URL: funcsim-0.2.4.tar.gz
- Upload date:
- Size: 62.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d5fa82018d5572a726dc1d4094c300710d97ea570a4eac5ad154753282ea840
|
|
| MD5 |
f06e596bcc0a73087244139f372b33f3
|
|
| BLAKE2b-256 |
8d046fbcd05411b4ea9a3f24acd54cc2f3e869c8f33a301e70f899586258a3f3
|
File details
Details for the file funcsim-0.2.4-py3-none-any.whl.
File metadata
- Download URL: funcsim-0.2.4-py3-none-any.whl
- Upload date:
- Size: 68.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
40b2723d1a99bf3432223e2b51fb4e13bfe9e6a1ec55be10cd78980e6c819373
|
|
| MD5 |
56b2809ff26a782e674599b30e2d4f9d
|
|
| BLAKE2b-256 |
1b9865537fe0c5e17d3a50e0d3578659d45c6f21cfe4db4ba26069963fbe2f18
|