|Hardware Accelerated High-Frequency trading system
|# Hardware Accelerated High-Frequency trading system
- Richard Deng (ruichao4)
- Siyi Yu (siyiyu2)
In the financial market today there is a lot of need to optimize the trading/execution latency to support automated quantitative trading systems. While most of the computer software run on generic operating systems and the CPU executing the logic has many parts of unnecessary instructions/procedures, the automated trading strategy can be highly optimized with hardware to achieve low latency and high frequency
We plan to build a trading system that uses one PCB to connect to a fake exchange and get/send binary market data and use highly optimized FPGA to consume this market data and make decisions based on the data
# Solution Components
## Fake exchange
This will be a piece of software that simulates an exchange in real-time. This fake exchange will only have one security to trade and will be receiving three types of binary-encoded messages (add order, cancel order, update order) from the market participants using a certain protocol, building a full-depth limit orderbook based on the order received, automatically trade two orders when the bid side and ask side meet, and re-broadcasting the trade message with the other three client messages in binary encoded form following the same protocol. To test our strategy we will simulate the market data received from market participants, constantly adding limit ask/bid at the same price level in high frequency
## Networking Hardware
This will be a PCB with ESP8266 and other parts/ports to communicate with the fake exchange through the network. We plan to use UDP since it is what most exchanges will use. This part will be optimized to reduce the connectivity latency between the fake exchange and the trading system and feed the data to the FPGA.
## FPGA Trading Strategy
This will be an FPGA optimized for trading strategy, making decisions based on the binary data received from the Networking Hardware, sending the decision back to the networking PCB and which will send it back to the exchange. We plan to have two simple strategies:
1. High-frequency market-making: making a spread of $a ~ $b by sending limit bid at $a and limit ask at $b, adjust the spread based on Best Bid Offer (BBO) market data. This part is to test how fast our trading system can be adjusted based on real-time information changes.
2. High-filling rate limit order: send a limit bid order whenever there is a limit ask order at $a. This part is designed to test the latency of our trading system and is extremely useful in options trading where the bid-ask spread is very large and has a low order filling rate.
# Criterion For Success
We plan to test the latency and frequency after the project is finished. We will use another pure-software trading system running on a computer that has exactly the same strategy as the one using hardware, and we expect the highest possible frequency and the average latency of our hardware trading system when connecting and trading on our fake exchange to be significantly faster than purely software trading strategies.