Quant Memo
Core

Packet Capture and Hardware Timestamps

How HFT firms record exactly when a market data packet arrived — using dedicated capture hardware and clocks stamped at the network card, not in software, to get microsecond-accurate timing for latency measurement.

If you want to know how fast your trading system reacts to a market data update, you first need to know, precisely, when that update actually arrived — and asking your own application to log a timestamp is not precise enough. By the time a packet has traveled through the operating system's network stack, been copied into application memory, and had a timestamp attached by your own code, tens of microseconds of jitter have already been added on top of the number you're trying to measure.

Hardware timestamping solves this by stamping the arrival time at the network interface card itself, the moment the packet physically lands, before any software has touched it — typically accurate to tens of nanoseconds and immune to the operating system's own scheduling delays. Packet capture is the complementary practice of mirroring a copy of every incoming (and outgoing) packet to a dedicated capture appliance or FPGA card, so the full sequence of raw messages, each with its hardware timestamp, is preserved independently of whatever the live trading application does with them.

Together, these let a firm answer questions a software-only measurement can't: exactly how long a given market data message sat in the feed handler before an order went out, whether a particular slow trade was a network problem or an application problem, and whether the firm's clock agrees with the exchange's own reported timestamps closely enough to trust cross-venue latency comparisons at all.

This infrastructure is why serious latency measurement always starts from a hardware-timestamped, packet-captured baseline rather than trusting timestamps generated inside the trading application: a software timestamp measures the trading system's processing time contaminated with its own overhead, while a hardware timestamp measures when the market actually spoke.

Hardware timestamps record packet arrival at the network card itself, before any software delay is added, and packet capture preserves an independent, unbiased record of every message — together forming the only trustworthy baseline for measuring true trading-system latency.

Related concepts

Further reading

  • Exchange colocation and market data technical specifications (various venues)
ShareTwitterLinkedIn