TradeViora AcademyLearn. Analyze. Practice. Trade Smarter.
Menu

FREE FINANCIAL EDUCATION

Order flow replay and testing

Replay only information available before each signal time.

Learning objectives

  • Replay only information available before each signal time.
  • Separate signal latency, order arrival and fill assumptions.

Prerequisites: Read event timestamps, reconstruct footprint metrics and understand bid–ask quotes.

Mechanism and interpretation

An event replay updates the book and accumulated trade measures one message at a time. A signal at time t may use only events processed by t. Completed-bar delta is not available halfway through that bar. If the strategy operates on partial bars, its thresholds and state must be evaluated incrementally in both historical and live logic.

Separate exchange event time, local receipt time, decision time and order-arrival time. A simulation with fixed latency can be a useful approximation, but it must apply the delay before looking for a fill. Passive orders need queue assumptions; an aggressive order needs available opposing liquidity. A price appearing somewhere later in the bar does not establish that either order would have executed.

Worked case · synthetic data

At 10:00:00.200, processed events push delta above a preset threshold. Assume a 50-millisecond decision-to-arrival delay. The order reaches the hypothetical market at .250. The ask at the signal was 100.10, but the ask at arrival is 100.20 with sufficient quantity. An immediate buy assumption uses 100.20 before fees, not the earlier 100.10. If the bar ends at 10:00:01, its final delta must not be inserted into the .200 decision.

Failure modes and context

Historical feeds can have identical timestamps for several sequenced events. Local delays may increase during precisely the bursts that trigger signals. Queue position cannot usually be inferred from aggregate depth alone. Compare an order-flow rule with a price-only baseline using the same cost model, and keep unknown or incomplete intervals visible in the audit.

Practice assignment

A signal completes at 09:30:00.100, latency is 80 milliseconds, and ask updates are 100.00 at .100,100.05 at .150 and 100.15 at .190. Assume the ask remains 100.05 until .190 and enough size exists. Determine the first arrival-time ask, then list an assumption that a real feed could invalidate.

Worked answer

Arrival is .180, when the stated ask is 100.05. Under the simplified immediate-fill model that is the buy price. A missing update, insufficient quantity, variable latency or different event ordering could invalidate it. A passive buy at 100.00 would require an entirely different fill model and cannot borrow the aggressive-order result.

Check your understanding

Question 1

Can a partial-bar signal use the final bar delta?

  1. Yes if the bar later wins
  2. Yes if the chart displays it
  3. No
Reveal answer and reasoning

C. No

Final delta contains executions not yet observed at the partial-bar decision.

Question 2

Which quote matters for an immediate order after modeled latency?

  1. The best quote later that day
  2. The quote available at order arrival
  3. Always the signal-time quote
Reveal answer and reasoning

B. The quote available at order arrival

The order cannot execute before it reaches the market.

Question 3

Does a traded price prove a passive order filled there?

  1. No; queue and order state matter
  2. Yes
  3. Only on a footprint
Reveal answer and reasoning

A. No; queue and order state matter

Other orders may have priority, or the simulated order may not yet have arrived.

Sources and further reading

The explanations, operational rules, numerical cases and questions on this page are original TradeViora Academy educational material. Source documents support definitions or conventions; they do not establish the profitability of an illustrated rule.

Third-party rights remain with their owners. TradeViora Academy is not affiliated with these organizations. Examples are hypothetical and exclude real orders. Source review: 26 November 2026.

Continue learning

Open related learning tools · Practice library · Learning downloads