Monte Carlo — strategic investing simulator
Projects portfolio value forward using 10,000 random paths under Geometric
Brownian Motion. Configure expected return, volatility, monthly contribution
or withdrawal, and time horizon. The fan chart shows the 5th–95th percentile
band; the table shows P(ruin), terminal-wealth percentiles, and Sharpe.
Pure JavaScript — no server round-trips.
Outcome distribution
Each line is a percentile of terminal portfolio value across the 10,000
simulations. Red = 5th percentile (bad luck); blue = median; green = 95th
percentile (good luck).
How to read this
- Median terminal value is the most likely outcome — half the simulations end above it, half below.
- 5th percentile is the worst-case scenario you should prepare for. Markets that bad happen one time in twenty over any given period.
- P(ruin) is the probability the portfolio hits zero before the time horizon ends. Critical for retirement planning.
- Geometric mean return is what compounds — different from the arithmetic mean by approximately σ²/2. Higher volatility actively drags down compounded returns even at the same arithmetic mean.
- Try it: set mode to "Withdraw" and enter a negative monthly contribution like -4000. With $1M starting, 8% / 16% σ, $4k/month withdrawal, what's P(ruin) over 30 years? Does adding 2pp to volatility change it materially?