BJF TRADING GROUP · SHARPTRADER OPTIMIZER
Most published latency arbitrage backtests look spectacular on paper and collapse the moment they go live. The reason isn’t bad strategy logic — it’s that standard retail backtesters silently assume zero-latency fills. This guide breaks down exactly how millisecond-level execution time changes the math, and what your backtest must model to produce results you can actually trade.
Latency arbitrage profitability lives inside a 50–200 millisecond window. That’s how long the price discrepancy between a fast feed and a slow broker typically stays open before the slow broker’s quote updates. If your actual round-trip execution time — from signal detection to confirmed fill — consumes most of that window, you have almost no margin left. Standard retail backtesters assume orders fill instantly at the displayed price, which deletes this entire problem from the simulation. The result: a backtest that looks like printed money and a live deployment that loses on every trade after spread.
This article quantifies the gap, breaks down where the milliseconds actually go, and explains how to model execution time inside a backtest so the numbers you ship match the numbers you’ll see on a live account.
Watch: how execution time changes a latency arbitrage backtest — the same strategy at 0 ms, 50 ms, and 150 ms execution latency, walked through tick by tick.
In a latency arbitrage system, the strategy compares two price feeds — a fast feed (typically a tier-1 aggregator or LP feed) and a slow feed (the broker you’re trading against). When the fast feed leads the slow one by more than the spread plus a configured threshold, the strategy fires an order on the slow side, expecting the slow price to converge.
The opportunity exists only while the two prices are misaligned. The moment the broker’s quote engine catches up — usually within 50 to 200 milliseconds — the edge disappears. Your order has to be in the market before that happens.
“Execution time” in this context is not a single number. It is a stack of latencies, each contributing some milliseconds:
For a strategy running on a standard VPS in a different data center than the broker, the realistic round-trip is rarely below 80–100ms. For a strategy running co-located with the broker over a cross-connect, it can drop to 1–5ms. That order-of-magnitude difference is the entire ballgame.
Imagine a clean signal: the fast feed jumps 1.5 pips. The slow broker hasn’t updated yet. You have, on average, somewhere between 80 and 150 milliseconds before the slow broker’s quote engine reflects the new price. Inside that window, two things happen simultaneously:
If your round-trip eats 50ms, you arrive when the discrepancy is still ~70% intact and you capture most of it. If your round-trip eats 150ms, you arrive when the discrepancy has already collapsed to ~10% — and after spread + slippage you’re likely losing.
The relationship between round-trip latency and arbitrage PnL is not linear. Below the execution window, profitability is high and stable. Above it, profitability collapses to zero or negative. Most retail traders sit on the wrong side of that cliff and don’t know it because their backtest hides it.
Here is the same theoretical 1.5-pip-edge latency arb signal, simulated at four different round-trip execution latencies. The numbers below are typical of what you’ll see on EUR/USD during a London session with normal liquidity and a 0.6–0.9 pip spread.
| Round-trip execution | Edge captured | Slippage on entry | Net PnL per trade | Verdict |
|---|---|---|---|---|
| ~5ms (co-located) | ~95% of signal | 0.0–0.2 pip | +0.6 to +1.0 pip | Profitable |
| ~50ms (close VPS) | ~70% of signal | 0.2–0.5 pip | +0.2 to +0.6 pip | Profitable, thinner |
| ~120ms (mid-distance) | ~30% of signal | 0.5–1.0 pip | −0.3 to +0.1 pip | Marginal / losing |
| ~200ms (long-haul) | ~10% of signal | 1.0–1.8 pip | −1.0 to −0.5 pip | Loses every trade |
Notice the pattern: from 5ms to 50ms, profitability drops modestly. From 50ms to 120ms, it falls off a cliff. Beyond 150ms, the strategy is a coin-flip with negative expectancy after costs. This cliff is invisible to a backtester that assumes instant fills.
Standard retail backtesters were built for trend-following and indicator-based systems — strategies where holding periods are minutes to days, and a few seconds of execution slippage is rounding error. Their architecture reflects that:
For a strategy that holds positions for hours, this is fine — the cost of these simplifications is well under 1% of the PnL. For a latency arbitrage strategy that earns 1–3 pips per trade and lives or dies inside a 100ms window, every one of those simplifications is fatal:
A 100ms price discrepancy is invisible inside an M1 bar — the bar shows OHLC, not the intra-bar tick stream. Bar-replay backtesters can’t even detect latency arb signals correctly.
If orders fill at the displayed price the moment they’re sent, the entire 50–200ms execution window collapses to zero. The backtest captures 100% of every signal, every time. Reality captures 30%–95% depending on infrastructure.
Real arbitrage opportunities cluster around news, rollover, and thin-liquidity windows — exactly when spread widens 3–5x. Fixed-spread backtests count profits that wouldn’t exist in real conditions.
Latency arb closes positions as fast as it opens them. Standard backtesters either ignore close-side slippage entirely or apply the same fixed spread, doubling the unrealistic optimism.
To produce a backtest that survives contact with a live broker, the simulator has to model each leg of the round-trip explicitly. Here’s the breakdown a serious latency-arb backtest needs:
| Component | Typical range | What it represents |
|---|---|---|
| 1. Signal-to-send latency | 0.5–20 ms | Time from receiving the trigger tick to emitting an order. Depends on language, code path, and CPU. Compiled C++ <1ms; high-level scripts 5–20ms. |
| 2. Network round-trip (out) | 1–80 ms | Wire time from your trading host to the broker. Co-located = 1–3ms; same metro = 5–15ms; cross-region = 30–80ms. |
| 3. Broker matching latency | 3–100 ms | Time spent inside the broker’s order-management and matching engine. Tier-1 ECN brokers: 3–15ms. Standard MT-style brokers: 30–100ms. STP brokers with manual handling: 100ms+. |
| 4. Confirmation round-trip (back) | 1–80 ms | Mirrors the outbound network leg. Until you receive the fill confirmation, you don’t know your fill price — relevant for risk management and the close-side timing. |
For a typical retail latency arb deployment from a generic VPS through a standard MT-style broker, the four components add up to roughly 80–180ms — squarely inside the danger zone where signal capture drops below 50%. For a co-located deployment through a fast ECN broker, the same components add up to 5–20ms — well below the cliff.
Every honest backtest of a latency arbitrage strategy should let the trader configure these latencies and see the impact. SharpTrader Optimizer models execution latency as a single configurable parameter (in milliseconds) that gets applied to each order at simulation time, on top of real historical tick data.
Three things have to be in place. Each is necessary; none is sufficient on its own.
Standard retail backtesters fill in “tick” data by interpolating between bar OHLC values. The synthetic ticks they produce hit the bar high and low at random points in the bar, smoothly between the open and close. Real markets don’t move that way — they jump. The 1.5-pip latency arb signal you’re trying to catch is a jump that interpolated tick data smooths into nonexistence.
A serious backtest replays actual recorded bid/ask ticks from the broker’s matching engine (or a clean reference feed like London-source institutional data). Every tick has a timestamp, a bid, and an ask. The strategy sees them in the same order, with the same timing, that a live deployment would see.
The trader configures the round-trip execution time T (in milliseconds) that they expect to see live. When the strategy emits an order, the simulator advances the clock by the request-leg portion — typically T/2, since only the time between signal and broker-side matching affects the fill price (the response leg only tells the strategy what already happened). If T = 80ms, the simulator looks at the tick stream 40ms after the signal and uses that tick’s bid/ask — not the tick that triggered the signal — as the fill price.
This single change — advancing the clock between signal and fill — reproduces the cliff at realistic latencies. It also makes the backtest deterministic: the same strategy at T = 50ms vs T = 150ms on the same tick stream produces measurably different results, and the trader can see exactly where the strategy stops working.
The realized slippage on each fill is whatever the tick walk produced — it is an output of the simulation, not a number the trader has to guess. Some fills land favorably (positive slippage), some land worse (negative), and the magnitude tracks actual tick volatility during those milliseconds. This is the realistic distribution that’s missing from every standard retail backtester.
Latency arb closes as fast as it opens. The exit happens 200–800ms after entry, into a converging price. If the simulator applies the same fixed spread to entry and exit, it misses two things: (1) entry slippage from the latency window, and (2) exit slippage from the price drifting back during the close-side round-trip. A real model lets you configure execution time independently on open and close — reflecting real broker behavior where exits often go through a slower routing path — and resolves the slippage on each leg from the tick stream automatically.
Here is a representative result from a SharpTrader latency arbitrage strategy backtested over 30 days of EUR/USD tick data, with the same parameters but three different execution-latency configurations. The numbers are typical of what we see in BJF Feed (London / Tokyo / NY) backtests.
| Metric | 0ms (fictional) | 50ms (close VPS) | 150ms (long-haul) |
|---|---|---|---|
| Signals fired | 2,847 | 2,847 | 2,847 |
| Signals filled at edge | 2,847 (100%) | 1,983 (70%) | 854 (30%) |
| Average pip captured | 1.42 | 0.98 | 0.21 |
| Realized slippage on entry (tick-walk output) | 0.0 pip | 0.3 pip | 0.9 pip |
| Net PnL per trade | +0.82 pip | +0.48 pip | −0.31 pip |
| Monthly return (1 lot) | +233% | +137% | −88% |
The 0ms column is the “backtest fantasy” that standard tools produce. The 50ms column is what a well-deployed latency arb strategy actually looks like. The 150ms column is what most retail traders accidentally run when they spin up a strategy on a generic VPS and trade through a standard broker without realizing where their round-trip falls on the cliff.
The same strategy can be wildly profitable, marginally profitable, or a guaranteed loss — depending only on a number that no standard backtester models.
Execution latency is the most under-modeled variable in retail latency-arbitrage backtests, but it isn’t the only one. A trustworthy backtest combines three things, and each amplifies the others:
Reveals the cliff. Tells you what infrastructure the strategy actually needs to be profitable, and at what point your edge disappears.
Captures the fact that arb opportunities cluster precisely when spread widens. A fixed-spread backtest counts profits that physically can’t exist in those moments.
Catches strategies that look good in-sample because the optimizer found a parameter set that fits the noise of the in-sample period. Without walk-forward, your backtest is a lookback resume.
A latency arb trade has two slippage events — open and close. Most backtests model one (or zero) and double the optimism.
When all four are in place, the backtest stops being a marketing tool and becomes a forecasting tool. The numbers it produces stop diverging by 50–200% from live results and start landing within 10–20% — close enough that risk sizing, capital allocation, and broker selection decisions can actually be made on the backtest.
Industry rule of thumb: expect live drawdown to be 1.5x to 2x the backtested drawdown. For latency arbitrage strategies running on standard backtesters, that ratio is closer to 5x to 10x — because the backtest hasn’t modeled execution latency, variable spread, or both-leg slippage. Once those are in, the 1.5–2x rule applies; before they’re in, the backtest has no predictive value at all.
Run the optimization across at least three latency configurations: 10ms (best-case co-located), 50ms (close VPS), and 150ms (generic VPS, distant broker). If the strategy is only profitable at 10ms, you have a deployment problem — you need a co-location plan before you can trade it. If it’s profitable at 50ms but not 150ms, your VPS choice and broker selection become the entire game.
Three layers: (1) ping your broker’s order entry endpoint from your trading host — this gives you the raw network round-trip; (2) send a small test order during a quiet period and timestamp signal-emission vs fill-confirmation — the difference includes broker matching latency; (3) repeat across multiple sessions — latency varies with broker load, time of day, and route. The realistic figure for your deployment is the median across many measurements, not the best-case ping.
Yes — with even tighter windows. News trading windows can be 10–50ms wide. The execution-time gap problem is identical, just compressed into a smaller window. The same backtest infrastructure (real ticks, configurable execution latency, variable spread) is required, and the latency tolerance is even less forgiving.
Both phenomena have the same cause: liquidity providers becoming uncertain about price and pulling quotes. When the fast feed jumps, LPs supplying the slow broker briefly widen their quotes to protect against being picked off. So the moment the discrepancy opens up is also the moment the spread to capture it widens. A fixed-spread backtest doesn’t see this and over-estimates net edge by 30–50%.
For institutional-style latency arb against tier-1 ECN brokers, yes — the playing field has moved to sub-5ms round-trip and that requires cross-connect or proximity hosting. For retail-style latency arb against slower MT-style brokers, no — round-trips of 30–80ms can still produce edge, because the slow broker’s window is wider. The right question isn’t “is co-location required” but “does my round-trip fit inside the window of the broker I’m trading against.” That’s exactly the question execution-latency-aware backtesting answers.
For trend-following strategies that hold positions for hours or days, a few hundred milliseconds of execution latency is rounding error. For latency arbitrage, those same milliseconds are the entire signal. Regular forex backtesting infrastructure is designed for the former case and will silently produce useless results for the latter. That’s why dedicated arbitrage backtesting tools exist as a separate category.
They change the optimal strategy, not the analysis. Brokers running anti-arbitrage plugins (delayed execution, last-look, requote on profit, hold-then-fill) effectively introduce artificial execution latency on top of the natural one. A backtest with configurable execution latency lets you simulate the broker’s anti-arb behavior and decide whether the strategy is still viable against that broker — or whether you need to switch venues.
For a latency arbitrage strategy with 5–8 parameters, a typical grid is 30,000–100,000 combinations — including 3–5 execution-time settings as one of the swept dimensions. The point is to find profitability clusters — ranges where the strategy is profitable across many parameter values, not single “lucky” spikes. Single peaks are curve-fitting; clusters are robustness. As a realistic baseline on a typical retail workstation, a 30,000-combination grid against 1 week of XAUUSD tick data on a 4-core CPU finishes in roughly 12 hours; the same grid takes about 3 hours on 16 cores. SharpTrader Optimizer handles 100,000+ combinations per run on multi-core hardware.
It’s an empirical observation across institutional algorithmic trading: even a well-modeled backtest understates live drawdown by roughly 50–100%, because some real-world frictions (broker rejections, weekend gaps, regime changes) can’t be modeled cleanly. The rule assumes the backtest already includes realistic execution latency, variable spread, and slippage on both legs. If those are missing, the multiplier is much higher — 5x to 10x for latency arb specifically.
Conceptually identical. The execution-time window in crypto cross-exchange arbitrage is typically 200ms–2s (slower than forex because exchanges are further apart and orderbooks are deeper but slower to update). The same three ingredients — tick replay, configurable execution latency, variable spread — produce honest backtests. BJF’s crypto arbitrage tooling uses the same architecture adapted for exchange APIs and orderbook depth.
SharpTrader Optimizer is the only retail-accessible backtester that models configurable execution time, real tick replay, variable spread per tick, and tick-resolved slippage on both legs — the four variables that decide whether a latency arbitrage strategy is real or fictional. Multi-core grid optimization across 100,000+ parameter combinations finishes in hours, not days.