Skip to main content

monteplan

Monte Carlo financial planning simulator

PyPI Open in Streamlit CI Python 3.11+ License Docs

Live App | PyPI | Documentation | Technical Paper | Notebooks | Try in Colab


monteplan models accumulation and decumulation with realistic taxes, multiple spending policies, multi-asset correlated portfolios, and professional reporting. Use it as a Python library, CLI tool, or interactive Streamlit web app.

Features

  • Monte Carlo Engine -- Vectorized numpy simulation with monthly time steps and deterministic seeding
  • 4 Return Models -- Multivariate normal, Student-t (fat tails), historical block bootstrap, Markov regime switching
  • 5 Spending Policies -- Constant real, percent-of-portfolio, Guyton-Klinger guardrails, VPW, floor-and-ceiling
  • Tax-Aware Withdrawals -- US federal progressive brackets, LTCG rates, RMD enforcement, configurable withdrawal ordering
  • Multi-Account Support -- Taxable, traditional (401k/IRA), and Roth accounts with distinct tax treatment
  • Guaranteed Income -- Social Security, pensions, and annuities with COLA adjustments
  • Stress Testing -- Market crashes, lost decades, high inflation, and sequence-of-returns risk scenarios
  • Sensitivity Analysis -- One-at-a-time tornado charts and 2D heatmaps with parallel execution
  • Antithetic Variates -- Variance reduction for tighter confidence intervals
  • Glide Paths -- Age-based target allocation shifts
  • Investment Fees -- Expense ratios, AUM fees, and advisory fees as monthly drag
  • Streamlit App -- Interactive web UI with Plotly charts, scenario comparison, and CSV export

Example Output

Monte Carlo Wealth Projection

Spending Policy Comparison Ruin Probability by Age

Quick Start

Python Library

from monteplan import simulate, default_plan, default_market, default_policies, default_sim_config

result = simulate(default_plan(), default_market(), default_policies(), default_sim_config())
print(f"Success probability: {result.success_probability:.1%}")

CLI

monteplan run --paths 10000 --seed 42

Streamlit App

Try the live app or run locally:

pip install monteplan[app]
streamlit run app/Home.py

Try It Now

Open in Colab

Installation

Install from PyPI:

pip install monteplan

Or install from source:

git clone https://github.com/engineerinvestor/monteplan.git
cd monteplan
pip install -e ".[dev]"

Architecture

monteplan separates computation from presentation:

  • Engine (src/monteplan/) -- Pure Python package with no UI dependencies
  • App (app/) -- Streamlit web UI that imports the engine as a library
  • Plugin-style models -- Return models, spending policies, and tax models are swappable via protocols

See the documentation for the full user guide, API reference, and mathematical details.

Disclaimer

This is an educational tool for exploring financial planning concepts. It is not financial advice. Results are simulations based on simplified models and assumptions. Consult a qualified financial advisor for real planning decisions.

License

Apache-2.0

Metadata

Release files for monteplan 0.6.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 monteplan 0.6.0
File Size Uploaded
monteplan-0.6.0.tar.gz 604.1 kB Details

Built distribution (wheel)

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

Total release size: 660.0 kB

Release files / monteplan-0.6.0.tar.gz

Download URL monteplan-0.6.0.tar.gz
Size 604.1 kB
Tags Source
SHA-256 checksum
How to use checksums
b9d5743aeeef00b71124e30be514b64d1ded45391de905a78a59c4328627beb4
BLAKE2b-256 checksum
How to use checksums
99c6ba5e43bd14d4a68a3a69fc281b33315633f8d0ca373242223e88a088901c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Feb 11, 2026.

Transparency log

Release files / monteplan-0.6.0-py3-none-any.whl

Download URL monteplan-0.6.0-py3-none-any.whl
Size 55.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
de434d4e6ccabccd52620816e0ae6f5d581aff46060efbd6039c44ca1cf3397c
BLAKE2b-256 checksum
How to use checksums
27d4311c11673cf08e9afd0501942d0407e1510b6741b723f8da735a584a635d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Feb 11, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.6.0 This release

2 release files

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