Matana Labs

Latency test: the “Execution delay” check

A latency test checks what happens when orders fill later than the strategy sent them. Matana Labs delays each order on the engine and fills it at the price and volume of the later second, with fixed delays and with random ones. If a few seconds of delay wipe out the profit, the idea isn’t ready for a live market.

What it checks

The order was created at second T and filled later — at the price and volume of that later second. If the idea dies from a few seconds' delay, it isn't fit for a live market.

The question behind it: Will it survive real trading? In the app it is in Analysis Lab → Checks, stage “Required”. Can you trust the result at all? They come first and make up most of the score.

How it works

The engine delays execution by N seconds: the rules' market orders, entry and exit; the rules' stop, target and trailing stop fire later; limit orders start waiting later. Fixed delay: 0, 1, 5, 15 and 60 s. Random delay: a separate one for each order, uniform from min to max, 40 draws with different seeds. This is synthetic, not a particular broker's delay. The built-in ladder and guards execute without delay.

How it gets its status

These are the app’s own rules, shown on the check’s card:

How to read the result

The Execution delay check in Matana Labs: a table of result, drawdown, trades, orders that waited for volume and delayed orders for each delay, and equity curves for each delay with the band of random delays
“Execution delay” on a test data set: one row per fixed delay, the median of random delays, and the equity curves.

Delay against stop slippage across many strategies: our execution realism study.

In the score out of 100

When it has a status, it counts toward the overall score with weight 1.5: “holds” earns full points, “with a caveat” half and “broke down” none; “can’t compute” is left out.

Every plan, the free one included, can run it; any engine runs it needs are counted in backtest-years.

If it breaks down

The edge lives for seconds. Enter with limit orders, remove conditions that depend on the exact second, or hold the position longer.

This is the app’s own suggestion; under Improvement the app tests candidate changes on the engine before it shows them.

Screenshots show the real app on a test data set. Backtests and simulations are not real trading, and past results don’t guarantee future ones. Not investment advice.

Keep reading

See Matana Labs plans, from free

Questions

Is this my broker’s latency?

No. The delays are synthetic. The question is how late the strategy can afford to be, not how fast a given broker is.

Which orders are delayed?

The rules’ market orders, entries and exits, plus the rules’ stops, targets and trailing stops; limit orders start waiting later. The built-in ladder and guards fill without delay.

Why does a delayed order sometimes not fill?

Because it fills against the later second’s volume, and that second may not have enough. The table counts those orders.