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

Hi everyone,

there were a few threads here lately about backtest vs live. Most ask why the two differ. I'd like to ask something a bit different: how do you notice it early enough?

What I do with my EAs is pretty simple. I run the backtest over the same weeks as the live trades, on my broker's data, and put both trade lists next to each other by entry time. Same trades with slightly worse prices is costs, thats normal. Trades that show up only on one side mean the EA live is not the EA I tested.

I also only count from the last update. A new version is basically a new EA, so the clock starts again.
Example from an EA I looked at, not one of mine. Same EA, backtest vs the seller's own live signal.

backtest-vs-live

What I havent really solved for myself is the line. When is a difference still noise, and when do you switch the EA off? Drawdown above the backtest, a few weeks below it, something else?

Curious how you handle it.

Best regards
Chris
Chris K.:
[T]here were a few threads here lately about backtest vs live. Most ask why the two differ. I'd like to ask something a bit different: how do you notice it early enough?

It's basically impossible to discern the specific differences between 2 black box utilities. At the end of the day, you don't have the source code of the Product, and you don't even have the EA of the Signal. Additionally, a 72 week bactest versus 7 weeks of signals is an apples to oranges comparison.

What we can discern is the fact that there are about 10 x the number of signal weeks in the backtest, but only about 4 x the number of signal trades in the backtest.

The wide array of different OTC broker-dealer feeds, and the wide array of potential input parameter settings, only add to the futility of attempting to discern differences.

The moral of the story is... Don't trade black box utilities.

Ryan L Johnson #:

It's basically impossible to discern the specific differences between 2 black box utilities. At the end of the day, you don't have the source code of the Product, and you don't even have the EA of the Signal. Additionally, a 72 week bactest versus 7 weeks of signals is an apples to oranges comparison.

What we can discern is the fact that there are about 10 x the number of signal weeks in the backtest, but only about 4 x the number of signal trades in the backtest.

The wide array of different OTC broker-dealer feeds, and the wide array of potential input parameter settings, only add to the futility of attempting to discern differences.

The moral of the story is... Don't trade black box utilities.

Hi Ryan,

you're right, 72 weeks against 7 is not a fair comparison. Thats exactly why I don't do it like that with my own EAs, I run the backtest only over the same weeks as live. The picture is how it usually looks when you buy one, the seller puts the whole backtest next to a short signal.

But the number you found is the interesting part. 10x the weeks and only 4x the trades means the live signal trades about 2.5 times more often per week than the backtest. Without any source code, thats already a reason to ask the seller which settings the signal runs on.

On black boxes I agree in theory. In practice most people here buy them anyway, so I'd rather check what comes out than pretend they won't.

Thanks for looking at it so closely.
Chris

Hi Chris,

I'd separate two checks: whether the EA is behaving as intended, and whether its performance remains acceptable.

For the first, compare the same dates, version and inputs, then investigate the first unmatched trade. A missing trade alone doesn't prove different logic: execution differences can change which positions remain open and affect later entries. Where logs are available, check signal time, spread filters, trade requests and rejection codes.

For performance, I'd define the review criteria and account risk limit before running live. Exceeding historical drawdown deserves investigation, but the backtest maximum isn't a guaranteed ceiling. A short losing period alone also doesn't establish that the strategy has stopped working.

  1. Very few EAs run with their default settings. Read the comments, you’ll see that most buyers ask for the settings after purchasing.

  2. Not all signals presented for an EA are identified by MetaQuotes as 100% algorithmic trading.

  3. Many EAs have trading-hour filters or news filters. The latter do not work in backtests because historical price data does not include economic calendar data.

At most, you can compare entries and exits and only if the live trades also appear in the backtest. Drawdown, lot size, etc., are irrelevant.

You’re comparing a train to a ship.

Hi Muhammad, hi Ghenadie,

thanks for both answers.

@Muhammad Andiya Nafhan , the first unmatched trade is the part I was missing. If one trade is missing live, every trade after it can look different, even when the logic is the same. So I'd stop comparing at that point, find out why, and start again from there. Writing the review rules down before going live also answers my question about the line. I just think very few people do it before the first bad week.

@Ghenadie Tumco , the news filter is a good example. A trade that is in the backtest but not live, right before NFP, is probably the filter and not a different EA. And yes, the settings come first. Without the settings the signal runs on, the whole comparison makes no sense.

Where I see it a bit different is lot size. Comparing drawdown in money between two different settings is useless, i agree. But if the live account opens bigger lots per 1,000 of balance than the test did, thats something I want to know early. Thats usually how grid accounts get into trouble.

Best regards,
Chris

Hi Chris,

Good question, I've been working on the same thing. Same weeks, same broker's data, trade lists side by side is how I do it too.

For the line, I set it before the EA goes live and write it down. I pull three numbers from the backtest: the worst drawdown, the longest time it stayed below its last equity high, and the biggest single loss. If live goes past any one of those on the same broker's data, I pause it and dig in. Inside those limits I treat it as normal noise.

One thing I check first now is the broker's data. I ran the same EA with the same settings on a few brokers' data and one pair's worst drawdown was more than 20x bigger on one feed than on another. Swap was way different too. So I always rerun the test on the broker I'm actually trading before I decide the EA changed.

How are you setting yours?

the line I would draw is the trade count, not the drawdown. a backtest's worst drawdown is one extreme out of however many trades it ran. your live weeks are a different count, so above the backtest is not a reason to switch off until both sides carry a similar number. you already reset the clock at every update, so what is left is the sample, not the version. what I would do instead: run the backtest longer than your live window, cut it into windows the length of the live one, and look at the spread of drawdowns. live inside that spread is still noise. outside it is worth a closer look. how many trades does your backtest carry?
Good morning Mark, hi Jevon,

@Mark Ayoub 
the three numbers are a simple way to write the line down. The longest time below the last equity high is one I havent used so far, and I think its the one most people ignore. An EA can look fine on drawdown and still be under water for months. The broker's data I already use, but 20x on one pair is more than I would have guessed.

@Jevon Naldo Yoshield
this is the part that was missing for me. The worst drawdown of a long backtest is one extreme, and a few live weeks can't really be held against it. Cutting the backtest into windows as long as the live part and looking at the spread makes much more sense. Live inside the spread is noise, outside I take a closer look.

To your question, honestly I never counted it like that. After an update the live part is often only a few weeks, so the sample is small anyway. I'll try your windows on the next one.

So for me it would be Mark's three numbers, but taken from those windows and not from the whole test.

Thanks to both of you.
Chris
Chris K. #:
Good morning Mark, hi Jevon,

@Mark Ayoub 
the three numbers are a simple way to write the line down. The longest time below the last equity high is one I havent used so far, and I think its the one most people ignore. An EA can look fine on drawdown and still be under water for months. The broker's data I already use, but 20x on one pair is more than I would have guessed.

@Jevon Naldo Yoshield
this is the part that was missing for me. The worst drawdown of a long backtest is one extreme, and a few live weeks can't really be held against it. Cutting the backtest into windows as long as the live part and looking at the spread makes much more sense. Live inside the spread is noise, outside I take a closer look.

To your question, honestly I never counted it like that. After an update the live part is often only a few weeks, so the sample is small anyway. I'll try your windows on the next one.

So for me it would be Mark's three numbers, but taken from those windows and not from the whole test.

Thanks to both of you.
Chris

Good question. In my experience the matching step decides how early you see it.

I do roughly what you describe, with a few additions that made it catch problems sooner:

  • Match on more than entry time. Use symbol, direction and entry time within a small window, and convert both sides to the same server time first. Tester and broker clocks are often an hour or two apart, and that alone produces fake "one-sided" trades. When several orders open in the same second, pair them in order.
  • Split the gap per matched trade into its parts: entry price difference, exit price difference, commission and swap. Then keep a separate count of trades that exist on only one side. Costs drift slowly. Unmatched trades are the real alarm, and even one is worth a look.
  • Look at entries and exits by order type. Market entries, pending entries, and SL/TP exits behave differently. A gap that only shows on market exits points to a different cause than one on stop entries.
  • Group by magic number, not by account. An EA that fires 20 orders at once gets filled differently from one that sends a single order. Averaging them together hides both.
  • Don't judge costs before about 30 matched trades. One-sided trades you can act on immediately. Slippage needs a sample.

Agreed on versions: a new build is a new EA. I also restart the count when the broker, account type or VPS changes, because fills change with them.


Abdullah Uygar Tuna #:

Good question. In my experience the matching step decides how early you see it.

I do roughly what you describe, with a few additions that made it catch problems sooner:

  • Match on more than entry time. Use symbol, direction and entry time within a small window, and convert both sides to the same server time first. Tester and broker clocks are often an hour or two apart, and that alone produces fake "one-sided" trades. When several orders open in the same second, pair them in order.
  • Split the gap per matched trade into its parts: entry price difference, exit price difference, commission and swap. Then keep a separate count of trades that exist on only one side. Costs drift slowly. Unmatched trades are the real alarm, and even one is worth a look.
  • Look at entries and exits by order type. Market entries, pending entries, and SL/TP exits behave differently. A gap that only shows on market exits points to a different cause than one on stop entries.
  • Group by magic number, not by account. An EA that fires 20 orders at once gets filled differently from one that sends a single order. Averaging them together hides both.
  • Don't judge costs before about 30 matched trades. One-sided trades you can act on immediately. Slippage needs a sample.

Agreed on versions: a new build is a new EA. I also restart the count when the broker, account type or VPS changes, because fills change with them.


Hi Abdullah,

thanks for writing it out in that detail. The part I take from it are the one-sided trades. I would have looked at the total gap first, but costs move slowly. A trade that exists only in the backtest is a different kind of problem, and one of those says more than a few pips of slippage.

Magic number instead of account also makes sense, especially when one EA on the account opens a whole basket at once.

On the versions I'd keep it a bit softer after the discussion in the other thread. Restart the count with a new build, yes. But if it was only a logging fix, I wouldnt throw the old history away completely, I'd keep it as context.

Best regards,
Chris