Skip to content

Changelog

v0.9

New Features

  • Plans that start in retirement: retirement_age at or below current_age is valid. Withdrawals begin in the first month and contributions stop unless income_end_age is later than current_age. The age rule is now end_age > max(current_age, retirement_age).
  • PlanConfig.surplus_income: "invest" deposits guaranteed income above the spending need into the first taxable account, for part-time work or a household where one person still earns. The default "spend" keeps the previous behavior.
  • PlanConfig.starts_retired and SimulationResult.retirement_step, so callers no longer compute (retirement_age - current_age) * 12.
  • CLI and Streamlit app support plans that start in retirement; the Plan Setup page has a checkbox for investing surplus income.
  • Case study: Already Retired, One Partner Still Working.

Behavior Changes

  • A guaranteed income stream already in payment (start_age at or below current_age) takes monthly_amount as today's payment, with COLA accruing from the simulation start. Previously the months since start_age were compounded in.
  • A spending change dated at or before current_age is ignored as already reflected in monthly_spending. Previously it applied for the whole run.
  • Sensitivity: the Retirement Age sweep now moves income_end_age with retirement_age (unless set separately), so contributions stop at the swept age. Retirement Age sensitivity results change as a result.
  • 2D sensitivity grid points that form an invalid plan, or whose run fails, are NaN instead of 0% or 100%.

Improvements

  • Under tax_model="us_federal", a plan that starts past RMD age takes its first-year RMD.
  • Metric helpers (compute_metrics, ruin_by_age, spending_volatility) treat a negative retirement step as the start and never read an empty slice as success.
  • Plan Setup keeps spending changes when saving.

Results for plans that were valid in 0.8 are unchanged; config_hash changes because of the new field.

Known Limitations

  • RMDs are not enforced under the default flat tax model.
  • Guardrails sets its first withdrawal from wealth at the simulation start, which is early for a plan still saving.
  • A positive discrete event on a portfolio with a zero balance is lost.

v0.8

New Features

  • PlanConfig.spending_changes: step changes to retirement spending by age (e.g. 0.75 after a spouse dies). Steps compound and apply under every spending policy.

v0.7

New Features

  • GuaranteedIncomeStream.cpi_indexed: indexed streams track simulated CPI with cola_rate as growth above it; non-indexed streams are fixed nominal payments that grow only by cola_rate.
  • Terminal wealth reported in today's dollars (terminal_wealth_real_percentiles) alongside the nominal figures, plus the per-path terminal_inflation factor.

v0.6

New Features

  • Six-asset globally diversified default market (US, ex-US developed and emerging stocks and bonds); us_only_market() keeps the two-asset market.
  • build_global_weights() helper and an aggregate vs. Treasury bond selector.
  • CITATION.cff for academic citation.

v0.5

New Features

  • State income tax: flat state tax rate overlay on ordinary income + LTCG
  • NIIT (Net Investment Income Tax): 3.8% surtax on investment income above MAGI thresholds
  • Roth conversion modeling: fixed amount or fill-to-bracket strategies with configurable age window
  • Safe withdrawal rate finder: bisection-based search for maximum spending at target success rate
  • Expanded top-level exports: 18+ symbols importable directly from monteplan

Improvements

  • Sensitivity analysis supports policies target (state tax rate perturbation)
  • USFederalTaxModel.bracket_ceiling() for fill-bracket Roth conversion strategy
  • USFederalTaxModel.compute_niit_vectorized() for vectorized NIIT computation

v0.4

New Features

  • Stress testing: crash, lost decade, high inflation, sequence risk scenarios
  • 2D sensitivity heatmaps (run_sensitivity_heatmap)
  • Plotly-based charts in the Streamlit app (fan chart, spending fan chart, ruin curve, tornado chart)
  • Enhanced Streamlit UI with 6 pages and scenario comparison
  • Quick-start templates: fire_plan(), coast_fire_plan(), conservative_retiree_plan()
  • Full documentation site (MkDocs Material)
  • 5 interactive Jupyter notebooks with Colab support
  • GitHub Pages deployment

Improvements

  • Polished chart aesthetics with consistent theming
  • CSV export for wealth time series
  • Config hashing for caching and reproducibility

v0.3

New Features

  • Per-asset-per-account positions: (n_paths, n_accounts, n_assets) 3D array
  • 4 return models: MVN, Student-t, Historical Block Bootstrap, Regime Switching
  • 5 spending policies: constant real, percent-of-portfolio, guardrails, VPW, floor-and-ceiling
  • Tax models: flat (default), US federal (progressive brackets with LTCG)
  • Regime switching with 2-5 regimes, transition matrix, and coupled inflation
  • Antithetic variates for variance reduction
  • Simulation presets: fast (1,000 paths), balanced (5,000), deep (20,000 + antithetic)
  • Sensitivity analysis: OAT perturbation engine with parallel execution
  • Investment fees: expense ratio, AUM fee, advisory fee
  • Guaranteed income streams: Social Security, pensions, annuities with COLA
  • Spending time series with percentiles
  • Threshold rebalancing
  • Metrics: max drawdown distribution, spending volatility, ruin-by-age
  • CSV export
  • Config hashing via SHA-256

Infrastructure

  • 188 tests passing
  • pytest-cov added
  • mypy --strict passing

v0.2

New Features

  • Multi-asset correlated portfolios
  • Multiple account types (taxable, traditional, Roth)
  • Withdrawal ordering
  • Flat tax model
  • Click CLI
  • JSON config export/import
  • Streamlit app (basic)

Infrastructure

  • Pydantic v2 configuration models
  • Property-based tests with Hypothesis
  • Benchmark suite with pytest-benchmark

v0.1

Initial Release

  • Basic Monte Carlo engine with monthly time steps
  • Single-asset simulation
  • Constant real spending policy
  • Success probability and terminal wealth percentiles
  • Deterministic seeding with PCG64DXSM