What is HFT? The Physics of Microsecond Competition

High-Frequency Trading (HFT) is the peak of financial engineering. Explore how low-latency C++ and FPGA hardware dominate the order book.

High-Frequency Trading exists at the boundary where physics determines profitability. If you are trading in milliseconds, you have already lost to the firms trading in nanoseconds. High-Frequency Trading (HFT) is a subset of algorithmic trading characterized by high speeds, high turnover rates, and high order-to-cancel ratios. It is not about 'picking stocks'; it is about providing liquidity and capturing the spread.

The primary objective of an HFT market maker is to stay delta-neutral while capturing the bid-ask spread. This requires a deep understanding of the Limit Order Book (LOB) and the matching engine dynamics. At this scale, even the speed of light in fiber optics (roughly $200,000$ km/s) becomes a constraint, leading firms to use microwave towers for faster transmission.

Python is used for research, but in the 'hot path' of execution, C++ is mandatory. Firms optimize their code to bypass the Linux kernel entirely using techniques like kernel bypass and user-space networking. For the ultimate edge, firms use FPGAs (Field Programmable Gate Arrays) to implement trading logic directly into the hardware.

The 'tick-to-trade' latency, the time between receiving a market data packet and sending an order, is the only metric that matters. In 2025, a tick-to-trade latency of over $1$ microsecond is considered slow in the most competitive markets.

The biggest risk for an HFT firm is Adverse Selection. This happens when you fill a 'buy' order just as the market is about to crash. To mitigate this, HFTs use signals like Order Flow Imbalance (OFI) to predict short-term price movements. The OFI is calculated as the net change in the number of shares at the best bid and ask: $OFI = \Delta BidQty - \Delta AskQty$. If $OFI > 0$, there is buying pressure.