What is Monte Carlo simulation?
A Monte Carlo simulation estimates the likely range of outcomes of an uncertain process by running it many times with random inputs and studying the spread of results.
The name comes from the casino district in Monaco, because the method relies on chance, like a roulette wheel. It is used in physics, engineering, finance and trading.
Ready to try it on a real or demo account?
Partner link · trading carries a high risk of loss
Formal definition
The Monte Carlo method estimates a quantity, usually the expected value or the distribution of some function of random variables, by drawing random samples from an assumed probability distribution, computing the result for each draw and aggregating the results.
- By the law of large numbers, the average of the samples converges to the true expected value as the number of draws grows.
- The estimation error shrinks roughly with the square root of the number of draws. Each extra digit of precision therefore needs far more runs.
- Computers use pseudo-random number generators. A fixed "seed" makes a run repeatable.
Monte Carlo in trading: a worked example
This is a hypothetical case with no real figures.
A trader backtests a strategy and gets a list of closed trades. Each result is measured in "R", meaning the trade's profit or loss divided by the amount risked on it. The backtest shows a single equity curve: one particular order of wins and losses.
The Monte Carlo approach:
- Take the list of trade results.
- Build a new sequence by drawing trades at random from the list, either reshuffling them or resampling with replacement (bootstrapping).
- Draw the equity curve for that sequence and record its final result and its maximum drawdown, which is the largest fall from a peak.
- Repeat many times.
- Look at the distribution: the typical drawdown, the worst drawdowns, and how often the account falls below a chosen level.
The trader usually finds that the original backtest curve was not the worst case. Some random orderings produce long losing streaks and much deeper drawdowns. This helps set position size and expectations. Use the calculators to see what a given drawdown means in money for a chosen lot size.
Where you meet the term
- Backtesting software and spreadsheets: traders export the trade list from a strategy tester, such as the report in MetaTrader 5, and resample it elsewhere.
- Risk reports: banks and funds use simulated scenarios to estimate value-at-risk and stress losses.
- Options pricing: complex derivatives are valued by simulating many price paths.
- News and planning tools: retirement and investment projections often show a "probability of success" produced by Monte Carlo runs.
Limits and edge cases
- Garbage in, garbage out: the output is only as good as the input. A backtest that is overfitted stays overfitted after resampling.
- Independence assumption: shuffling destroys streaks and serial correlation. If wins and losses cluster in real markets, simple shuffling understates risk.
- Fat tails: a normal distribution underweights extreme moves. See fat tails and tail risk and black swan.
- Regime change: bootstrapping reuses only outcomes that already happened, and the future can differ.
- Costs: spreads, swaps and slippage must be inside each trade result, or the simulation looks better than reality.
Leveraged forex and CFD trading can lose money fast. A simulation describes possibilities, not a guarantee, and it does not remove that risk.
Related terms
- Equity curve
- Annualized volatility
- Correlation coefficient
- Risk management
- Trading strategies
- Trading glossary
Frequent questions
What is the difference between a backtest and a Monte Carlo simulation?
A backtest shows the single path a strategy took on past data. A Monte Carlo simulation reshuffles or resamples those results to show many possible paths.
Does Monte Carlo trading predict profit?
No. It estimates a range of outcomes under the assumptions you feed in. It does not forecast prices.
How many runs are enough?
There is no fixed count. Run it until the key outputs, such as the worst drawdowns, stop changing noticeably when you add more runs.
Is the Monte Carlo method only for experts?
The idea is simple: repeat a random experiment many times and look at the spread. A spreadsheet can do a basic version, but interpreting the result needs care.
