Use of FPGAs in FX Trading

Author: Sanjay Shah, CTO, NanoSpeed
Date: 18 July 2014

As FX trading becomes increasingly electronic, low-latency trading and risk technology will become increasingly critical to the market. FPGAs are helping accelerate the industry.

Foreign exchange is the world’s most traded market, with the average daily turnover approaching US$5.4 trillion. Unlike most financial markets, the FX market is still OTC, but more and more of the trading is moving to electronic systems.

With no central FX exchanges, FX trades increasingly are clustering into large data centers, taking advantage of the 40 gig to 100 gig fibre-optic pipes and the resilience offered by the data centers. Most of the liquidity in FX is concentrated in the LD4 (London), NY4 (New York) and TY3 (Tokyo) data centres. And more and more of the larger FX traders that are outside these three centers either are moving to them or to other large data centers, such as Aurora in Chicago.

The overall liquidity also depends on the fast connectivity between data centers – for example, between Aurora and NY4. Some global players have FPGA (field-programmable gate array) servers in TY3 that hand over trading positions to LD4, which then does a hand-over to NY4 to keep the trading going 24 hours a day.

Reduced latency in connectivity between data centers can be achieved by moving from fibre to microwave technology. Although fibre is a good medium, physics is against it. First, light has to travel through a physical medium of glass, which is like trying to walk through treacle. Second, it’s almost impossible to get a completely straight fibre connection between two points that are often hundreds or even thousands of miles apart.

Microwave and millimeter wave networks will become increasingly important in FX trading, as they reduce latency by as much as 25% to 30%. And using FPGAs for signal processing and compression in next-generation microwave and millimeter wave networks results in 40% greater capacity than the current 10 meg-per-user connection. Using fibre as a backup gives greater resilience. With advances in microwave and millimeter wave technology, we will see this capacity increasing steadily over time, though there is still the need to be efficient in the usage of these data pipes.

FPGAs are increasingly used for FX trading within the FX data centers. With resilient TCP stacks running fully on FPGAs, hundreds of participants can trade with sub-microsecond speeds within a data center and traders connected to a data center. FPGAs are excellent for normalizing incoming FIX trade messages to a binary format, which has the advantage of being processed more easily and therefore more quickly by an algorithm. Also, as trading firms move toward self-regulation, FX pre-trade risk strategies are being moved to FPGAs, in order to avoid the time ‘penalties’ of running them in the more traditional way.

FX prices are influenced by a multitude of political, economic and other news, such as natural disasters. With FPGAs it is possible to take in a news feed and feed the key indicators to the FX algos, so they can respond in sub-microseconds. This can create multiple trading opportunities for FX traders.

With huge liquidity in the FX market, momentum is building for electronic FX trading, offering enormous potential gains. However, lessons need to be learned from HFT in other asset classes to avoid the pitfalls of risk and unreliability.