4 ms·
Most of this information is somewhere between incomplete and wrong. Accurate timekeeping (on exchange and otherwise) is crucial to latency-sensitive players in
by lpage 6y ago
Most of this information is somewhere between incomplete and wrong. Accurate timekeeping (on exchange and otherwise) is crucial to latency-sensitive players in finance. I'll get to that after addressing the article.
> For example, if I trade one microsecond faster than a competitor, the exchange needs to ensure that my order gets processed first.
If the trading venue operates a price-time priority mechanism, the exchange should strive to ensure that orders receive the correct time-based priority, but there are no guarantees. Furthermore, priority and processing are separate considerations. The distinction between priority and processing is vital, given that order entry and market data distribution - both inter-exchange and intra-exchange - are challenging problems that aren't solved by accurate clocks alone.
Much of the complexity of HFT at the systems level is there to deal with said complexity. Even for a single sender, messages (new orders, cancelation requests, etc.) can (and on some exchanges, often are) processed out-of-order. You, as a market participant, might place an order, send a cancel shortly after that, have the cancel rejected for referencing an order that does not exist, and receive an acknowledgment of your new order immediately thereafter [1]. That might or might not say anything about how good the exchange is at establishing match priority. But idealizing exchanges as systems that ensure fairness via a total ordering of events (by time or any other mechanism) glosses over the reality.
Those details aside, what does "trade one microsecond faster than a competitor" mean? Network egress from the sender? Network ingress at the exchange? Exchanges are a distributed system comprised of order entry gateways and matching engines, so what determines ordering? If gateways are the arbitrators of order, do they use wall time or a shared frequency standard? If matching engines are, how are orders arriving from discrepant order entry gateways serialized? Those are systems problems, not clock problems.
> HFT can execute many orders in a second, then the exchange could reorder all the trades in the second in any way they want, without being detected by an auditor!
This isn't the threat model. What follows is also an oversimplification, but categorically, front running can occur in two forms. One involves the executing broker placing orders for their own account in front of a large client order and profiting from the market impact caused when executing on behalf of the client. Given that large orders executed incrementally, the timescales in question are minutes/hours/days, and microsecond accuracy clocks don't play a significant part in the detection or prosecution thereof. Microstructure level front running is a concern, but the nuances are s.t. accurate timestamps won't do much to detect abuse (they are important as evidence in an enforcement action).
> How are Clocks Synced?
Pretty much this whole section is wrong. In a way, it conflates how NTP (not IEEE 1588v2), one-way satellite time and frequency transfer, and GPS timekeeping work. Exchanges mostly use IEEE 1588v2 with GNSS synchronized grandmasters; they're not actively disciplining the grandmasters against each other, as this article suggests. Furthermore, accurate disciplining of the grandmaster is heavily dependent on a pulse-per-second (PPS) standard provided by the GNSS; the GNSS constellation almanac and time codes alone won't get you there.
Outperforming a GNSS solution by synching grandmasters using something more exotic such as Two-way satellite time and frequency transfer (TWSTFT) is possible, but not done by exchanges (the economic incentives aren't there).
Why do latency sensitive market participants care about timestamps? Backtesting. Quantifying uncertainty in one's system and connected systems is crucial, as is reconstructing a cross-venue series of events under a probabilistic framework. To the extent that an exchange has a regulatory obligation or pressure from market participants (who again, want accurate timestamps for backtesting purposes), they'll invest in accurate timekeeping infrastructure. Such infrastructure is way more commoditized now than it was 20 years ago. However, timekeeping is still a tricky problem, and disciplining a grandmaster is far from the most challenging part.
[1] This is super annoying, and exchanges on the whole have gotten better about either engineering systems that don't do it at all, or do it infrequently even at HFT line rates.
[2] https://tf.nist.gov/time/twoway.htm https://tf.nist.gov/time/twoway.htm