FPGA for low latency trading: When optimization meets standardization (2023)

June 9, 2020 | Blog

Field Programmable Gate Array (FPGA) technology has become more commonplace as electronic trading infrastructures have advanced over the last two decades. In this article I will share some opinions on the following questions that we commonly hear from the industry about FPGA and its use in low latency trading.

Where is FPGA being used for trading, and is it right for me?

For more than 10 years, FPGAs were used in low latency trading by market participants to get an edge over their competitors. High Frequency Traders (HFTs) in particular were the first to take advantage of this not-so-new technology and reap the benefits of building extremely optimized trading strategies within FPGA chips.

Fast forward to today and the FPGA is becoming an industry standard as traditional HFTs move toward building their own ASICs in order to retain their latency edge. Meanwhile, many firms that are latency sensitive but not latency critical have updated their infrastructure to leverage FPGA technology to stay in the game. Certain trading strategies that were profitable a few years ago without the need to use an ultra low latency infrastructure, now require a performance boost that can be achieved by adding FPGA to their infrastructure.

As the overall market moves toward more efficient, faster, lower latency trading systems, the question of using FPGA for a technology-driven trading firm is no longer “do we need it?”, but “how can we start using it?”

(Video) FPGAs and low latency trading - Williston Hayes - Optiver - FPL2020

What are the differences in building a hardware FPGA-based trading system compared to a software one ?

Currently, anyone who starts from scratch designing a FPGA-based trading system will first need to invest in a team of skilled FPGA engineers that will spend a year or more building the necessary components – all before developing business logic can begin in earnest. The reality is that FPGA, unlike software, doesn’t come with hundreds of millions of users, an open source development environment, virtually unlimited libraries, supporting communities, continuous integration or anything else you would need when starting a new software project.

A great deal of effort was made by FPGA manufacturers, like Xilinx® and Intel®, to provide better support, integrated development environments, and free IP blocks, but none of this was built with low latency or electronic trading applications in mind. The low-latency finance industry – compared to other high volume uses of FPGA for media, defense or telecommunications – is relatively niche and wouldn’t justify the investment needed to develop and maintain an ultra low latency version of these components.

As a result, developers still require a specific “low latency” Ethernet MAC/PCS to access the network, a low latency network stack for IP and TCP layer management, a low latency “streaming DMA” to send and receive packets to a host system with a CPU, and eventually low latency math operators, low latency memory management algorithms, or even low latency memory controllers.

How is Enyx and nxFramework helping firms to build FPGA trading systems faster and more efficiently ?

At Enyx, we’ve spent the last 10 years developing, testing and fine-tuning these essential core IPs for our own use, while we were building Enyx low latency products. Most folks that are building their own trading systems are doing so to maintain control over critical pieces of their business infrastructure. Off the shelf, black-box trading systems do not lend themselves to this level of control, so they need to internally develop and maintain this vital piece.

This is why Enyx decided to take our internal framework, the base of all our products, and share the fruits of that development with our client base – giving them greater control over their own FPGA trading system development. There was significant effort in taking what we used everyday and making it deliverable as a product with the level of quality, documentation and support we strive to provide to our clients – and for which they have come to expect from us.

(Video) A Low-Latency Library in FPGA Hardware for High-Frequency Trading

To further advance that goal, in addition to the provided protocol IP cores (Ethernet MAC/PCS, TCP/UDP, PCIe DMA),nxFrameworkcomes packaged with a library of 60+ IPs for data streaming manipulation, memory-mapped I/O management, hashtables, caches, fifos, and math functions that help solve a variety of challenges that developers encounter when building trading systems. The library of building blocks establishes the basis for standardizing low latency FPGA development – something that was missing in the industry until now.

By starting from one of our reference designs – whether you are building a smart order router, a pre-trade risk gateway, or an automated trading engine – our framework enables any skilled FPGA development team to build a proof of concept in a matter of weeks, rather than months.

The primary nxFramework hardware components

We strongly believe that, like in software development, adaptability is key. We want to be able to deploy an application on different hardware platforms without having to rewrite code and validate systems again. This is why we are supporting the two main FPGA manufacturers, Xilinx and Intel, as well as a selection of FPGA PCIe boards and switches from certified partners in order to offer a broad range of hardware platforms where nxFramework based business applications can be deployed.

(Video) FPGA Engineer at a global technology-based trading firm

We are supporting the latest FPGA-enabled switches fromArista, the 7130L & LB series, for specific applications requiring a large number of ports. We are also proud to support theXilinx®AlveoTMfamily,Bittware XUPP3RandREFLEX CES XpressGXA10-LP1150 PCI express boards. The programming model is the same across all of these platforms, through VHDL, Verilog or even HLS for the business logic, and C/C++ for the host software controlling your system.

Can trading system optimization for ultra low latency be compatible with the use of technology standards ?

As nxFramework grows as a product, Enyx will continue to add more value by including additional business oriented features such as order execution, market data feed parsing, and bandwidth management – areas where Enyx off-the-shelf solutions excel today.

With the introduction of nxFramework, low latency FPGA optimization can finally meet development standardization. nxFramework is a complete development environment, aimed at giving future FPGA development teams the standard foundation of any low latency project.

FPGA for low latency trading: When optimization meets standardization (2)

nxFramework feature stack roadmap

Reusability is key to lowering development costs, to faster time-to-market, and agility in general. FPGA will only become mainstream if standardization happens, and reusability is de facto. This will be possible as the focus turns toward features, and the pre-optimized business functions become more important than just saving tens of nanoseconds by rewriting your own PCIe layer.

Another part of making standardization and “joining forces” possible is the ability to share experiences and get enhanced support when integrating new technology in the hope of avoiding the need to individually code the same piece of software, for instance a book builder. Enyx is known for proactively supporting our customers requests and providing access to the top quality support engineers who built and use our products. This type of specialized/expert support will ensure your projects advance to production faster and at a lower cost than the skills required to build and maintain the components offered as a part of nxFramework, in house.

FPGA vendors are doing a great job at providing general-purpose frameworks, for example; Alveo™ for Xilinx® and PAC for Intel® with OPAE, but these one-size-fits-all frameworks currently lack the low latency aspect that would be required by the financial industry before any standardized components can be widely adopted to build an ultra low latency application. In our recent discussions with FPGA team leaders at large banks and hedge funds, we’ve been told: “I wish I had this 6 years ago” in reference to the components provided by nxFramework.

(Video) Introduction to the Low Latency 10Gb Ethernet MAC Intel® FPGA IP Core

On the other hand, before nxFramework was available we saw those who bought piecemeal IP cores struggle at completing complex internal FPGA projects because it took too long to integrate each individual IP and build the overall environment to support their project. Therefore, if you are starting a new FPGA project, or migrating your existing project to a new board, and want to lay the groundwork for success, nxFramework is the tool set of choice to avoid you having to reinvent the wheel.

(Video) Algorithms in Logic for Ultra Low Latency Networking : Full Stack Applications in FPGAs

Originally posted on LinkedIn.

<< back to news list

FAQs

Why are FPGAs used in trading? ›

The sheer volume and speed of data demands a high bandwidth to process it all. Specialized trading algorithms make use of the new information in order to make trades. FPGAs provide the perfect platform to develop these applications, as they allow you to bypass non-essential software as well as generic-purpose hardware.

What is latency in FPGA? ›

1. Deterministic Latency. Deterministic Latency (DL) is the ability to precisely determine the delay between the FPGA core and the PMA pins.

How do you make a low latency application? ›

11 Best Practices for Low Latency Systems
  1. Choose the right language. Scripting languages need not apply. ...
  2. Keep it all in memory. ...
  3. Keep data and processing colocated. ...
  4. Keep the system underutilized. ...
  5. Keep context switches to a minimum. ...
  6. Keep your reads sequential. ...
  7. Batch your writes. ...
  8. Respect your cache.

What is low latency programming? ›

Low latency describes a computer network that is optimized to process a very high volume of data messages with minimal delay (latency). These networks are designed to support operations that require near real-time access to rapidly changing data.

What are FPGAs best suited for? ›

they are usually used for low volume and high complexity projects as they offer customization. Main FPGA applications are: Medical, video & image processing, telecom & datacom, server & cloud and defense and space. FPGA chips are used in both wired and wireless communications.

What are the advantages and disadvantages of FPGA compared to ASIC? ›

In terms of flexibility, an FPGA may be a better option for some because it can be reprogrammed. However, because FPGAs are limited in the functions they can be reprogrammed for, ASICs are generally the more flexible choice. Though you can't reprogram ASICs, you can create one that performs a specialized function.

What is a good latency value? ›

The difference between high and low latency

Generally, an acceptable latency (or ping) is anywhere around 40 – 60 milliseconds (ms) or lower, while a speed of over 100ms will usually mean a noticeable lag in gaming.

Why is latency important in trading? ›

In trading, latency is the time delay between an order being placed and its execution. With fast-moving markets, the lower the latency, the higher the possibility of filling an order at the displayed price before it changes.

What are the 4 components of latency? ›

As depicted in Figure 1, end-to-end latency is commonly broken down into four compo- nents of 1) processing delay, due to processing speed, 2) queueing delays in nodes (hosts and network routers and switches), 3) trans- mission delay due to the bit-rate of transmission, and 4) propaga- tion delays due to physical ...

Which method has the lowest level of latency? ›

Fast-forward switching: Fast-forward switching offers the lowest level of latency.

Which programming language is best for low latency? ›

Generally, applications that need low latency are more likely to choose C++ because its execution and compilation are a lot faster compared to the other similar programming languages.

Which language is best for low latency? ›

In low-latency situations, such as high speed trading, where microseconds can make the difference between a viable piece of software and an obsolete waste of disk space, C++ is regarded as the gold standard.

What is the benefit of low latency? ›

The more that latency can be reduced, the better a group of connected devices can communicate. The promise of ultra-low latency is more instantaneous communications, enabling millions of connected devices to communicate 400 times faster than the blink of an eye. Simply put, low latency means responsiveness.

What is low latency process and why is it used? ›

Low latency describes a computer network that is optimized to process a very high volume of data messages with minimal delay (latency). These networks are designed to support operations that require near real-time access to rapidly changing data.

Why is low latency important? ›

Low latency is imperative, because customers expect to interact with technology in real time with no delays. Issues with high latency and time delays can cause users to quit engaging on a platform and move to another application permanently.

What are 3 applications where an FPGA is used? ›

Other FPGA uses include aerospace and defense, medical electronics, digital television, consumer electronics, industrial motor control, scientific instruments, cybersecurity systems and wireless communications.

What are the 3 major components of a FPGA architecture? ›

It consists of three main parts:
  • Configurable Logic Blocks — which implement logic functions.
  • Programmable Interconnects — which implement routing.
  • Programmable I/O Blocks — which connect with external components.
Nov 20, 2019

What are the three basic elements of FPGA? ›

The three basic types of programmable elements for an FPGA are static RAM, anti-fuses, and flash EPROM.

What is one big disadvantage of FPGA? ›

Drawbacks or disadvantages of FPGA

The programming is not as simple as C programming used in processor based hardware. Moreover engineers need to learn use of simulation tools. ➨The power consumption is more and programmers do not have any control on power optimization in FPGA. No such issues in ASIC.

What is the major disadvantage of FPGA system? ›

Disadvantages. Due to the increased flexibility of an FPGA it will be less energy efficient and slower than either CPLDs or ASICs. They are also be more complex to design than CPLDs.

What are the limitations of FPGA? ›

Disadvantages of FPGA :
  • Slower.
  • Size of dataset.
  • Complexity.
  • More expensive than custom silicon.
  • No analog stuff.
  • Can not get as much circuitry a single chip.

How do you solve latency problems? ›

MENU
  1. Check Your Internet Speed and Bandwidth. ...
  2. Aim for Low Latency. ...
  3. Move Closer to Your Router. ...
  4. Close Any Background Websites and Programs. ...
  5. Connect Your Device to Your Router via an Ethernet Cable. ...
  6. Play on a Local Server. ...
  7. Restart Your Router. ...
  8. Replace Your Router.

How do I fix my latency? ›

Android: Which Is Best For You?
...
The following are common reasons for internet lag, some of which are out of your control:
  1. Replace or add a router. ...
  2. Avoid simultaneous downloads. ...
  3. Don't use too many applications at once. ...
  4. Scan and remove malware. ...
  5. Use a wired connection instead of wireless. ...
  6. Utilize local cache.
Dec 31, 2020

What is a bad latency speed? ›

Latency is measured in milliseconds, and indicates the quality of your connection within your network. Anything at 100ms or less is considered acceptable for gaming. However, 20-40ms is optimal.

How can I improve my trade latency? ›

Latency is eliminated by making changes to the trading system software or infrastructure, and there is a wide variety of such changes that can be implemented. Network changes include upgrading network switches, increasing bandwidths, and eliminating propagation delay by colocating with counterparties.

What latency is good for trading? ›

Latency for Manual Trading

The latency for overall manual trading is 5 minutes, under normal use case. Time is taken to analyze data and decide whether to buy or sell using personal discretion. This takes several minutes for even the fastest intraday traders.

What are three factors that can impact latency? ›

Latency is affected by several factors: distance, propagation delay, internet connection type, website content, Wi-Fi, and your router.

What causes latency issues? ›

What Causes Latency? In most situations, latency is caused by your internet network hardware, your remote server's location and connection, and the internet routers that are located between your server and your online gaming device, smartphone, tablet or other internet device.

What are the 3 types of latency? ›

A computer system can experience many different latencies, such as disk latency, fiber-optic latency, and operational latency. The following are important types of latency.

Which of the following is an example of low latency use case? ›

URLLC service was introduced in 5G to support use cases with stringent requirements for extremely low latency (e.g., 1ms) and high reliability (e.g., 99.999%). Examples include public safety, remote diagnosis/surgery, emergency response, autonomous driving, industrial automation, and smart energy and grid.

What applications need low latency? ›

Low latency use cases
  • Video-on-Demand.
  • VoD traditionally focuses on the highest possible quality for the lowest number of bits. ...
  • Broadcast.
  • Broadcast traditionally focuses on quality of experience for a large audience. ...
  • Live Event Streaming.
  • Live event streaming critically depends on low glass-to-glass latency.
Mar 16, 2021

Is low latency mode good for performance? ›

By submitting the frames just before they're needed in the queue, this mode significantly lowers system latency. As a result, your gameplay will be much smoother, making gaming more enjoyable. Low latency is most impactful with GPU-bound games using frame rates from 60 to 100 FPS.

Why is FPGA important? ›

FPGAs enable flexible, reconfigurable computing, as most enable the user to reprogram the hardware circuit with different logic functions. This is especially useful in computer software. Typically, the logic blocks in FPGAs include memory components, which might be simple or complex.

Why do a lot of companies use FPGA rather than ASICs in their digital systems design? ›

However, with FPGA's multifunctionality, a single unit will be significantly larger, because of its internal structure and a specific size that you cannot change. Time to Market: Also, as mentioned earlier, FPGA affords a faster time to market than ASIC due to its simplicity in terms of the design flow.

What FPGAs are in stock? ›

FPGA Stocks List
SymbolGradeName
NATIANational Instruments Corporation
LSCCALattice Semiconductor Corporation
SNPSBSynopsys, Inc.
PRSOFPeraso, Inc.
1 more row

Why use an FPGA instead of a CPU or GPU? ›

FPGA and GPU processors can execute an AI algorithm much more quickly than a CPU. This means that an AI application or neural network will learn and react several times faster on a FPGA or GPU compared to a CPU.

Videos

1. YOW! 2016 Conrad Parker - FPGA Microservices: Ultra-Low Latency with Off-The-Shelf Hardware
(Skills Matter)
2. Trading at light speed: designing low latency systems in C++ - David Gross - Meeting C++ 2022
(Meeting Cpp)
3. Low Latency Market Data
(kevgol0)
4. Building a high throughput low-latency PCIe based SDR (33c3)
(media.ccc.de)
5. [MUC++] Timur Doumler - What is Low Latency C++?
(MUCplusplus)
6. "Latency in Automated Trading Systems" by Dr. Andrei Kirilenko
(Quantopian)
Top Articles
Latest Posts
Article information

Author: Jeremiah Abshire

Last Updated: 02/09/2023

Views: 6802

Rating: 4.3 / 5 (54 voted)

Reviews: 85% of readers found this page helpful

Author information

Name: Jeremiah Abshire

Birthday: 1993-09-14

Address: Apt. 425 92748 Jannie Centers, Port Nikitaville, VT 82110

Phone: +8096210939894

Job: Lead Healthcare Manager

Hobby: Watching movies, Watching movies, Knapping, LARPing, Coffee roasting, Lacemaking, Gaming

Introduction: My name is Jeremiah Abshire, I am a outstanding, kind, clever, hilarious, curious, hilarious, outstanding person who loves writing and wants to share my knowledge and understanding with you.