Guides · EA development

How many trades before you trust your EA? Sample size, Monte Carlo and the Z-score

ConfirmedTrades team · 13 July 2026 · 8 min read

Forty trades is an anecdote. How to work out the sample size your Expert Advisor needs, what a 1,000-run Monte Carlo adds, and how the Z-score catches streaks.

The question you are actually asking

"Does my EA work?" is not a question statistics can answer. "How likely is this result if the EA has no edge?" is. Reframe it that way and the answer depends on exactly three things: the size of the edge per trade, the noise per trade, and the number of trades. The first two are fixed by the strategy. The third is the only one you control by waiting, which is why, in algo trading, every experienced developer's answer to "is it ready" is "not yet".

This guide gives you the arithmetic to put a number on "not yet", then shows the two tools ConfirmedTrades computes for you: a bootstrap Monte Carlo and the runs-test Z-score.

Standard error: the back-of-envelope test

Take the expectancy (mean profit per trade) and the standard deviation of trade profit; both are on the account page. The standard error of the expectancy is the standard deviation divided by the square root of the trade count. Divide expectancy by standard error and you get a t-statistic. Below about 2, you cannot distinguish the edge from zero with any comfort.

Worked example: expectancy $8, standard deviation $50. After 100 trades the standard error is 50 / 10 = $5 and the t-statistic is 1.6. Not there. To reach t = 2 you need the square root of n to be 2 × 50 / 8 = 12.5, so n = 156 trades. To reach t = 3, which is where a careful person starts believing, you need 352 trades. Halve the edge to $4 and those counts quadruple: 625 and 1,406 trades. Thin edges need enormous samples, and most first EAs have thin edges.

The range of win rates consistent with a record, narrowing as trades accumulate90%72.5%55%37.5%20%50% — a coin tossthe real 55% edgefrom ~100 trades the edge is visible1025501002004008001600Closed trades in the recordWin rate
The blue band is the range of win rates still consistent with the record so far. For the first hundred trades or so it still contains 50% — meaning the numbers cannot yet tell a real edge from a coin toss, however good the total looks.
This test assumes trades are independent and the edge is stable. Neither is true for grid and martingale systems, whose trades are linked by design. For those, the real sample size is the number of baskets, not the number of tickets.

Trades are not enough; you also need time

Three hundred trades in six weeks of one-directional trending market tell you how the EA does in a six-week trend. The statistics above assume the trades were drawn from the same distribution, and a regime change breaks that. You want the EA to have traded through a range, a trend, a volatility spike and a dead patch, which in practice means at least six months and preferably a year. The Score's longevity component reflects both dimensions: its age part is fully earned at 180 days and its trade-count part at 200 trades.

A cheap stability test is to split the record in half by date and compare expectancy and profit factor in each half. If the second half is a different strategy from the first, the sample is not one sample. Custom Analysis on the account page does this filtering for you, and how long before a track record means anything covers the buyer's side of the same problem.

Monte Carlo: one history, a thousand futures

Your trading bot's forward-test drawdown is one draw. The same trades in a different order would have produced a different worst drawdown, possibly much deeper. The Risk Lab on ConfirmedTrades runs a bootstrap Monte Carlo: it draws trades at random, with replacement, from your EA's own closed-trade results, replays as many trades as the history contains (up to 1,000), and repeats that 1,000 times. It needs at least 20 trades to run at all.

What you get back is a fan chart with the median path, the middle 50% and middle 90% bands, plus tiles for the median outcome, the best and worst 5%, the expected maximum drawdown (median across runs) and the bad-luck drawdown at the 95th percentile. The chance-of-ruin ladder then reports how often the simulated account ever fell 10%, 25%, 50% or 80% below today's balance.

Reading it in practice: historical max drawdown 12%, Monte Carlo expected max drawdown 15%, 95th percentile 27%. The honest planning number is 27%, not 12%. If a 27% drawdown would make you switch the EA off, you are sized too large; position sizing and risk of ruin covers the fix.

Many reshuffled equity paths from a single trade history$26k$22k$18k$13k$9kstarting balancemedian outcomeunluckiest 5% still finish near $17kThe same trades, dealt in a different order
One trade history, dealt in many different orders. A record worth trusting is one where even the unlucky orderings finish somewhere you could live with.

What Monte Carlo cannot see

Resampling assumes future trades resemble past trades. It cannot invent the losing regime you have not met, and it treats trades as independent, so it understates the tail for any strategy whose positions are linked: grids, martingales, hedged baskets. The danger in those systems lives in the open basket, and the simulation only sees closed tickets. Check Max DD (equity) in Glance before trusting a fan chart.

The Z-score: are your wins and losses streaky?

ConfirmedTrades also shows a runs-test Z-score. Order the trades by close time, mark each as win or loss, and count the runs: a run is a streak of consecutive same-sign results. The Wald-Wolfowitz test compares the observed number of runs with what a random sequence with the same number of wins and losses would produce. Expected runs are 2WL/N + 1, and the variance is 2WL(2WL − N) divided by N²(N − 1). Z is the observed minus expected, over the square root of the variance.

Worked example: 100 trades, 60 wins, 40 losses, 35 runs observed. Expected runs are 2 × 60 × 40 / 100 + 1 = 49. The variance works out to about 22.8, so the standard deviation is 4.77, and Z = (35 − 49) / 4.77 = −2.9. The page converts that to a confidence, here above 99%, that the streaking is not random.

A strongly negative Z means wins follow wins and losses follow losses. For a trend EA that is expected and potentially exploitable. For a high-win-rate forex robot it is a warning: the losses cluster, so the longest losing streak will be longer than an independence assumption predicts, and Monte Carlo will be too optimistic. A strongly positive Z means alternation, which sometimes points to an EA that reverses after every stop-out. Near zero, with a small sample, means nothing yet.

The milestones

Write these down and do not move them after the fact.

  • Under 15 trades: the AI review says Insufficient data. It is right.
  • 15 to 30 trades: short-record flag. Look at behaviour (holding time, stops, symbols), not performance.
  • 100 trades: compute the t-statistic. If it is under 1.5, keep waiting; if it is over 3, check for a hidden basket.
  • 200 trades and 6 months: the Score stops penalising for sample; run Monte Carlo and size off the 95th-percentile drawdown.
  • Every 100 trades after: re-check the half-split. A real edge stays the same shape.

Free tools

The expectancy calculator and risk of ruin calculator are free and run in the browser. Connecting a forward-test terminal and publishing is free too; sign up and let the trade count climb on its own.

Do it in one place

On ConfirmedTrades, every published account shows its verification badges, an AI strategy analysis that flags martingale, grid and missing stop-losses, the full drawdown and risk stats, and execution costs per symbol — so you can vet a strategy before you trust it, or prove your own.

All guides