The Three Cs to Optimize Your Electronic Trading Stack: Co-location, Cost, and Currency

By James Lupton, CTO, Blackcore Technologies

When it comes to optimizing your tech stack for electronic trading – or what you might call a “trading stack” — your first thought likely goes to your servers where the bulk of the algorithmic trading will happen. Maybe you invest in ultra-fast, reliable overclocked servers that allow you to run those algorithms faster while also dealing with the increased power consumption and head produced by this process.

However, the servers are only one part of a much larger technology stack when it comes to electronic trading, so what else do clients typically look at to maximize their trading potential?

The core components of a latency-optimized trading stack

When looking at the overall “trading stack,” you must think about the typical use-case and goals that accompany most electronic trading strategies. It’s easy to fall into the trap of imagining a single strategy running on a few servers in a single rack in a single data center, close to some exchange, tracking a single popular stock ticker. The reality, however, is often many-multiple server systems, running in multiple data centers, spanning across multiple geographical locations – all needing to work in harmony within incredibly slim time margins. When you think on this kind of scale, it is clear that many types of technology are involved to monitor, track, react, transmit, receive, and process data across these locations, within milliseconds or even nanoseconds, to be successful.

Location

Location, “proximity to” or “distance from,” is one of the biggest considerations for electronic trading. The closer that the hardware and the trading application running on it is to key endpoints such as the exchange execution gateway, the less distance any signals between those endpoints and your hardware must travel. This is typically referred to as co-location.

Many exchanges provide direct co-location in the form of rack space or dedicated cages in their data centers. The cost of such services scales with proximity and footprint. Direct exchange co-location services come at the highest premium, and are typically regulated. Managed service providers lease racks and cages from major exchanges to be able to leverage a shared cost across many different clients with connectivity costs bundled with the physical space. Third-party data center providers can also provide common data center space with proximity to one or several electronic trading exchanges – whilst not optimal, this can be a cost saving versus being in each exchange directly.

In times gone by, asking for the shortest cable runs, or even sneakily running your own cables over optimal paths, was relatively common practice. These days most exchanges will provide somewhat normalized services with equal cable lengths. However, in third-party facilities the connection to the exchange may, for example, be in one specific corner of the data center – in which case, your trading hardware within that facility again wants to be as close to that hand-off as possible.

Networking

Whether you are co-located at the exchange or at a third-party, the interconnects between all your equipment and the important market gateways are imperative for fast trading.

At a high level, networking can be broken down into local area network (LAN) and a wide area network (WAN) considerations. The former looking at how all the systems inside a single location are connected, and the latter pertaining to connecting machines at various remote locations.

When considering remote locations, the most common and well-known method for moving data large distances are fibre providers – like those that provide your home internet, and typically provide “the backbone” of the internet. However, many specialist fibre network providers have emerged with specific focus on electronic trading and providing high speed, low latency, direct connections between strategic market locations.

In the ever-expanding pursuit for speed, other technologies have gained popularity for certain strategies, at least for those that can afford them. Microwave transmissions and Millimeter wave (mmWave) are two additional types of data transmission that have gained popularity due to the ability to provide quicker data transfer for small packets of data and can usually be erected in a more geodesic route versus traditional fibre. These technologies come with their own specific use cases and draw backs. Typically, they are costly, lack bandwidth, require direct line of sight, and are also climate dependant. The signal integrity can be affected by the weather, such as heavy rain, and can even be physically knocked out of alignment by high winds.

For local networking the cables used to connect your infrastructure and the devices between your equipment – such as switches – play a key role in the optimisation of your trading stack. Firms have been known to leverage custom-length cables within their racks to optimize physical network connectivity or use technologies such as hollow core fiber to gain a further edge. For typical fiber cabling, the rule of thumb is to consider each meter of fiber adding four nanoseconds of latency.

Once cabling is sorted, you need to consider the devices at either end of the cables. On one end, you’ll typically have a switch of some kind, and there are dedicated Ultra-Low Latency (ULL) switches designed to specifically handle exchange data feeds. On the other side, will be a network card, maybe a SmartNIC or a dedicated FPGA. These should of course be installed within an overclocked server system.

NICs + FPGAs

Network Interface Cards (NICs) handle network traffic and are essential for delivering the incoming and outgoing data that your trading strategy depends on. How this data is processed in a typical server environment contains a lot of overheads that slows down the overall transmission processing. Therefore, vendors have created finance specific network cards that optimise the hardware and software that process these transactions. Field-programmable gate array (FPGAs) are another type of hardware add-in card, typically with network ports also, which uniquely have a programable set of logic gates – this contrasts with normal network cards where the “hardware logic” is fixed from the factory. A FPGA essentially lets you program the physical hardware to perform a certain function in the most optimal way – for example sending out a buy order to the exchange. This comes with significant development expertise overhead but is much faster once implemented.

Indeed, this is just a subset of the technologies and challenges involved in implementing a successful low latency trading stack – but we can already see that there is a large amount to consider, and each link in the chain has its own speciality and associated arms race for lower latency. We can also see how the overall cost of implementing a successful trading strategy can quickly escalate as you optimise each of these hurdles.