How do you check if a live EA still matches its backtest? - page 2

Hi Chris,

Good thread. Two things I haven't seen mentioned yet that helped me a lot.

1. Make sure the backtest itself is worth comparing against.
In MT4 a "Control points" or "Open prices" test can look completely different from live, so I only compare against Every tick tests and check the modelling quality in the report (90% is what MT4 gives with its own history). I also run the test with a spread close to my real average spread, not the fixed default, and then once more with a wider spread as a stress test. If the EA only survives with the tight spread, live will drift away from the backtest very early. In MT4 the tester also doesn't know your commission, so I add it to the spread or account for it manually – on a scalper that alone can turn a good backtest into a losing live account.

2. A switch-off line based on the EA's own statistics.
From the backtest I take the win rate and work out how long a losing streak is still normal. Roughly: with a win rate p and N trades, the longest expected losing streak is about log(N) / log(1/(1-p)). If live goes clearly beyond that – or beyond the longest losing streak in the windowed backtests – I stop and investigate, even if the drawdown is still below the backtest maximum. It reacts faster than drawdown, because drawdown depends on the lot size and on where in the cycle you started.

For the slow drift that nobody spots: I keep a rolling average of the slippage and of the time between the signal bar and the real fill over the last 20 trades. When that slowly gets worse, it's usually the VPS, the broker server or the spread at that hour – not the strategy.

Best regards.

Toyamato

Files:
Toyamato Forex #:

Hi Chris,

Good thread. Two things I haven't seen mentioned yet that helped me a lot.

1. Make sure the backtest itself is worth comparing against.
In MT4 a "Control points" or "Open prices" test can look completely different from live, so I only compare against Every tick tests and check the modelling quality in the report (90% is what MT4 gives with its own history). I also run the test with a spread close to my real average spread, not the fixed default, and then once more with a wider spread as a stress test. If the EA only survives with the tight spread, live will drift away from the backtest very early. In MT4 the tester also doesn't know your commission, so I add it to the spread or account for it manually – on a scalper that alone can turn a good backtest into a losing live account.

2. A switch-off line based on the EA's own statistics.
From the backtest I take the win rate and work out how long a losing streak is still normal. Roughly: with a win rate p and N trades, the longest expected losing streak is about log(N) / log(1/(1-p)). If live goes clearly beyond that – or beyond the longest losing streak in the windowed backtests – I stop and investigate, even if the drawdown is still below the backtest maximum. It reacts faster than drawdown, because drawdown depends on the lot size and on where in the cycle you started.

For the slow drift that nobody spots: I keep a rolling average of the slippage and of the time between the signal bar and the real fill over the last 20 trades. When that slowly gets worse, it's usually the VPS, the broker server or the spread at that hour – not the strategy.

Best regards.

Toyamato


Thanks Toyamato,

the losing streak line is the one i like most. It doesn't care about lot size or where in the cycle you started, so it should show up earlier than the drawdown.

I tried your formula on a simple case. 60% win rate and 500 trades gives about 7 losses in a row as the longest normal streak. Two things I would add. It's an average, so one or two more can still be normal. And many EAs lose in clusters, for example in one market phase, and then the real streaks are longer than the formula says. So I'd take the longest streak from the backtest windows as the line, and use the formula as a quick check when the backtest is short.

The spread stress test I'll take too. If an EA only works with the tight spread, thats something you want to know before it goes live, not after.

Chris :)