FPGAs and Hardware Acceleration
FPGAs run trading logic in custom hardware for nanosecond reaction times. Learn what FPGAs are, what firms put on them, the costs, the limits and alternatives.
A field programmable gate array (FPGA) is a chip whose circuits can be configured after manufacturing to perform a specific task directly in hardware. Instead of a CPU running instructions one after another, an FPGA processes data in parallel circuits built for the job. In trading, FPGAs can parse market data, check risk and send an order in well under a microsecond, faster than software running on even the best tuned CPU. They are a staple of the most competitive high frequency and market making firms.
CPU versus FPGA versus ASIC#
| CPU | FPGA | ASIC | |
|---|---|---|---|
| What it is | General purpose processor | Reconfigurable hardware | Custom chip built for one task |
| Flexibility | Very high | Moderate; can be reprogrammed | None after manufacture |
| Latency | Microseconds for trading logic | Nanoseconds to sub microsecond | Lowest |
| Development effort | Low | High | Very high |
| Cost to change logic | Recompile | Re synthesise, hours | New chip |
What firms put on FPGAs#
| Function | Benefit |
|---|---|
| Market data parsing | Decode exchange binary feeds as packets arrive. See Binary Protocols |
| Order book building | Maintain top of book in hardware |
| Pre trade risk checks | Fast compliance with risk rules. See Risk Controls and Kill Switches |
| Order sending | Pre built order messages sent on a trigger |
| Simple strategies | Trigger orders when a price condition is met |
| Timestamping | Precise capture of packet arrival times |
A common design splits work: software on the CPU decides strategy parameters and prices, while the FPGA watches the market and fires pre armed orders instantly when conditions are met.
Costs and challenges#
- Specialised skills: hardware description languages such as Verilog or VHDL, or high level synthesis tools.
- Long build times: compiling a design can take hours.
- Testing is hard: bugs in hardware logic can be costly, and simulation must be thorough.
- Hardware costs: FPGA cards and development tools are expensive.
- Limited complexity: complex strategies are hard to fit; FPGAs suit simple, fast decisions.
Commercial options#
Vendors sell FPGA network cards and ready made components for feed parsing, order entry and risk checks, reducing development time. Some exchanges and brokers also offer hardware accelerated risk gateways. Larger firms build their own designs, and a few have explored custom chips.
Other acceleration#
| Hardware | Use in finance |
|---|---|
| GPUs | Option pricing, risk calculations, machine learning training. See Monte Carlo Option Pricing |
| SmartNICs | Network processing offload |
| Precision timing cards | Accurate timestamps. See Clock Synchronization and PTP |
GPUs are excellent for heavy parallel maths but not for the lowest latency reaction, because moving data to and from them takes time.
Is it worth it?#
Only where speed is the edge. For strategies holding positions for minutes or longer, the money is better spent on research, data and risk management. Even among professional firms, FPGAs are used selectively. See High-Frequency Trading.
Frequently asked questions#
What is an FPGA in trading?#
A reconfigurable chip that runs trading functions such as feed parsing, risk checks and order sending directly in hardware, achieving very low latency.
Why are FPGAs faster than CPUs for trading?#
They process data in parallel circuits designed for the specific task, avoiding instruction overhead, operating system delays and memory copies.
Do all trading firms use FPGAs?#
No. They are mainly used by firms competing on speed, such as market makers and high frequency traders.
Next, learn how to dedicate CPU cores to critical work in CPU Affinity, NUMA and Cache Optimization.
3 quick questions on this lesson. Get them all right to finish it.
Turn on JavaScript to take the quiz.
Mentioned in
- Trading Infrastructure ExplainedTrading Infrastructure