Causality, Time and Clock Synchronization in MiFID II

Time and causality are fundamentally related: causes must come before their effects temporally, and the concept of causal relationships arguably underpins our concept of time.

Causality, Time and Clock Synchronization in MiFID IIBy Raymond Russell    14 April 2016      Product

Causality, Time and Clock Synchronization in MiFID II


One interesting aspect of the MiFID II regulations, in particular the Regulatory Technical Standards (RTSs), is that there is an abundance of references to timestamps and clock-synchronization—but not a single use of the word "causality".

Time and causality are fundamentally related: causes must come before their effects temporally, and the concept of causal relationships arguably underpins our concept of time. However, MiFID II and other regulations are, perhaps understandably, not concerned with such philosophical musings, and are focused on far more practical matters. As such, perhaps we should not be surprised that MiFID II makes no mention of causality.

The role of timestamps in MiFID II is to ensure that regulators have a clear record of the transactions being conducted in financial markets. This is very clearly reflected in the fact that the regulations place requirements on the granularity of timestamps, and the maximum divergences of the clock they are read from, commensurate with the nature of the trading activity. The tightest requirements are placed on high-frequency and algorithmic trading.

So whence my philosophical talk of causality?

Time as the key to causality

The reason for these requirements on global synchronization are articulated in RTS 25: Competent Authorities need to be able to reconstruct all events relating to an order, even when those events may take place in multiple different locations. RTS 25 comes even closer to the crux of the matter, stating that this global picture is necessary to diagnose market abuse. Implicit is the understanding that granular and accurate timestamping of market events is essential to distinguishing cause from effect in the actions of market participants.

This principle holds in many other areas: for police detectives, the timeline of events is a critical foundation for their understanding and solving of a crime (even if the timescales are quite different to those in high-frequency trading). Epidemiologists rely on accurately reported incidents of disease to understand where outbreaks occur and how they are spreading.

At Corvil, our work has been creating systems that gather granular and accurate timestamps, integrating them to analyse the behaviour of networks and applications, and using that information to diagnose the causes of performance problems and anomalous behaviour. We know timestamping because we’ve done it for years, dare I say before it was so trendy.

Time-synchronization technology

Our work in this area has given us a lot of experience with the technologies used to synchronize clocks globally across distributed infrastructure.

The most commonly used are GPS (Global Positioning System), PPS (pulse per-second), PTP (Precision Time Protocol), and NTP (Network Time Protocol), and these are often used together in a hierarchy: at the top, a single GPS antenna or high-quality timing service is acquired. This top-level signal is initially distributed by PPS to systems that require the highest quality, or to PTP grandmasters and low-stratum NTP servers. Those time-servers in turn distribute the time-signal over the network to a broader set of systems.

Causality as the key to time

This means that if all participants in an electronic market use one or more time-syncing mechanisms (GPS, PPS, PTP, and NTP) to synchronize the clocks they use to timestamp reportable events, Competent Authorities can reconstruct the chain of causality in any event. Authorities should be able to reconstruct the global sequence of events by tracing all of these clocks back to UTC, at the scale of granularity of market events. However, causality plays a key role in how the network time protocols PTP and NTP manage to achieve synchronization.

These protocols use a master/slave relationship, where the master is the system with the best (or possibly only) access to GPS or PPS. The master broadcasts its time over the network, and the slaves adjust their clocks accordingly. The details are a little more complex: PTP and NTP anticipate that the network can be a noisy place, with uncertain delays through the software stacks on hosts and on the transmission path between them. Each uses different mechanisms for compensating, but a core principle is causality: if a slave receives a timestamp from the master that is the future with respect to its local clock, it knows for sure that the packet didn't travel backwards in time. Instead, the slave correctly infers that its clock is running behind the master’s.

The slave can also use the same principle to upper-bound its clock divergence by sending samples of its clock to the master: if, to the master, they appear to have arrived before they left the slave, then it's clear the slave’s clock is running too fast.

Summary

In both cases, the appearance of packets "from the future" are obviously not mysterious violations of causality, but rather information that the slave’s local clock is either too slow or too fast. There is a further layer of analysis that can be done on the timestamps to produce good estimates of just how slow or fast the slave clock is, allowing it to be adjusted more precisely. However, the basic principle is that the known causal structure of the time protocol - a message sent by the master must arrive some time later at the slave - is the foundation of reliable global clock synchronization.

Thus the audit trail that MiFID II aims to create via globally traceable timestamps enables a layer of causality that is founded on global time synchronization. In turn, that global time synchronization itself is founded on the web of causal relationships created by time distribution technologies.

eBook: MiFID II Clock Synchronization RTS-25

Causality, Time and Clock Synchronization in MiFID II

Raymond Russell, Founder & CTO, Corvil
Corvil safeguards business in a machine world. We see a future where all businesses trust digital machines to algorithmically conduct transactions on their behalf. For some businesses, this future is now.
@corvilinc