People at high-frequency trading firms can make $1M+/yr making computers trade markets really fast. But how? Well, normal internet fiber is never in a straight line and makes light go 1.5x slower, so instead HFTs use... microwaves! Thread on the cool tech behind HFTs. 🧵 Many HFTs are based in Chicago there and in NYC markets. Every millisecond can mean reducing the arbitrage that makes you money. The public internet with regular routing, unoptimized software, this takes 30-40ms. Microwaves at 6-30GHz can get this down to <10ms round trip! Why aren't microwaves used everywhere then ? Well: a) they're expensive (>$10M+) and need many repeaters to amplify signal b) they attenuate quickly in poor weather conditions c) low bandwidth Check out Aviat, Dragonwave-X, Siklu and SIAE that make these! What other kind of hardware do HFTs use? HFTs also use special Network Interface Cards (NICs) like those made by Mellanox and Solarflare. As data comes in, it skips the kernel with direct memory access (no copying). They also use custom FPGAs from Xilinx and more. What are all the software optimizations? Probably not all, but some of the key ones: Kernel Bypass ~100μs Remote direct memory access ~50μs NIC TCP Offload ~40μs FPGA Processing ~5μs Optimized Stack ~200μs Together, you can squeeze ~0.4ms. How can they afford this expensive stuff? Some of these companies make the most money / employee of all companies. That's why they're pretty silent about it. They include: — Jump Trading — Citadel — Hudson River Trading — DRW — Virtu Financial HFTs ask the question "how do you make computers do things as fast as possible" with no money constraints? That's engineering at its best. They created a not-so-cottage industry of specialized hardware suppliers just fort themselves. Making money at an HFT isn't always that easy though. If you want a fun HFT horror story, search for "Knightmare hft"
Securities Trading Platforms
Explore top LinkedIn content from expert professionals.
-
-
🚀 Why if Statements Can Kill Performance in Low-Latency C++ In high-frequency trading (HFT), every nanosecond counts. One of the most overlooked performance killers? Branch misprediction. Modern CPUs try to guess the outcome of your if statements. If the guess is wrong → you pay the penalty: pipeline flushes, wasted cycles, and latency spikes. 💡 Naive code (branching): ``` if (x > threshold) { sum += x; } ``` ⚡ Branchless alternative: sum += (x > threshold) * x; Here, (x > threshold) evaluates to 0 or 1, avoiding unpredictable branches. 🔑 Takeaway: • Branchless code = more stable latency • Works best when branch predictability is low • In HFT, stability often beats raw average speed 👉 Idiomatic, low-latency C++ means writing code that works with the CPU architecture, not against it. ❓What’s your experience with branchless programming? Do you use it proactively, or only after profiling? #Cplusplus #LowLatency #HighFrequencyTrading #PerformanceEngineering #HFT
-
FPGAs vs GPUs in High Frequency Trading The simplest and therefore most competitive strategies in HFT require a tick-to-trade latency of under 1 microsecond. This measurement includes retrieving a packet from the network card’s buffer, parsing the market data message out of the binary protocol inside the buffer, executing logic to determine whether and at what price to send an order, and loading new bytes containing the order message into the network card’s outgoing buffer. It is virtually impossible to achieve such low latencies in software, or through the use of CPUs alone. Thus the last two decades have seen the rise of Field Programmable Gate Arrays (FPGAs) in the upper echelons of high frequency trading. FPGAs allow developers to design hardware architecture exactly suited to the logic of a trading strategy in order to achieve deterministically low latency. But FPGA development comes at a high cost: * Hardware programming, including utilizing languages such as Verilog, is an increasingly rare skill that is difficult and expensive to hire for. * Development times for even simple hardware-based algorithms are significantly longer than with software. * Program compilation can take several hours, and there is even some non-determinism in the success of FPGA compilation. * It is challenging to encode complex tasks on an FPGA, and so typically developers additionally write sidecar CPU processes that preload data and trigger conditions onto the FPGA. For these reasons, the expenses associated with running an ultra low-latency strategy on an entire symbol universe, e.g. a US equity options market making strategy, can be enormous and a non-starter for all but the largest incumbent HFTs. And for those large incumbents, long term reliance on FPGAs creates a drain on developer resources, lengthy deployment life cycles, and bugs that are difficult to diagnose and triage. Recent advancements in GPUs have the potential to change this dynamic. GPUs have been instrumental in accelerating scientific computing workloads, especially massively parallel deep learning pipelines. There are reasons I believe GPUs could be used directly within latency sensitive trading algorithms: * While a single task may be faster on an FPGA, large matrix-backed mathematical computations like computing theoretical fair values for an entire strip of options given a single underlying price move can be highly efficient on a GPU. * GPU programming is becoming more widespread in undergraduate programs as a direct result of breakthroughs in machine learning. CUDA (or even OpenGL) is a significantly easier programming paradigm than a hardware language like Verilog. * Although not quite as fast as FPGAs, the amortized speed of GPU computations can still be fast enough to compete with most latency-sensitive arbitrage strategies. If you know first-hand of using GPUs directly in trading strategies (not just to train ML models used in strategies), I’m interested to hear more.
-
⚡ 8.3 Million Orders / Second — Under 100 Nanoseconds Latency. This is what “production-grade” really means in high-frequency trading systems. The architecture below is a minimal yet realistic C++ HFT Exchange Simulation: Lock-free queues across order flow Multicast UDP market data Trade engine executing microsecond-level algorithms Benchmarks: 🧠 Avg latency — 89 ns 📉 P99 latency — 145 ns ⚙️ Throughput — 8.3M orders/sec 🕹️ Uptime — 99.99% 🚫 Crashes — Zero The design looks simple — but under the hood, every nanosecond is earned through discipline: No heap allocations No locks Pinned CPU cores Cache-aligned structs It’s not about writing clever code — it’s about writing code that disappears at runtime. 🔗 You can explore or clone the full project here: 👉 https://lnkd.in/dsKpcymR Curious: if you were designing this, where would you try to squeeze more performance? 👇 #HFT #Cplusplus #LowLatency #TradingInfrastructure #QuantEngineering #OpenSource
-
Here’s how I think about an HFT system, end to end: 1️⃣ Start with constraints, not code Before writing a line of C++: • Deterministic latency matters more than peak throughput • No dynamic memory allocation in hot paths • No locks in market data or execution • Risk must be enforced inline, not as a downstream service • Failure should flatten positions, not crash the process Speed is a side effect. Predictability is the goal. 2️⃣ Market data is the heartbeat Raw exchange feeds are parsed in C++ using: • Pre-allocated buffers • Binary decoding • Single-writer designs Order books are built using price-indexed arrays, not trees or maps. O(1) access, cache-friendly, predictable latency. 3️⃣ Strategy is a dataflow engine Strategies consume normalized market events and emit intent: • No blocking calls • No IO • No logging • Stateless where possible Parallelism comes from symbol partitioning, not shared locks. 4️⃣ Risk lives inside the hot path Risk checks are CPU branches: • Max position • Max order size • Throttle limits No RPCs. No databases. No excuses. If risk is slow, it’s not risk. It’s hope. 5️⃣ Execution is about determinism Orders flow through: Strategy → lock-free queue → encoder → NIC • Pre-built message templates • Order object reuse • Kernel-bypass networking where possible Polling beats interrupts when tail latency matters. 6️⃣ Observability is out-of-band Hot path: • Counters only Cold path: • Async logging • Replayable market data • Post-trade latency analysis (p99 and p99.9 > averages) The core idea: An HFT system is a latency pipeline designed to behave the same way every time, under stress. Fast systems are impressive. Deterministic systems are profitable.
-
Even with best-in-class #HFT infrastructure, we’re consistently losing money, I've been told. And this is how we fixed it👇 This was the concern a Managing Director at a proprietary HFT firm shared with me. Despite cutting-edge DMA, #Rust-optimized systems, and colocation setups, they were still struggling. As their executive advisor, I worked with their leadership team to uncover the root causes of their situation and engineer a complete turnaround. Here’s what we found and how we fixed it: 1️⃣ Culprit #1: Infrastructure Optimization Gaps. Latency metrics looked strong on paper, but after creating a framework to measure every single part, the team revealed queue inefficiencies and unoptimized execution paths that needed fine-tuning. We established a quantifiable baseline and uncovered critical bottlenecks that, once addressed, significantly improved trade timing. 2️⃣ Culprit #2: Lack of Analytics for Performance Tracking The firm lacked a system to systematically track and analyze trading and risk performance. I help their team to developed an analytic framework to provide real-time insights, enabling data-driven decision-making and early detection of inefficiencies. 3️⃣ Culprit #3: Inefficient Market Microstructure Exploitation I helped their team enhance strategies by dynamically adjusting order placement and queue positioning, leveraging order book imbalances and latency arbitrage. Predictive models were also implemented to anticipate shifts in market microstructure, securing an edge in fleeting opportunities. 4️⃣ Building Advanced Execution Capabilities I guided their executives in overhauling their execution pipeline with sub-millisecond response times, integrating low-latency signal processing. Custom OMS optimizations improved order fill rates, ensuring their strategies operated at peak efficiency. The Results? In just ten months: > Latency improved by 12%, optimizing execution and queue positions. > Two new alpha strategies developed by the research team delivered 30% better returns compared to legacy systems. > Losses transformed into a 25% increase in quarterly profitability, with consistent positive returns across market conditions. Takeaway: Identifying the root causes of inefficiencies—whether technical or strategic—is the first step to unlocking profitability. Is your team having similar challenges? we can explore these or other techniques. Every situation is unique and needs its unique attention. #hft #trading #investmentbanking
-
The future winner in high-frequency trading may not be the fastest AI system. It may be the fastest governable one. Not because regulators demand it. Because markets themselves may force the issue. High-frequency trading systems already contain primitive forms of execution governance: • pre-trade risk controls • exposure limits • circuit breakers • deterministic sequencing • settlement validation Those mechanisms exist because markets learned long ago that unconstrained execution creates systemic instability. The Flash Crash was not merely a market anomaly. It was partially an execution-governance failure. At the same time, the industry wants AI very badly. The incentives are enormous: • adaptive execution • liquidity prediction • autonomous routing • market microstructure optimization • probabilistic regime detection Even tiny improvements produce massive competitive advantage. But firms simultaneously fear unconstrained AI execution because markets are: • adversarial • tightly coupled • latency-sensitive • systemically interconnected A bad autonomous decision can: • destabilize liquidity • amplify volatility • trigger cascades • create systemic failure Which creates a contradiction: firms want maximum autonomous adaptivity while simultaneously requiring deterministic control. That tension may eventually force a new architecture class: AI-assisted proposal generation --- deterministic execution-bound governance. In other words: AI increasingly generates proposals. But deterministic governance layers still mediate what is actually allowed to bind to market reality. Eventually, raw speed alone may stop being enough. The competitive advantage becomes: safe admissible execution under extreme autonomous concurrency.
Explore categories
- Hospitality & Tourism
- Productivity
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Healthcare
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Career
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development