What is Monte Carlo simulation? A futures trading example
Monte Carlo simulation repeats one calculation many times with random inputs and reads the whole range of outcomes. For a futures trader the inputs are the backtest's own trades: shuffle their order many times and the one drawdown in the report becomes a range of drawdowns to plan account size for.
By Soren Huang · Published · updated · Editorial policy
Contents
What is Monte Carlo simulation?
Monte Carlo simulation is a method that repeats one calculation many times with random inputs and reads the whole range of results, not one number. For a futures trader the inputs are the strategy's own trades, and the backtest equity curve is only one of many orders those trades could have come in.
Think of a deck of cards. The cards in the deck are fixed, but each shuffle changes which card comes first. A trade list is the same: the backtest gives you a fixed set of wins and losses, but the order they arrived in was partly luck. Maximum drawdown is the largest fall from an equity peak to the following low before a new peak, and it depends heavily on that order. Three losses spread across a year make a shallow dip; the same three losses in a row make a deep one. You can measure the drawdown of any equity series with the free drawdown calculator; Monte Carlo asks what that number would have been in other orders.
The Monte Carlo method is used the same way in engineering and finance: when a single answer hides a spread of possibilities, you draw random inputs many times and look at the spread. In trading the version most people mean is trade-order Monte Carlo, which this article explains.
How does a Monte Carlo simulation work on a list of trades?
A trade-order Monte Carlo keeps every trade result and changes only the sequence, so the only thing it measures is how much the sequence moved the drawdown. The loop is short:
- Take the closed-trade list from the backtest: one profit or loss per trade, after commission and slippage.
- Shuffle the order. A plain shuffle uses each trade once. Redrawing with replacement picks trades at random and may pick the same one twice; this is the bootstrap method, and it also varies which trades appear, not only their order.
- Rebuild the equity curve from the new sequence.
- Record the maximum drawdown and the end result of that curve.
- Repeat one thousand to 10,000 times and collect the recorded drawdowns into a distribution.
A distribution is the full set of recorded drawdowns, usually drawn as a histogram: how many runs ended with a drawdown in each size bucket. The original backtest drawdown is one value somewhere inside it. The whole loop fits in a spreadsheet; the Monte Carlo simulation in Excel guide builds it column by column.
A small worked example: ten trades, one thousand shuffles
The same ten trades can produce a drawdown more than twice the original one, which is why the planning number comes from the distribution and not from the backtest. Round numbers make this visible.
Hypothetical example
A strategy closed ten trades, in this order: +$400, −$300, −$300, +$500, +$600, −$200, +$300, −$400, +$500, −$200. The net result is +$900 and the drawdown in this order is $600 (the two losses after the first win). The five losses add up to $1,400, so if all of them arrived in a row the drawdown would be $1,400 with the same net result. Suppose one thousand shuffles give a histogram that peaks near $800, and that 95 out of every 100 shuffles stay under $1,200. That $1,200 is the 95th percentile, and it is the drawdown to size the account for. The original $600 was a lucky order.
A real trade list looks like the run below from AlphaPrime (Valynox). It tested a MACD rule as the only entry and exit, no stop, target or filter, on ES daily bars from 2019-01-02 to 2025-06-30, long and short, one contract. The MACD rule is a stand-in built from a standard indicator; it is not the subject of this article. The run is the one candidate a search kept out of 1,024 it tried, chosen for its return against its drawdown, and picking the kept one after the fact flatters its numbers. Its 169 closed trades are the input you would shuffle, and $22,175 is the drawdown in the order that actually happened.
Source: AlphaPrime product engine (CPU), run 2026-10-31. ES daily bars, 2019-01-02 to 2025-06-30, long and short, 1 contract, $20 commission and $25 slippage per trade.
| Number | Result |
|---|---|
| Net profit (closed trades) | $69,220 |
| Max drawdown | $22,175 |
| Trades | 169 |
| Win rate | 50.89% |
| Profit factor | 1.46 |
| Average trade | $409.59 |
| Time in market | 16.23% |
Shuffling those 169 trades would show whether $22,175 sits in the middle of the drawdown distribution or in its lucky tail. Nothing about the shuffle changes the fact that the rule was selected after the fact, so the net profit is a description of the past, not something a reader can expect.
What does a Monte Carlo simulation tell you, and what does it not?
Monte Carlo rearranges the evidence in a trade list; it never adds evidence. That one sentence separates the questions it answers from the questions it cannot.
| Question | Trade-order Monte Carlo |
|---|---|
| How wide is the range of drawdowns from trade order alone? | Answers it |
| Was the backtest drawdown typical or lucky? | Answers it |
| What account size covers a chosen drawdown percentile? | Answers it |
| How likely is a losing stretch of a given length? | Answers it |
| Are the rules overfitted to the history? | Does not answer |
| Did testing 1,024 variants inflate the kept candidate? | Does not answer |
| Will future trades resemble the past? | Does not answer |
| Were costs and fills modelled correctly? | Does not answer |
The second group matters because it is where most backtests go wrong. Selection bias from testing many variants and keeping the best is documented by Bailey and colleagues (2014); an inflated trade list stays inflated no matter how often you shuffle it. Why the best backtest is usually inflated covers that problem, and what a Monte Carlo backtest shows and does not show goes deeper into the limits listed here.
When should you run it in a research workflow?
Run Monte Carlo after costs and validation, and before you choose account size, because it only interprets the trades it is given. The order of the whole workflow is:
- Backtest with commission and slippage included, so every trade in the list is a net trade.
- Validate. The walk-forward step in AlphaPrime's strategy validation produces the out-of-sample trades, and those, not the in-sample ones, are the list worth shuffling.
- Run Monte Carlo on that out-of-sample trade list and read the 95th percentile drawdown.
- Choose account size and contract count from that percentile; the free position size calculator turns a risk amount and stop distance into contracts.
- Export the strategy to the trading platform.
The method does not care what the trades were in. A futures trade list, a stock list and an ETF list all shuffle the same way; the backtesting guide for Taiwan stocks and ETFs shows a 0050 example whose trade list fits the same loop.
Your next step: take the closed-trade list from your last backtest, shuffle it one thousand times, and compare the 95th percentile drawdown with the account size you had planned. If the percentile is larger than the drawdown you were prepared to sit through, reduce the contract count before anything else.
Frequently asked questions
What is a Monte Carlo simulation in simple terms?
It is a way of answering a question by running the same calculation many times with random inputs and looking at the spread of answers. In trading, the random input is the order of your backtest trades. The spread of drawdowns across many shuffles tells you how much of the single backtest drawdown was luck of sequence.
What is Monte Carlo analysis in trading?
Monte Carlo analysis is the reading of the results after the simulation runs: the histogram of drawdowns, the percentile you plan for, and how the original backtest compares with it. The simulation produces the distribution; the analysis turns it into an account size and a contract count.
How many Monte Carlo runs are enough?
One thousand shuffles gives a stable picture of the middle of the distribution for most trade lists. The tails, such as the 95th or 99th percentile, settle more slowly, so several thousand runs are common when the percentile decides account size. The runs are cheap, so repeat the whole simulation twice and check that the percentile barely moves.
Does Monte Carlo simulation predict future returns?
No. It rearranges the trades a strategy already produced and shows the range of drawdowns those trades could have formed. It cannot know whether future trades will look like past ones, and it cannot repair a trade list that was inflated by testing many variants and keeping the best.
References
- Efron, B. (1979). Bootstrap Methods: Another Look at the Jackknife. The Annals of Statistics, 7(1), 1–26.
- Bailey, D. H., Borwein, J., López de Prado, M., & Zhu, Q. J. (2014). Pseudo-Mathematics and Financial Charlatanism: The Effects of Backtest Overfitting on Out-of-Sample Performance. Notices of the American Mathematical Society, 61(5), 458–471.
- Magdon-Ismail, M., & Atiya, A. F. (2004). Maximum Drawdown. Risk, 17(10), 99–102.

