Monte Carlo Portfolio Simulator
Portfolio Projection
This Monte Carlo portfolio simulator projects how an investment portfolio might evolve by running thousands of random market scenarios instead of a single fixed return. Each simulated year draws a random return for every asset from a normal distribution defined by its expected return and volatility, applies your contribution or withdrawal, and compounds the result forward across your time horizon. The output is a fan of percentile outcomes (10th, 25th, median, 75th, 90th), a probability of running out of money, and an estimated safe withdrawal rate.
Formula
V(t+1) = V(t) · (1 + Σ wᵢ · (μᵢ + σᵢ · Zᵢ)) + C
- V(t)
- Portfolio value at the start of year t
- wᵢ
- Normalized weight of asset i
- μᵢ
- Expected annual return of asset i (decimal)
- σᵢ
- Annual volatility of asset i (decimal)
- Zᵢ
- Standard normal random draw for asset i that year
- C
- Annual contribution (positive) or withdrawal (negative)
How it works
- Define your asset allocation: for each asset enter an expected annual return, a volatility (standard deviation), and a portfolio weight. Weights are normalized so they sum to 100%, and the engine treats assets as uncorrelated using an identity correlation matrix.
- Set the starting value, an annual contribution (positive) or withdrawal (negative), the time horizon in years, and the number of simulations to run. Each path draws normal random returns via a Box-Muller transform and compounds value forward year by year.
- Review the percentile bands and terminal-value percentiles that summarize the spread of outcomes, plus the probability of ruin (share of paths that hit zero) and an estimated safe withdrawal rate derived from the conservative 10th-percentile result.
Worked example
A $100,000 portfolio holding 60% stocks (7% expected return, 15% volatility) and 40% bonds (3% return, 5% volatility), adding $10,000 per year over 30 years, run as 1,000 simulations with a fixed random seed of 42.
- Weights normalize to 0.60 stocks and 0.40 bonds; each year every asset draws a random return centered on its expected value with its volatility as the spread.
- Portfolio value compounds forward 30 times, adding the $10,000 contribution after each year's return is applied.
- After 1,000 paths the terminal values are sorted to read off the 10th, 50th, and 90th percentiles.
With this seed the median terminal value is about $1.10M, the 10th percentile about $672K and the 90th percentile about $1.83M, with a 0% probability of ruin. Because the simulation is random, results shift when the seed or scenario count changes; the seed only makes a given run reproducible.
Frequently asked questions
- Why use Monte Carlo instead of a single average return?
- A single fixed return hides sequence-of-returns risk and the wide range of real-world outcomes. Monte Carlo runs thousands of randomized paths so you see a distribution, including bad scenarios, rather than one optimistic straight line.
- Are the results the same every time I run it?
- Only if a random seed is supplied. With a fixed seed the pseudo-random draws are reproducible, so the same inputs produce identical percentiles. Without a seed each run uses fresh randomness and the numbers vary slightly between runs.
- What does probability of ruin mean here?
- It is the share of simulated paths in which the portfolio value falls to zero before the time horizon ends. A higher figure signals that your withdrawals or volatility are too aggressive for the starting balance to survive.
- How are correlations between assets handled?
- This version treats assets as uncorrelated by using an identity correlation matrix, so each asset's random return is drawn independently. Real portfolios have correlated assets, so a fully diversified model would generally show a slightly different spread of outcomes.