arrow_backBACK TO LOW-LATENCY TRADING SYSTEMS & ALGO TRADING — FROM THE ORDER BOOK TO A LIVE RETAIL ALGO
Lesson 06Low-Latency Trading Systems & Algo Trading — From the Order Book to a Live Retail Algo5 min read

The Latency Stack & Co-location

October 28, 2026

TL;DR

Your real reaction time is the whole round trip: a tick leaves the exchange, travels to your machine, through the kernel network stack, gets decoded into your order book, your strategy decides, risk checks run, and an order is encoded and sent back. That's the tick-to-trade latency budget, and each stage costs — you can't optimise what you don't measure, so time every stage. Distance is the biggest, hardest floor: light takes real time over real distance, so professionals CO-LOCATE, renting a rack inside the exchange datacentre with a cross-connect metres from the matching engine (microseconds, and stable), while retail trades over the public internet in milliseconds with jitter. Co-location plus kernel bypass is how HFT shaves microseconds — expensive and rarely worth it for retail. As a retail trader you compete on edge and discipline, not speed; pick strategies (seconds-to-minutes horizons) that don't need to win the latency race. Educational, not financial advice.

Lesson 5 made your code fast. But the code is only one stage in a longer journey, and for the professionals the biggest latencies aren’t in the code at all — they’re in the physics of getting data to you and your orders back. This lesson zooms out to the whole tick-to-trade path, shows where the time actually goes, and explains what co-location buys — so you understand the professionals’ world and why, as a retail trader, you should deliberately not try to compete in it.

The Tick-to-Trade Latency Budget

The latency that matters is your reaction time: from the moment something happens at the exchange to the moment your response reaches the exchange. That round trip has several stages, each costing time.

Where the microseconds go: the tick-to-trade latency budget, end to end. 1 Exchange to your NIC: network propagation, colo wins here (metres vs thousands of km). 2 Kernel network stack: packet parsing, kernel-bypass (DPDK/solarflare) cuts this for pros. 3 Decode plus update book: parse the message, update your order book. 4 Strategy decision: your signal logic, keep it tight, branch-light. 5 Risk checks: pre-trade limits, must be fast and mandatory. 6 Encode plus send order: serialise, back through the stack, out to the exchange. The whole round trip is your reaction time. Retail equals milliseconds (internet); HFT colo equals microseconds. Measure every stage, you can't optimise what you don't time

The stages:

  1. Exchange → your NIC (network propagation). The data physically travels from the exchange to your network card. Over the public internet that’s milliseconds and variable; from a colocated rack it’s microseconds and stable. This stage is pure distance, and it’s the one co-location attacks.
  2. Kernel network stack. The packet arrives and the operating system’s networking code processes it before your program sees it. Professionals use kernel bypass (Lesson 7) to skip most of this; ordinary programs pay it.
  3. Decode + update book. You parse the message and update your local order book (Lesson 3).
  4. Strategy decision. Your signal logic runs (Lesson 5 — keep it tight and branch-light).
  5. Risk checks. Pre-trade limits run before the order goes out (Lesson 8) — fast and mandatory.
  6. Encode + send order. You serialise the order and send it back through the stack and over the wire to the exchange.

The whole chain is your reaction time, and the governing principle is simple: you can’t optimise what you don’t measure. Serious systems timestamp every stage (ideally with hardware timestamps, Lesson 7) so they know exactly where the microseconds go. Guessing which stage is slow is how you waste effort optimising the wrong thing.

For a retail trader the dominant terms are the network (internet, stage 1) and your own code (stages 3–5); you have little control over the first and full control over the second — which is why, if latency matters to your strategy at all, your effort goes into tight code (Lesson 5), not into trying to beat physics.

Co-location: Buying Distance

The single biggest, hardest latency is distance, because of a limit nobody can negotiate: the speed of light. Data can’t travel faster than light, and over hundreds or thousands of kilometres of cable that adds up to real, unavoidable milliseconds. So the professionals do the only thing that helps: they move closer.

Co-location vs trading from your laptop: distance is latency, and for HFT distance is money. Retail path: your laptop (home/office) to the internet (ISP, routers, 100s-1000s km) to the broker (their servers) to the exchange (NSE/BSE); many hops, public internet, so milliseconds and variable (jitter). Colo path: a colo server (your rack IN the exchange datacentre) connects by fibre, metres, directly to the exchange (matching engine metres away); so one short hop, dedicated line, microseconds and stable. What this means for you: colo plus kernel bypass is how HFT shaves microseconds, expensive and rarely worth it for retail; as a retail algo you compete on edge and discipline not speed, pick strategies that don't need to win the latency race (seconds-to-minutes horizons, not microsecond queue-jumping)

The contrast is stark:

  • Retail path. Your laptop → your ISP and the public internet (many hops, hundreds to thousands of km) → your broker’s servers → the exchange. Lots of hops over shared infrastructure, so milliseconds and, worse, variable — the jitter means you can’t even rely on consistent slowness.
  • Co-location path. The professional rents a rack inside the exchange’s datacentre and runs a short cross-connect cable — literally metres — to the exchange’s systems. One short hop over a dedicated line: microseconds, and stable. This is the single biggest latency win available, and firms pay a lot for it.

Co-location, combined with kernel bypass and specialised hardware (Lesson 7), is how HFT firms get their tick-to-trade down to microseconds. It’s expensive, it’s an ongoing arms race, and — this is the point for you — it’s rarely worth it for retail, because the strategies that need microsecond latency are exactly the ones where you’d be competing head-on with firms who’ll always be faster.

What This Means for You

The honest, freeing conclusion: as a retail trader, don’t try to win the latency race — change the game instead.

  • Pick horizons where latency isn’t the edge. Strategies that hold for seconds, minutes, hours or days don’t live or die by microseconds. A mean-reversion or momentum strategy on a 5-minute horizon doesn’t care whether your order arrives 2 ms or 20 ms later; a microsecond-scale market-making strategy does, and you’d lose it. Choose the former.
  • Make your code tight anyway, within reason. You still don’t want seconds of delay or random multi-hundred-millisecond stalls (Lesson 5’s jitter), because a slow or stuttering system fills worse and misses setups. “Fast enough and consistent” is the goal, not “fastest.”
  • Spend your effort where your edge is. Your advantage is a real edge plus discipline (Lesson 2), not speed. Every hour spent chasing microseconds you can’t win is an hour not spent on strategy research, backtesting honesty (Lesson 10), and risk management (Lesson 8) — which is where retail money is actually made or lost.
  • Measure before you optimise. If you do care about latency, timestamp your stages and fix the real bottleneck (usually your code or the broker round-trip), not an imagined one.

Understanding the latency stack isn’t wasted on a retail trader — it tells you precisely which battles to skip, which is just as valuable as knowing which to fight.

Pitfalls to Avoid

  1. Trying to beat physics from a laptop. Distance-driven latency is a hard floor; you can’t out-run colocated firms over the internet. Don’t build strategies that need you to.
  2. Optimising without measuring. Timestamp every stage; fix the real bottleneck, not a guessed one.
  3. Ignoring jitter. Variable latency over the internet means “sometimes slow” — design strategies and systems that tolerate it.
  4. Picking microsecond-sensitive strategies as a retail trader. Market-making and latency arb need speed you don’t have. Choose slower-horizon edges.
  5. Over-investing in latency vs edge. Your money is made on edge, costs and discipline — spend your effort there, not on an unwinnable speed race.
  6. Assuming low latency means low average only. Consistency (low jitter) matters as much as the average. Aim for fast and stable.

Quick Recap

  • Your reaction time is the whole tick-to-trade path: network → kernel → decode → decide → risk → send. Measure every stage to know where time goes.
  • Distance is the biggest latency (speed of light), so pros co-locate — a rack inside the exchange, microseconds and stable — vs retail’s milliseconds-and-jittery internet path.
  • Co-location + kernel bypass is the HFT microsecond game; it’s rarely worth it for retail.
  • As a retail trader, don’t race on latency — pick seconds-to-minutes horizons, keep code fast-enough-and-consistent, and spend effort on edge and discipline.
  • Educational, not financial advice.

Next lesson: the frontier of the speed race for the curious — FPGAs, kernel bypass, microwave networks and direct lines — how the biggest players get to almost-zero latency, and why it’s a world to understand but not to chase.