Quantitative analysis · 01

Monte Carlo simulator

From a return and a volatility to a distribution of outcomes

A long-run result is not one number, it is a distribution. Enter your assumptions and this page simulates thousands of monthly geometric Brownian motion paths, then shows where the median lands, how far apart good and bad cases are, and how likely you are to end below what you paid in. Everything runs in your browser; nothing is uploaded.

Assumptions

No assumptions yet? Estimate them from prices

Paste one closing price per line, oldest first.

Median final value–– of the – paid in
5% to 95% range– ~ –Nine out of ten paths end in this range
Chance of loss–Final value below the amount paid in
Median max drawdown–Largest fall from a peak along the way
Value over time5,000 simulated paths · monthly
Median25% – 75%5% – 95%Paid in
Distribution of the final valueFinal value on the x-axis, number of paths as bar height (1% – 99% range shown)

Check: with nothing added, the theoretical mean S₀·e^(μT) = –

Data table: percentiles by year
YearPaid in5%25%Median75%95%

This tool is for data research and learning only and is not investment advice. The model assumes constant return and volatility and log-normal prices; real markets have fat tails, gaps and regime changes, so real risk is usually larger than shown here. Past performance does not predict future results.

How it works

What it computes

  1. Model: geometric Brownian motionPrice changes are a fixed trend μ plus random shocks of strength σ.dS = μS dt + σS dW
  2. Step forward month by monthEach month draw a standard normal Z, apply the exact solution for one step, then add that month's contribution.St+Δt = St · exp((μ − σ²/2)Δt + σ√Δt · Z)
  3. Repeat thousands of times, then countSort all paths at every month and read off the 5%, 25%, 50%, 75% and 95% points: that is the band chart above.qp(t) = S(⌈pN⌉)(t)