A Monte Carlo simulation in trading is a risk test that rebuilds a backtest thousands of times from its own trades in a random order or random draw. Instead of one equity curve it gives a spread of possible curves, and with it a realistic range for the maximum drawdown, the losing streaks and the risk of ruin.
What is a Monte Carlo simulation in trading?
A Monte Carlo simulation in trading takes the list of trades from a backtest and builds many new trade sequences from it by chance. Each sequence is one possible path the account could have taken with the same edge. Across thousands of paths you see which results are typical and which were luck.
The reason it matters: a backtest is a single path. The order in which wins and losses arrived was partly chance, and a different order of the very same trades can produce a much deeper drawdown. Monte Carlo shows how deep it could plausibly get.
Which Monte Carlo methods are used for a backtest?
Monte Carlo methods for a backtest differ in what they change at random. The two common ones work on the trade list; others change the trades themselves.
| Method | What changes | What it shows |
|---|---|---|
| Reshuffle (permutation) | The order of the trades; every trade used once | Drawdown and streak range. Final profit stays the same |
| Resample with replacement (bootstrap) | Trades drawn at random, some twice, some not at all | Range of final profit as well as drawdown |
| Skip trades | A random share of trades is left out | How much the result depends on catching every signal |
| Vary costs | Spread, commission or slippage per trade | How thin the edge is after costs |
| Vary parameters | Strategy inputs nudged around the chosen values | Whether the result sits on a stable plateau |
All of these reuse the trades of one backtest. If that backtest is overfit or has lookahead, the simulation inherits the flaw. Check those first: see overfitting and lookahead bias.
What does a Monte Carlo drawdown tell you?
A Monte Carlo drawdown is the maximum drawdown measured on every simulated path, sorted into a distribution. The median is the typical worst fall, and the 95th percentile is the fall that only one path in twenty exceeds. The 95th percentile is the number to plan your risk around.
An example: a backtest shows a maximum drawdown of 9 percent. Over 5,000 reshuffled paths the median maximum drawdown is 11 percent and the 95th percentile is 19 percent. The backtest drew a fairly lucky order. Live, a fall of around 19 percent is well within what the same edge can produce.
Losing streaks work the same way. With a win rate of 40 percent, the chance that any given 10 trades are all losers is 0.6 to the power of 10, about 0.6 percent. Over hundreds of trades a streak of that length somewhere along the way becomes far more likely, and Monte Carlo shows how likely.
What is risk of ruin and how do you calculate it?
Risk of ruin is the probability that an account falls to a level where you would stop trading, before it reaches its goal. The ruin level does not have to be zero: for most traders it is a drawdown of 20, 30 or 50 percent. Monte Carlo estimates it directly as the share of paths that touch that level.
For a simple case there is a closed formula. With a fixed stake, even payoff and a win probability p above one half, the chance of ever losing N stakes is (q / p) to the power of N, with q = 1 minus p. With p = 0.55 and an account of 20 stakes the risk of ruin is (0.45 / 0.55)^20, about 1.8 percent. With only 10 stakes it is about 13.4 percent. Halving the stake cut the risk of ruin by a factor of more than seven.
With compounding, a fixed percentage risk never reaches zero but the drawdowns still grow fast. Twenty losses in a row at 1 percent risk per trade leave 0.99^20, about 81.8 percent of the account, a drawdown of 18.2 percent. At 2 percent risk the same streak leaves 66.8 percent, a drawdown of 33.2 percent.
How do you use Monte Carlo to choose a position size?
Monte Carlo sets the position size from the drawdown you can accept rather than from the profit you hope for. Pick the largest drawdown you would sit through, then find the size at which the 95th percentile drawdown stays below it.
- Set your limit. Example: no more than a 10 percent drawdown.
- Run the simulation at the size you backtested. Example: 1 percent risk per trade gives a 95th percentile drawdown of 19 percent.
- Scale down. For small sizes the drawdown grows roughly in proportion to size, so 10 / 19 suggests about 0.5 percent risk per trade.
- Run it again at the new size to confirm, because compounding makes the scaling inexact.
- Check the risk of ruin at that size against the ruin level you set.
How does Monte Carlo work in the Orion Quant Technologies Engine?
In the Orion Quant Technologies Engine, Monte Carlo is the risk tab of the audit for a finished run. It draws thousands of paths, each built from the run's own trades with replacement, and shows the median with bands for the middle 50 and 90 percent of all paths. Beside it sit the maximum drawdown as a median with its range from P5 to P95, the chance of ruin below a level you set, the chance of profit, the median return, a Monte Carlo Sharpe and Sortino, and a risk score from 0 to 100.
Ruin or target first lets you set a ruin floor and a target and shows which one each path reaches first, and when. A curve of position size against both outcomes shows which sizes stay under your limit for the chance of ruin. The tail view gives VaR and CVaR per trade and per day, and the losing streaks of this run against the median, the 95th percentile and the worst path. The audit also reports the share of profit from the best ten trades, and the run report has a Monte Carlo section. The engine is in early access through the waitlist.
Frequently asked questions
How many Monte Carlo simulations are enough?
A thousand paths is a common minimum for the median and the main percentiles. For the tails, such as the 95th or 99th percentile drawdown, several thousand to ten thousand paths give steadier numbers. A simple check: run the simulation twice with different random seeds. If the 95th percentile moves noticeably between the two, use more paths.
Does a good Monte Carlo result prove a strategy works?
No. A Monte Carlo simulation only rearranges the trades the backtest already produced. If those trades come from an overfit strategy, from lookahead or from missing costs, every simulated path carries the same error. Monte Carlo answers how bad the drawdown can get with this edge, not whether the edge is real. Walk forward and out of sample tests answer that.
What is the difference between reshuffling and bootstrapping trades?
Reshuffling uses every trade exactly once in a new order, so the final profit is the same on every path and only the drawdowns and streaks change. Bootstrapping draws trades at random with replacement, so a big winner can appear twice or not at all. Bootstrapping therefore also gives a range for the final profit, and it is usually the more cautious of the two.
What are the limits of a Monte Carlo simulation?
Standard trade shuffling assumes the trades are independent of each other. Real trades often are not: losses cluster in certain market regimes, and the costs or volatility of one period differ from another. Shuffling breaks those clusters apart and can understate the risk. Read the result together with a look at how the strategy did in different regimes.
Research and testing only. A backtest shows how rules behaved in the past, not what they will earn. Nothing here is investment advice.