Monte Carlo financial planning simulator
Project description
monteplan
Monte Carlo financial planning simulator
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
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
pip install monteplan[app]
streamlit run app/Home.py
Try It Now
Installation
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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
File details
Details for the file monteplan-0.5.0.tar.gz.
File metadata
- Download URL: monteplan-0.5.0.tar.gz
- Upload date:
- Size: 596.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa6d23d061d3fe10bbfc42060c92f97abdef1da00da84a469ae368b9df997d34
|
|
| MD5 |
3b9da6d015c8771fbf4579c86c540a0c
|
|
| BLAKE2b-256 |
c75987d7b239097904789a8f63b25db4019ca01254ea079882366f3b49c39ece
|
Provenance
The following attestation bundles were made for monteplan-0.5.0.tar.gz:
Publisher:
publish.yml on engineerinvestor/monteplan
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
monteplan-0.5.0.tar.gz -
Subject digest:
fa6d23d061d3fe10bbfc42060c92f97abdef1da00da84a469ae368b9df997d34 - Sigstore transparency entry: 939654213
- Sigstore integration time:
-
Permalink:
engineerinvestor/monteplan@05496c0465f4a334f62bb5ba963f206e7cd06e17 -
Branch / Tag:
refs/tags/v0.5.0 - Owner: https://github.com/engineerinvestor
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@05496c0465f4a334f62bb5ba963f206e7cd06e17 -
Trigger Event:
push
-
Statement type:
File details
Details for the file monteplan-0.5.0-py3-none-any.whl.
File metadata
- Download URL: monteplan-0.5.0-py3-none-any.whl
- Upload date:
- Size: 54.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bc4872d023a2bfcc92487ded2e4fe609c18ae80dda954a53b35496d25826d1bf
|
|
| MD5 |
4c709c6b4e95f1b5ef5e5c1597d1bc25
|
|
| BLAKE2b-256 |
733f770a516dc3cb55c2bbd30a998b369a5c102d725808d58a48329dd6bfe231
|
Provenance
The following attestation bundles were made for monteplan-0.5.0-py3-none-any.whl:
Publisher:
publish.yml on engineerinvestor/monteplan
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
monteplan-0.5.0-py3-none-any.whl -
Subject digest:
bc4872d023a2bfcc92487ded2e4fe609c18ae80dda954a53b35496d25826d1bf - Sigstore transparency entry: 939654217
- Sigstore integration time:
-
Permalink:
engineerinvestor/monteplan@05496c0465f4a334f62bb5ba963f206e7cd06e17 -
Branch / Tag:
refs/tags/v0.5.0 - Owner: https://github.com/engineerinvestor
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@05496c0465f4a334f62bb5ba963f206e7cd06e17 -
Trigger Event:
push
-
Statement type: