Skip to main content

Release Downloads Builds Tests Docs codecov PyPI - Python Version

Quantify uncertainty and sensitivities in your computer models with an industry-grade Monte Carlo library.

Overview

At the heart of all serious forecasting, whether that be of elections, the spread of pandemics, weather, or the path of a rocket on its way to Mars, is a statistical tool known as the Monte Carlo method. The Monte Carlo method, named for the rolling of the dice at the famous Monte Carlo casino located in Monaco, allows you to quantify uncertainty by introducing randomness to otherwise deterministic processes, and seeing what the range of results is.

monaco is a python library for analyzing uncertainties and sensitivities in your computational models by setting up, running, and analyzing a Monte Carlo simulation wrapped around that model. Users can define random input variables drawn using chosen sampling methods from any of SciPy's continuous or discrete distributions (including custom distributions), preprocess and structure that data as needed to feed to their main simulation, run that simulation in parallel anywhere from 1 to millions of times, and postprocess the simulation outputs to obtain meaningful, statistically significant conclusions. Plotting and statistical functions specific to use cases that might be encountered are provided, and repeatability of results is ensured through careful management of random seeds.

Quick Start

First, install monaco:

pip install monaco

Then, copy the two files from the template directory, which contains a simple, well commented Monte Carlo simulation of flipping coins. That link also contains some exercises for you to do, to help you familiarize yourself with how monaco is structured.

After working through the template exercises, check out the other examples for inspiration and more in-depth usage of monaco's features.

Documentation / API Reference / SciPy 2022 Talk

The documentation at https://monaco.readthedocs.io includes:

Monaco was presented at the SciPy 2022 Conference, and the conference resources should give another good overview of the library. Check out the paper, the video of the talk, and the talk's slides and notebooks.

Ecosystem

Other libraries which extend monaco:

  • monaco-dict-utils - A Python library for easily bootstrapping Monaco Monte Carlo simulations with a dictionary-based workflow

License / Citation

Copyright 2020 Scott Shambaugh, distributed under the MIT license.

If you use monaco to do research that gets published, please cite the conference paper using the below or monaco.bib:

W. Scott Shambaugh (2022). Monaco: A Monte Carlo Library for Performing Uncertainty and Sensitivity Analyses. In Proceedings of the 21st Python in Science Conference (pp. 202 - 208).

Further Reading

Metadata

Release files for monaco 0.22.0

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

Source distribution (sdist)

Source distribution for monaco 0.22.0
File Size Uploaded
monaco-0.22.0.tar.gz 64.9 kB Details

Built distribution (wheel)

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

Total release size: 137.0 kB

Release files / monaco-0.22.0.tar.gz

Download URL monaco-0.22.0.tar.gz
Size 64.9 kB
Tags Source
SHA-256 checksum
How to use checksums
f16cd174fa7b2a69ce6c9c62dd9096a5895f2b77b26b22651899b83b62318fb2
BLAKE2b-256 checksum
How to use checksums
e1a0666cd3584395c969b3c8413d5fa35f5aae2417999466c5ba9b31a5d30f1b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.

Transparency log

Release files / monaco-0.22.0-py3-none-any.whl

Download URL monaco-0.22.0-py3-none-any.whl
Size 72.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4510f5bb68af7e3eae04b2101095ce74e195009b0b84d0c84d196e8bf0615b05
BLAKE2b-256 checksum
How to use checksums
42434b36071821f0ab6abdec5efd4f3c7382a02863107c56491285b0d983416b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.22.0 This release

2 release files

0.21.0

2 release files

0.20.1

2 release files

0.20.0

2 release files

0.18.0

2 release files

0.17.4

2 release files

0.17.3

2 release files

0.17.2

2 release files

0.17.1

2 release files

0.17.0

2 release files

0.16.3

2 release files

0.16.2

2 release files

0.16.1

2 release files

0.16.0

2 release files

0.14.1

2 release files

0.14.0

2 release files

0.13.2

2 release files

0.13.1

2 release files

0.13.0

2 release files

0.12.1

2 release files

0.11.7

2 release files

0.11.6

2 release files

0.11.5

2 release files

0.10.0

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.3

2 release files

0.8.2

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.3.0

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.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

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