Challenge Odds › Challenges › Is my EA backtest overfitted?

EA · backtest · overfitting

Is your EA backtest overfitted?

Optimising an Expert Advisor means trying many settings and keeping the best backtest. Even when no setting has any edge, the best one looks good. Below: an experiment with 200 settings of a strategy that cannot win, the signs of a curve-fitted backtest, and the bar a result has to clear for the number of settings tried.

Check your EA’s backtest free →Order a full audit

An experiment: 200 settings of a strategy with no edge

Each setting trades 300 times; every trade wins or loses 1R with a 50/50 chance, no costs. None of them has an edge. We keep the best backtest, as optimising does, then let it trade 300 more times.

Best of 200 backtestsIts next 300 trades
Net result+46R−10R
Win rate57.7%48.3%
Profit factor1.360.94
Edge vs luck (t)2.68-0.58

13 of the 200 no-edge settings clear the usual one-test bar (t ≥ 1.64). Repeated 2,000 times: the best backtest makes +47.6R on average, the next 300 trades +0.1R. The best clears the one-test bar in 100% of the repeats, and the bar for 200 settings tried (t ≥ 3.48) in 5.6%: about the 5% it is built for.

Why the best backtest lies

Signs of an overfitted backtest

What to do before you trust an EA

  1. Ask how many settings were tried, and judge the result against the bar for that number: about 1.6 for one honest test, 3.1 for 50, 3.5 for 200.
  2. Look for trades the optimiser never saw: a period after the backtest, or a live record of several months.
  3. Ask for several hundred trades. Below 100, a backtest cannot tell an edge from luck.
  4. Stress the costs and see how much extra cost per trade erases the edge.
  5. Drop the report into the free checker: it runs these checks in your browser and shows the bar for 1, 10, 50 and 200 settings.

An experiment with simulated trades, for education. Not a recommendation to buy or use any EA, not financial advice. Past performance is not indicative of future results.

Questions

What is overfitting in an EA backtest?

Tuning an EA’s settings until the backtest looks good on that particular history. The settings fit the luck in the data, so the result does not repeat on new data.

How many trades does an EA backtest need?

At least 100 closed trades to say anything, better several hundred, and more when many settings were tried, because the bar for luck rises with the number of settings.

Is a high profit factor proof of an edge?

No. In our experiment the best of 200 settings with no edge had a profit factor of 1.36 over 300 trades. What matters is whether the result clears the bar for the settings tried and holds on trades the optimiser never saw.

Can I check my EA backtest for overfitting for free?

Yes. The EA backtest checker reads MT5 and MT4 Strategy Tester reports and Myfxbook CSV files in your browser and shows the bar for the settings tried, the second half, the top trades and the cost cushion.

Check your EA’s backtest

Drop a Strategy Tester report or a Myfxbook CSV: edge vs luck for the settings tried, in your browser, free.

Open the EA checker →

Get an email when a firm changes its rules

Prop firms change targets, limits and prices without much notice. Pick the firms you follow; we write only when their rules change, and about special prices only if you tick that box.

Double opt-in: you get a confirmation email and are added only after you click it. Addresses are kept by our email service, Zoho Campaigns; every email has an unsubscribe link.

Run a trading site? Embed this calculator

Free, no sign-up, no tracking. Paste this where you want it; it keeps working when firm rules change.

See it working →