High Frequency Trading

January 5th 2024 

Reading up on https://ieeexplore.ieee.org/abstract/document/8279781 

A. Boutros, B. Grady, M. Abbas and P. Chow, "Build fast, trade fast: FPGA-based high-frequency trading using high-level synthesis," 2017 International Conference on ReConFigurable Computing and FPGAs (ReConFig), Cancun, Mexico, 2017, pp. 1-6, doi: 10.1109/RECONFIG.2017.8279781.

Abstract - 

FPGAs are used in HFT as it is an efficient way to accelerate different components of the HFT infrastructure stack, but FPGA development through RTL design requires in-depth hardware expertise and takes significant development time. Given that these systems need frequent updates and rapid-deployment, this comes at a significant disadvantage for the HFT firm. To get around this, HLS (High-Level Synthesis) is used to quickly implement trading algorithm using high-level programming language and ultimately realize it in low-level hardware. Their analysis is done using Xilinx's Kintex Ultrascale FPGA. 

Introduction - 

HFT systems typically consist of 4 main building blocks: 

1) Network Stack 

2) Financial Protocol Parsing 

3) Order Book Handling

4) Custom Application Layer

Financial Exchanges (ex. NYSE) broadcast market updates along an Ethernet connection at typical line rates of 10Gb/s 

1) Network Stack receives messages from financial exchange and performs initial packet processing. These messages (or packets) are usually compressed in domain-specific format (ex. FAST [FIX Adapted for STreaming], an adaptation of FIX [Financial Information Exchange]) to save on bandwidth. 

2) Financial Protocol Parsing block changes these compressed packets into meaningful limited and market orders that are used to build the order book. 

3) Order Book is then constructed which offers a view of current market price spread by ordering bids (buying offers) and asks (selling offers) and showing highest buying price and lowest selling price at the top of the book. 

4) Custom Application Layer uses the spread information from the order book to analyze the market and consequently issue buy/sell orders. 

The orders placed by the custom application layer is then encoded with the same financial protocol (domain-specific format) and is sent back over the network.