6.3.8Market Microstructure

Learn about latency and co-location

1,810 words8 min readdifficulty · medium1 backlinks

WHAT is latency?

The pieces that add up

WHY split it up? Because you can only optimize what you can measure. Total latency is a sum of independent delays, so we derive it from first principles by tracing a signal's journey.


WHAT is co-location?

Figure — Learn about latency and co-location

HOW do we compute the edge? (Worked examples)


Common mistakes (Steel-manned)


Recall Feynman: explain to a 12-year-old

Imagine a class where whoever shouts the right answer FIRST gets the prize. The teacher whispers a hint. If you sit at the back of the room, the sound takes longer to reach you, so a kid in the front row always shouts first. Co-location is like paying to sit in the front row, right next to the teacher. But even in the front row, if you think slowly (slow computer/code), a faster-thinking kid two rows back can still beat you. And no matter how close you sit, sound still takes a tiny moment to arrive — you can never react at literally zero time.


Flashcards

What is latency in market microstructure?
The total time delay between a market event occurring and a trader's order reaching (and being processed by) the exchange, measured in ms/µs/ns.
What is co-location?
Renting server space inside the exchange's data centre so the physical distance — and thus propagation delay — to the matching engine is minimized.
Why do exchanges give co-located clients equal-length cables?
To keep the propagation delay identical for all paying clients, so the advantage depends on hardware/code, not physical rack position.
What is the approximate signal speed in fibre optic cable?
About 2×1082\times10^8 m/s, roughly two-thirds the speed of light in vacuum.
Formula for one-way propagation delay over distance d in fibre?
tprop=d/v=d/(2×108 m/s)t_{prop} = d / v = d / (2\times10^8\ \text{m/s}).
What are the four sequential components of round-trip latency?
Propagation-in + Compute time + Propagation-out + Exchange queue/matching time.
Latency vs bandwidth — what's the difference?
Latency is delay (time per message); bandwidth is throughput (data volume per second). HFT cares about latency.
Why do firms use microwave links instead of fibre between cities?
Microwaves travel through air near c (3×10⁸ m/s) and take straighter paths, giving lower propagation delay than fibre (2×10⁸ m/s).
Can latency be reduced to zero?
No — the speed of light is a hard floor, plus compute and exchange-queue times never fully vanish.
One-way fibre delay over 400 km?
t=400,000/(2×108)=2 mst = 400{,}000 / (2\times10^8) = 2\ \text{ms}.

Connections

Concept Map

finite speed creates

sum of

sum of

sum of

divided by

gives

shrinks

cuts

kept fair by

shifts race to

lower wins

delivers

Information is money

Latency

Propagation delay

Compute time

Exchange queue time

Distance d

Signal speed 2x10^8 m/s

Co-location

Equal-length cables

Speed edge wins trade

Hinglish (regional understanding)

Intuition Hinglish mein samjho

Dekho, stock market ke high-frequency trading mein latency ka matlab hai — "koi event hua, aur aap us par react kar paaye, iske beech kitna time laga." Yeh time milliseconds, microseconds, ya nanoseconds mein naapa jaata hai. Kyunki market mein sabse pehle react karne wala hi profitable trade le leta hai, isliye har microsecond ki keemat paise mein hoti hai. Ek din ka fast internet aur HFT ki latency alag cheezein hain — bandwidth ka matlab "kitna data" jaa sakta hai, jabki latency ka matlab "kitni jaldi" ek chhota message pahunch jaaye. HFT ko latency chahiye, bandwidth nahi.

Ab co-location samjho. Signal fibre cable mein light se bhi thoda dheere chalta hai — around 2×1082\times10^8 m/s, yaani light ki speed ka do-tihaai. Toh agar aap exchange se 400 km door baithe ho, toh sirf distance ki wajah se hi 2 ms ka delay lag jaata hai. Isse bachne ke liye firms exchange ke apne data centre ke andar hi apna server rakhti hain — bilkul matching engine ke paas. Isko co-location kehte hain, aur distance dd almost zero ho jaata hai.

Ek interesting baat: exchange sabko same length ki cable deta hai, taaki koi firm room ke corner mein ho ya engine ke bilkul bagal mein, dono ka propagation delay barabar rahe. Isse race "fair" ho jaati hai — ab jeet distance se nahi, balki aapke hardware aur code ki speed se decide hoti hai. Isiliye firms FPGA aur super-optimized code use karti hain. Aur yaad rakho — chahe kitna bhi paas baith jaao, light ki speed ek hard limit hai, latency kabhi bilkul zero nahi ho sakta.

Test yourself — Market Microstructure

Connections