Live versus backtest divergence

The divergence monitor: the baseline backtest, the metrics and their thresholds, how live results are blended in, and when it notifies you.

The divergence monitor compares a live deployment with a completed backtest of the same strategy revision and tells you when live trading has become worse than the backtest said it would be. It only informs; it never pauses or stops a deployment.

The baseline

  • The baseline is a completed backtest of the same strategy and the same revision the deployment runs; another revision is refused ("measures another revision than the deployment runs").

  • It must have run in the account's currency: a backtest run in another currency is refused ("ran in EUR and this deployment's account is in USD"), and is not pinned at deploy. Profits in two currencies are not compared, and nothing is converted. A pin made before this rule existed on another currency evaluates nothing.

  • At deploy, the strategy's reference backtest is pinned automatically when it ran the deployed revision; otherwise nothing is pinned and the deployment page offers the pick. A portfolio bulk deploy pins each slot's own backtest.

  • You can re-pin any completed backtest of that revision, change the thresholds, or remove the pin (the monitor goes quiet for that deployment). Picking another backtest restarts the alert history; changing only the thresholds does not. A pinned backtest that was deleted reads "Reference deleted" and nothing is compared until a new pick.

  • The readout warns when the baseline ran without trading costs on an instrument it traded, and when the strategy's reference backtest has moved on since the pin.

The metrics and their lines

MetricKindFires whenSeverity
Max drawdownTripwireThe combined curve's max drawdown > the backtest's max drawdown × multiplier (default ×1)Critical
Losing streakTripwireThe combined longest losing streak > the backtest's × multiplier (default ×1)Critical
Profit factorDriftWorse than the backtest's by ≥ 10% (Warning) / ≥ 25% (Critical)Warning / Critical
SharpeDriftsameWarning / Critical
Win rateDriftsameWarning / Critical
Expected payoffDriftsameWarning / Critical
  • With the default ×1, the first live dip deeper than the backtest's worst drawdown, or the first losing run longer than its worst, fires — a backtest with no drawdown or no losing streak is no exemption.

  • Drift is the relative degradation (backtest value − combined value) ÷ backtest value, computed only when the backtest's value is above 0; the profit factor is not compared when the backtest had no losing trade.

  • Thresholds you set must satisfy: multipliers > 0; 0 < Warning band < Critical band < 1.

  • Verdict: Degraded if a tripwire fires or the worst drift is ≥ the Critical band; Degrading if the worst drift is ≥ the Warning band; otherwise Robust; "Backtest only" before the first live trade closes. It is the same verdict the portfolio page shows for the slot.

How live results are combined with the backtest

  • Drift metrics use the backtest's trades and the live trades together (one population, in close-time order), not the live trades alone. A few live trades therefore move them very little; the more trades the backtest has, the more live evidence it takes to cross a band. There is no minimum number of live trades.

  • Each trade is taken as a percentage of the balance it was opened on: the backtest's trades from its initial balance, the live trades from the deployment's own starting equity, each plus the trades closed before it opened. A deployment whose account grew, and whose trades grew with it, is not judged on size; a strategy that sizes on risk is read in the unit it keeps constant, however far the instrument's price has moved. Win rate and losing streak only read whether a trade won or lost.

  • Both sides are computed the same way. Each metric is worked out over the backtest alone and over the backtest with the live trades, by one formula, and the drift is the difference between the two: before the first live trade it is exactly zero, and one trade moves it only by what that trade says. The value shown for the backtest is its report's; the combined value shown is the report's, moved by that same difference.

  • Max drawdown and Sharpe come from one curve: the backtest's equity curve, continued by the live P&L from where the backtest ended, compared with the same curve without the live part (the tripwire fires when the live part sets a new worst on it). The live part is expressed as a percentage of the deployment's own starting equity (the account balance when it first started — the baseline), as the backtest's is of its initial balance. A deployment trading the backtest's lots on a ten times larger account therefore reads a tenth of the drawdown; trade it at the backtest's size relative to its balance, or the tripwire compares unlike risk. A deployment with no recorded starting equity is read against the backtest's initial balance.

  • The live curve includes open positions where the deployment's equity samples exist — its most recent 5,000 samples, one per minute with a price — and uses closed trades before that. Only live results after the backtest's last date extend the curve.

When it checks, and when it notifies

  • Every 300 seconds, for each deployment the engine is running (a paused one included; a stopped one is not checked). A deployment holding open positions is evaluated on every check, so the drawdown tripwire sees a deepening floating loss without waiting for a close. A flat deployment is re-evaluated only when a live trade has closed since its last check, or once on each new UTC day — while flat its drawdown cannot grow.

  • Per metric: one "Live divergence detected" notification when it crosses its line, then one reminder per UTC day while it stays over. It re-arms only when the value comes back to 90% of its line or less, so a value hovering at the line does not repeat. A metric that worsens from the Warning band to the Critical band during the same episode is announced again at once, as Critical (once per episode).

  • The notification reads e.g. "Live divergence detected — {strategy} · max drawdown 7.2% vs baseline 4.1%" and opens the deployment's Drift section.

  • The Drift section of the deployment page runs the same evaluation on demand: per metric "reference x · alert at y", the combined value and Clear / Warning / Critical, with "N live trades blended in"; a metric with nothing live yet shows no status.

  • What to do on an alert is yours: compare the deployment with its baseline, re-pin a more recent backtest, adjust the thresholds, or pause / stop the deployment yourself.

Questions?support@algotradinghub.io

Last updated Oct 14, 2026© 2026 AlgoTradingHub