Skip to main content

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, cumulative prospect theory, and regret-theoretical expected utility 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

Metadata

Release files for funcsim 0.2.11

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

Source distribution (sdist)

Source distribution for funcsim 0.2.11
File Size Uploaded Provenance Actions
funcsim-0.2.11.tar.gz 101.6 kB Without provenance Details for funcsim-0.2.11.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for funcsim 0.2.11
File Interpreter ABI Platform Actions
funcsim-0.2.11-py3-none-any.whl Python 3 none any Details for funcsim-0.2.11-py3-none-any.whl

Total release size: 212.1 kB

Release files / funcsim-0.2.11.tar.gz

Download URL funcsim-0.2.11.tar.gz
Size 101.6 kB
Tags Source
SHA-256 checksum
How to use checksums
87b6f068c7abf50669b343f515205a637a39f093e29301e98ade6c2072077f67
BLAKE2b-256 checksum
How to use checksums
71424bcd856344809d34f53de5c6e86258b9e81c2bf46bf57c6b537f1ab21971
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.8

Release files / funcsim-0.2.11-py3-none-any.whl

Download URL funcsim-0.2.11-py3-none-any.whl
Size 110.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
91c8d9c5dd36245306854d45f83fd3d5f560775548e5936e3d04548b7c1ef968
BLAKE2b-256 checksum
How to use checksums
6bb0015e1209e591c830738e996b99ec4d47a2cfc53866d22371965f14e89181
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.8

Security for funcsim 0.2.11

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

Release history Release notifications | RSS feed

This release

0.2.11 This release

2 release files No provenance

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