Backtesting
QuantAnalyzer and MT5 Backtests: How Monte Carlo and What-If Analysis Test an EA Beyond the Tester Report
By Benjamin Lee · Updated · 10 min read
The MT5 Strategy Tester report tells you what one particular run did: one order of trades, one drawdown, one equity curve. It cannot tell you how lucky that order was, how much worse the drawdown could have been with the same trades in a different sequence, or what would have happened if you had skipped a few of them. That is the job of a separate analysis tool, and StrategyQuant's QuantAnalyzer is one of the best known. This guide explains what such a tool adds to an MT5 backtest, how Monte Carlo analysis works in plain terms, how to read the output, and how to run the core of the idea yourself in a spreadsheet if you would rather not buy anything.
Key takeaways
- A tester report shows one path. A Monte Carlo analysis shows the range of paths the same trades could have taken.
- The number to plan around is not the backtest drawdown but a high percentile of the simulated drawdowns.
- What-if analysis shows whether a strategy's profit depends on a few hours, days or trades.
- Money-management simulation compares sizing rules on the same trades. It is often worth more than another optimisation.
- Monte Carlo shuffles trades as if they were independent. It does not capture regime changes, so it supplements out-of-sample testing and does not replace it.
What the MT5 report cannot tell you
Open a Strategy Tester report and you see a clean summary: net profit, profit factor, maximum drawdown, win rate, an equity curve. All of it comes from a single sequence of trades in the order they happened. That order is one draw from a large number of possible orders. If the same 400 trades had arrived in a slightly different sequence, the total profit would be identical and the drawdown could be very different, because drawdown depends on when the losing trades cluster, not on how many there are. The report cannot show you that spread. Our guide to reading an MT5 backtest report covers what the report does contain.
There is a second gap. The tester has no built-in way to ask 'what if I had not traded on Fridays', 'what if 10 percent of my trades had been missed because of a requote', or 'what if I had risked a fixed percentage instead of a fixed lot'. Those questions are the difference between a backtest and an understanding of a strategy, and they are what analysis tools are for.
What QuantAnalyzer is
QuantAnalyzer is analysis software from StrategyQuant, the company behind the StrategyQuant X strategy builder. Its own page describes it as a way to 'analyze your backtests or real trading results in a quantified way', with extensive reports, simulations and a portfolio tool. According to that page it offers a Monte Carlo simulation to 'estimate strategy robustness and real edge', a what-if simulator for scenarios such as trading only at certain hours or on certain days, a money-management simulator, equity-control simulations and a Portfolio Master for combining uncorrelated strategies. It runs on Windows and comes in a free version and a Pro version. The vendor's page says the free version limits some features, for example the money-management and equity-control results are shown for 30 percent of trades and Portfolio Master handles four strategies. See the StrategyQuant QuantAnalyzer page for the current terms and price.
Getting an MT5 backtest into an analysis tool
Step 1: 1. Run a backtest worth analysing
Use every tick based on real ticks, a long date range that includes different regimes, realistic spread and the settings you intend to trade. An analysis of a poor backtest only describes the poor backtest.
Step 2: 2. Save the report
In the tester's Results tab, right-click and use the option to save the report. The HTML report contains the list of deals; some tools also accept a CSV or an export of the deal list.
Step 3: 3. Load it
Import the file into the tool. Check that the number of trades, the net profit and the maximum drawdown match what MT5 showed. If they do not, stop and fix the import before you read anything else.
Step 4: 4. Keep a copy of the settings
Write down the symbol, timeframe, inputs, date range and execution model next to the file, so you can reproduce the run.
If the strategy has been running live, the same tools accept real trade history, which lets you compare a live record with the backtest of the same EA. That comparison is often the most informative thing a trader can do; see backtest versus live results.
Monte Carlo analysis in plain words
Monte Carlo analysis takes the trades from your backtest and replays them many times with some element of chance changed, then looks at the spread of outcomes. The simplest version reshuffles the order of the trades. You keep the same set of wins and losses and put them in a random order, a thousand times, and for each reshuffle you record the final profit and the maximum drawdown. Because the set of trades is the same, the final profit is the same every time. The drawdown is not, and that is the point.
Other versions change different things: resampling trades with replacement, so a big winner can appear twice or not at all; randomly skipping a percentage of trades, to model missed fills; varying the spread or slippage; or adding a small random change to each trade's result. Each answers a different question about fragility, and the tool will describe which options it has. What they share is the output: a distribution, not a single number.
| Statistic | Backtest | Monte Carlo (1,000 runs) | What to do with it |
|---|---|---|---|
| Final profit | +38% of balance | +38% in every reshuffle | Unchanged by reordering; resampling would vary it |
| Maximum drawdown | 12% | Median 15%, 95th percentile 24% | Plan for the 95th percentile, not the 12% |
| Longest losing streak | 7 trades | Median 8, 95th percentile 12 | Can you keep trading through 12 losses in a row? |
| Chance of a drawdown above 30% | Not shown | About 2% of runs | Decide if 2% is acceptable at your size |
| Chance of ruin at your risk setting | Not shown | 0% at 1% risk, 9% at 3% risk | Choose the risk setting from this, not from the profit |
The practical rule: take the 95th percentile of the simulated maximum drawdown as your planning figure, and size the account and the risk so that figure is something you could sit through. The backtest's own drawdown is the best case among plausible orderings, not the typical one. This is the single most useful number a Monte Carlo analysis gives, and it needs no statistics to use.
What-if analysis: does the profit depend on a few trades?
A what-if simulator removes parts of the trade list and recalculates. The questions are simple and revealing. What if you trade only the London session? What if you skip Mondays, or the day of high-impact news? What if the best five trades had not happened? A strategy whose profit survives those cuts is spread across many trades and conditions. One whose profit disappears when five trades are removed was a handful of lucky events with a lot of noise around them.
| What-if | What it reveals |
|---|---|
| Remove the best 5 or 10 trades | Whether the profit is concentrated in a few outliers |
| Remove the worst 5 or 10 trades | How much a bad run of luck, or a rare event, is costing |
| Trade only one session or day | Whether the edge lives in specific hours, and so is fragile to broker time settings |
| Skip 10 percent of trades at random | How the strategy copes with missed fills, requotes and downtime |
| Add 1 pip of extra cost per trade | How much of the profit is eaten by a slightly worse spread or slippage |
| Long trades only, short trades only | Whether one side carried the result, a sign it rode one trend |
Interactive: win rate is not edge
- Expected result per trade
- +0.35
- Profit factor
- 1.64
- Break-even win rate
- 33%
At these numbers the system has a positive edge before costs. Add spread, commission and slippage per trade and re-check.
The extra-cost test deserves special attention for any short-term system. If a one-pip change turns a profit factor of 1.4 into 1.05, the strategy has no real margin for the difference between the tester's spread and yours. Our scalping guide explains why costs dominate small targets.
Money-management simulation: the same trades, different sizing
A tester run uses one sizing rule. A money-management simulator replays the same trades with others: a fixed lot, a fixed percentage of equity, a fixed fraction with a drawdown cap, a reduction after consecutive losses. It is often more valuable than another round of optimising entries, because sizing controls survival. With the same trades, fixed-percentage sizing compounds faster and draws down deeper in dollar terms than a fixed lot; reducing size after a losing streak cuts the drawdown at some cost to growth. Seeing the trade-off on your own trades is better than any rule of thumb. Our guides to lot sizing methods and how much money to run an EA go into the choices.
A free way to run the core idea in a spreadsheet
You do not need to buy software to learn what a Monte Carlo shuffle shows. With a spreadsheet and your trade list you can run a simple version in about fifteen minutes.
- Export the deals. Copy the profit of each closed trade from the MT5 report into one column, in percent of balance or in money.
- Shuffle. Add a column of random numbers next to it, then sort the two columns by the random column. The profit column is now in a random order.
- Build the equity curve. In a third column add a running total. In a fourth, the running maximum, and in a fifth, the difference between them: the drawdown.
- Record the result. Note the largest drawdown. Recalculate (most spreadsheets re-draw random numbers on a recalculation) and record again. Repeat 100 to 500 times by hand or with a short macro or script.
- Look at the spread. Sort your recorded drawdowns and read off the median and the 95th percentile.
A few lines of a scripting language do the same job faster, and the logic is identical. The point is not the tool. It is the habit of asking how much of a result was the order of the trades.
A workflow that uses all of this
If you buy EAs rather than build them, the same questions are what we ask in our EA verdicts: is there a record anyone can open, how deep were the worst stretches, and does the profit depend on a few trades. A seller who can show you a trade list can show you all of the above.
Sources and further reading
- MetaTrader 5 Help: Strategy TestingThe Strategy Tester: testing modes, settings and forward testing.
- MetaTrader 5 Help: Testing ReportWhat each figure in the tester's report means, including drawdown.
- Bailey, Borwein, López de Prado and Zhu: Pseudo-Mathematics and Financial Charlatanism (Notices of the AMS, May 2014)A plain-language account of how backtest overfitting produces strategies that fail out of sample.
Frequently asked questions
What is QuantAnalyzer?
QuantAnalyzer is StrategyQuant's software for analysing backtests and real trading results. Its page lists Monte Carlo, what-if, money-management and equity-control simulations and a Portfolio Master, with a free and a Pro version. Check the current page for supported formats and price.
What is Monte Carlo analysis of a backtest?
It replays the trades from a backtest many times with something randomised, most simply their order, and records the final profit and maximum drawdown of each replay. The result is a range of outcomes, not the single path in the tester report.
Which drawdown should I plan for?
Plan around a high percentile, such as the 95th, of the simulated maximum drawdowns, not the backtest's own figure. The backtest shows one ordering of the trades; the distribution shows how bad a plausible ordering can be.
Can I do Monte Carlo without buying software?
Yes. Copy the trade profits into a spreadsheet, shuffle them with a column of random numbers, build the equity curve and the drawdown, and repeat. A short script does it faster. The method is the same.
Does a good Monte Carlo result mean an EA will work live?
No. Monte Carlo reshuffles trades within one history and assumes they are independent. It cannot reproduce regime changes or costs the backtest did not include, so use it alongside out-of-sample testing and a demo forward test.
Expert Advisors in these styles
Apply the checks above to any of these before you buy: read the manual, run your own backtest, and start on demo.
Keep reading
- BacktestingHow to Backtest an EA in MT5 ProperlyLearn how to backtest an Expert Advisor in MT5 the right way: tester modes, spreads, delays, optimisation, walk-forward checks and the red flags to avoid.
- BacktestingHow to Read an MT5 Backtest ReportLearn to read an MT5 Strategy Tester report line by line: drawdown, profit factor, Z-score, trade quality, robustness checks and the red flags that expose a weak EA.
- BacktestingWalk-Forward Analysis in MT5: A Practical GuideWalk-forward analysis for MT5 Expert Advisors: in-sample and out-of-sample periods, the tester's Forward setting, a manual rolling process and how to read results.
- BacktestingWhy EA Live Results Differ From Backtests (and What to Do)Why EA live results differ from backtests: spread, slippage, delay, data, overfitting and more. Eleven causes, how to check each and how to close the gap.


