Skip to content
Circuit board and keyboard components in close focus

When is a streaming market-data bar complete enough to use?

Define event-time windows, lateness rules and versioned decisions before treating a completed bar as permanently final.

The key idea

A clock passing a bar boundary does not prove that every event belonging to that bar has arrived. Streaming research must distinguish market event time from receipt and processing time, then specify when a calculation may be emitted and how later observations are handled. Completeness is an operating assumption with a measurable latency cost.

The data assumption

A watermark represents progress in event time under the chosen streaming policy. With bounded out-of-order processing, it deliberately trails observed event timestamps to accommodate delayed records. It is not proof that the network will never deliver an older event. Different inputs may progress at different rates, and an idle source requires an explicit policy.

Allowed lateness is a further choice about retaining window state after its initial result. A late event can lead to a revised aggregate if that policy permits it. The trading decision already made from the earlier aggregate cannot be retroactively changed, even if the historical data store later contains a cleaner bar.

A worked example

Consider a hypothetical minute bar covering [10:00:00, 10:01:00). A trade stamped 10:00:59 arrives at 10:01:02, after the wall-clock boundary. Under a deliberately simplified policy whose watermark trails the latest observed event time by three seconds, a latest event at 10:01:01 gives a watermark near 10:00:58. The earlier minute is not yet complete under that policy.

When event-time progress later takes the watermark beyond the minute boundary, the first result can be emitted. If five seconds of additional event-time lateness are allowed, retained state can support a later correction until that allowance expires. Exact millisecond boundary conventions belong to the implementation. Waiting longer reduces some revisions but also delays the investment action.

Practical review and implementation

Record event, receipt, emission and decision timestamps together with the version of each aggregate consumed. Measure the observed delay distribution by source and session instead of selecting a buffer from a single quiet day. Preserve late records for investigation and use an explicit revision stream or side output. Backtests should consume the bar version that was actually available at their simulated decision time, or reproduce that availability policy from raw arrivals.

Assumptions and limitations

No finite buffer guarantees completeness during an outage or clock failure. Watermarks control processing semantics, not market-data truth, and several delayed sources can create more complicated behaviour than this single-stream example. Treat latency and revision rates as separate controls; a fast dashboard can still be showing a materially incomplete information set.

Primary references

Further detail on the underlying concepts and data definitions: