Portfolio Optimizer & Monte Carlo Simulation

What we have here is a tool for building, stress-testing, and optimizing multi-asset portfolios using Monte Carlo methods. You set the allocations, plug in your return assumptions, define how assets move together, and run thousands of simulated futures to see what your portfolio might actually do over 30 years.


Asset Allocation

Build Your Portfolio From 12 Asset Classes

The starting point is a simple set of sliders. You allocate across US Stocks, International Stocks, Emerging Market Stocks, US Treasuries (both intermediate and long), Corporate Bonds, EM Bonds, TIPS, REITs, Commodities, Gold, and Cash. Three additional slots let you plug in custom return streams for anything that doesn’t fit the standard categories.

Every slider updates the total allocation in real time. The tool locks you at 100% total, so if you push US Stocks to 30%, something else has to come down. This forces you to make actual trade-off decisions rather than building a portfolio that quietly adds up to 110%.

See the Breakdown Visually

A pie chart on the right side of the screen updates as you move the sliders. Each asset class gets its own color and label. For a portfolio with 12 active positions, this visual check saves time: you can see at a glance whether your “diversified” portfolio is actually 45% equities across three categories that all move together.


Assumptions

Set Expected Returns and Volatility Per Asset

Once you’ve set your allocations, you move to the Assumptions tab. Each asset class gets its own card with two inputs: expected annual return (%) and volatility (%).

The defaults are reasonable starting points. US Stocks come in at 7% expected return with 15% volatility. Emerging Market Stocks sit at 9% return and 22% volatility. TIPS are set at 3.5% return with 5% volatility. These reflect rough long-run historical averages, but you can change any of them.

Why These Numbers Matter

The simulation draws random annual returns from a distribution built around these inputs. If you set US Stocks at 7% return with 15% volatility, the model will generate years where US Stocks return -23% and years where they return +37% — both statistically plausible outcomes at one standard deviation away from the mean. Garbage assumptions produce garbage output, so spending time on this tab is worth it.

For reference: Vanguard’s 10-year forward return estimate for US equities as of early 2025 was in the 3-5% range in nominal terms, well below the default 7%. If you’re stress-testing a retirement portfolio, consider running the simulation with both the default assumptions and a more conservative set to see how far apart the outcomes are.


Correlations

How Assets Move Relative to Each Other

The Correlations tab shows a full 13×13 matrix. Every asset pair gets a correlation coefficient ranging from -1 (they move in exactly opposite directions) to +1 (they move together perfectly).

The defaults reflect historically observed relationships. US Stocks and International Stocks show a correlation of 0.85 — they tend to move together, which means holding both gives you less diversification benefit than it might appear. US Stocks and Long Treasuries sit at -0.15, meaning long bonds have historically provided some cushion when equities fall.

Editing the Matrix

Every cell in the matrix is editable. This matters because correlations are not static. During the 2008 financial crisis, correlations across almost all risk assets spiked toward 1.0 simultaneously — the period when diversification seemed to break down. If you want to model a stress scenario where equities and credit move together instead of offsetting each other, you can adjust those cells manually.

Gold’s low or negative correlation to equities (-0.05 to the US stock market in the defaults) is one reason institutional portfolios include it as a hedge. You can test whether increasing the gold allocation actually reduces your simulated drawdowns by adjusting the correlation assumptions alongside the allocation.


Optimization

Find the Allocation With the Best Sharpe Ratio

The Optimization tab runs a mean-variance optimization using your return, volatility, and correlation inputs. Click “Find Optimal Allocation” and the tool searches across possible weight combinations to find the one that produces the highest Sharpe ratio — the ratio of expected excess return to volatility.

This is the mathematical version of the efficient frontier. The output tells you, given your assumptions, what weights maximize return per unit of risk. You can then compare that optimal allocation to your manually set portfolio on the Asset Allocation tab and decide whether you want to adjust.

One important caveat: the optimizer is only as good as your inputs. Mean-variance optimization is famously sensitive to expected return assumptions. A small change in your return estimate for Emerging Markets can swing the optimal allocation dramatically. Treat the output as one data point, not a prescription.


Simulation

Configure the Monte Carlo Parameters

The Simulation tab has six inputs: Initial Investment, Annual Contribution, Simulation Years, Number of Simulations, Leverage Ratio, and Leverage Cost.

The defaults run 1,000 simulations over 30 years starting with $100,000 and contributing $10,000 per year. The leverage ratio is set to 1 (no leverage). You can increase the number of simulations up to get tighter confidence intervals on the output — 1,000 simulations is fast to run but 10,000 gives you a more stable picture of the tails.

Leverage Options

The Leverage Ratio input lets you model borrowed capital. Set it to 1.5 and the tool simulates deploying 1.5x your portfolio value in each period, with borrowing cost charged at whatever rate you enter in the Leverage Cost field. The default borrowing cost is 3%. In a scenario where your expected portfolio return is 6% and borrowing costs 3%, leverage amplifies both the upside and the downside symmetrically.


Results

What You Get After Running the Simulation

After you click “Run Monte Carlo Simulation,” the Results tab populates with output from all 1,000 simulated portfolio paths. This is where you see the range of outcomes: median final portfolio value, the 10th percentile (a bad but not catastrophic outcome), the 90th percentile (a good run), and the worst-case scenarios in the tail.

The visual output shows you not just the expected outcome but the full distribution. A portfolio that has a median value of $800,000 after 30 years but a 10th percentile outcome of $120,000 looks very different from one with a median of $650,000 and a 10th percentile of $380,000. Depending on your situation, the second portfolio might be the better choice even though its median is lower.

Running multiple scenarios — conservative assumptions vs. base case, no leverage vs. modest leverage, your current allocation vs. the optimizer’s suggestion — gives you a much clearer picture of where you’re exposed and where you have room to take more or less risk.

Portfolio Simulation Tool

Scroll to Top