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 and KDE distributions; Gaussian, Student's t, Clayton, Gumbel, and Frank copulas (implemented natively, no additional packages required); 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.5

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.5
File Size Uploaded
funcsim-0.2.5.tar.gz 63.2 kB Details

Built distribution (wheel)

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

Total release size: 132.8 kB

Release files / funcsim-0.2.5.tar.gz

Download URL funcsim-0.2.5.tar.gz
Size 63.2 kB
Tags Source
SHA-256 checksum
How to use checksums
c0d4d297a22a6d43042acbfb9a35d6e4ae2476235af0d460ca7fd61f084ea2b6
BLAKE2b-256 checksum
How to use checksums
8fb500e8888e797e558c2ed464c63d5e9c45c775af0c19227ec07c7b7b84c80a
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.5-py3-none-any.whl

Download URL funcsim-0.2.5-py3-none-any.whl
Size 69.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a59751597987882427a195253281b96a2a072dce710895c13394778a06b0f3da
BLAKE2b-256 checksum
How to use checksums
05de3cc4b2cc76144f9ecf937aa50bf4a660dfe3376826ed213577ce9581375a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release history Release notifications | RSS feed

0.2.7

2 release files

0.2.6

2 release files

This release

0.2.5 This release

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.20

2 release files

0.1.19

2 release files

0.1.17

2 release files

0.1.16

2 release files

0.1.15

2 release files

0.1.14

2 release files

0.1.13

2 release files

0.1.12

2 release files

0.1.11

2 release files

0.1.10

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

1 release file

0.1.2

1 release file

0.1.0

1 release file

0.0.14

1 release file

0.0.13

1 release file

0.0.12

1 release file

0.0.11

1 release file

0.0.10

1 release file

0.0.9

1 release file

0.0.7

1 release file

0.0.6

1 release file

0.0.5

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

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