Author:

When talking about algorithmic trading, server or exchange colocation is one of those terms that get tossed around frequently. It usually refers to the practice of placing the hardware hosting a  trading algorithm as close as possible to the exchange matching engine.

Additionally, due to the rise in popularity of algorithmic trading, the topic of exchange colocation has also gained relevancy in the media and in chatrooms. So, in this article, I will talk about the relevance of server colocation in algorithmic trading!

With the exception of high-frequency trading strategies, most algorithmic trading approaches do not justify the costs of server colocation. Having said that, proprietary firms and retail investors can benefit from renting cloud server space in data centers that are close to the ones used by their stockbrokers. This technique is very beneficial since it can help reduce the latency from a few hundred to up to single-digit milliseconds response times.

What is server or exchange colocation?

Server or exchange colocation is the practice of placing the computers in charge of executing trading algorithms as close as possible to the stock exchange. These types of trading strategies fall under the definition of what is commonly known as high-frequency trading.

Institutions that benefit from colocating their strategies close to the exchange matching engine can rent cabinets in the same datacenters where the exchanges run their backend services.

As a consequence, large institutions that specialize in high-frequency trading pay generous fees to the exchanges for the right to place their hardware inside those data centers.

As an example, the matching engine behind the New York Stock Exchange (NYSE) is located in Mahwah (NJ), and the Chicago Mercantile Exchange (CME) is located in Aurora (IL).

When and why is colocation important for algorithmic trading?

This technique is especially relevant for strategies that require the lowest latency possible in order to be profitable. Such strategies usually fall into the definition of either arbitrage trading or market-making.

Take the case of a market-making algorithm. These types of algorithms usually trade on both sides of the market and benefit from the spread between the bid and the ask. As we all know, exchanges prioritize the execution of orders based on the limit price, queuing all buy (sell) orders in descending (ascending) orders. Additionally, when it comes to prioritizing two buy orders with the same limit price, most exchanges usually follow a first-in-first-out (FIFO) rule, placing the oldest order in the first place.

This means that the fastest market makers are the ones that periodically get filled at both the bid and ask, whereas slower market makers have to wait in line. This leads to an adverse selection of the trades that get filled, since the probability of trading with more informed counterparts increases.

On the other hand, pure-arbitrage algorithms are usually only profitable for the fastest algorithm, due to the fact that it is a winner-take-all game. Thus, it is not only important to have the highest average speed, but also the lowest standard deviation of execution times.

The previous statement can be better understood by means of an example. Take a hypothetical algorithm that takes ns 25% of the times and 41ns the remaining 75% arbitrage opportunities. Thus, it would have a 31ns average response time but would lose 3 out of every 4 trades to an algorithm with a 40ns average response time and no deviation whatsoever.

How fast are high-frequency trading algorithms

Inside the NYSE data center

Although the definition of high-frequency trading changes from source to source, colocated algorithms that are optimized for achieving the lowest latency possible can achieve execution speeds of 40 microseconds (0.00004 seconds).

To provide a bit of context, the blink of an eye takes between 100 to 400 milliseconds, which means these algorithms are up to 10.000 times.

High-frequency specialists usually measure the time it takes their (custom built) hardware to receive a datapoint, use it for the algorithm’s calculations, and trigger an order. In other words, the time between input and output.

This is usually a fair metric since their hardware only competes with other colocated machines, which receive the data at the exact time. Moreover, once an algorithm triggers a signal and leaves the hardware, it also takes the exact time it would take another colocated machine to reach the matching engine.

As a consequence, high-frequency trading is different from any other type of trading. The profile of an HFT specialist is usually the one of an electronic engineer that can build tailor-made FPGAs in order to reduce a marginal microsecond of execution.

Exchange colocation for retail traders

Due to the fact that most retail investors and proprietary firms do not have enough assets under management (AUM) nor the technical resources to geographically colocate their servers to a securities exchange, the best they can do is to rent a server to a cloud provider with high response speed.

It is also worth mentioning that most retail traders do not have direct market access and actually place their orders through an intermediary broker, such as Interactive Brokers, TDAmeritrade, Robinhood, or Alpaca.

As a consequence, when choosing the region of the cloud provider, it is important to minimize the distance to the broker’s server instead of the distance to the exchange.

Server location of stockbrokers

Although microsecond high-frequency trading is not feasible for most retail investors and proprietary firms, it still might be relevant to improve execution times for feasible intraminute algorithms.

If a strategy trades based on 1-minute bars or uses order execution algorithms such as the Time-weighted Average Price (TWAP) or Volume-Weighted Average Price (WVAP), it might still be beneficial to reduce a few extra milliseconds from a trading algorithm.

The following table shows where the most popular brokers place their servers, in addition to where an algorithm should be hosted in order to use said broker.

Interactive Brokers server location

Although their offices are in Greenwich, the servers in charge of routing incoming orders to the respective exchanges are located in New Jersey. Their exact location is currently undisclosed.

Having said that, for most practical uses it is fair to say that they are in proximity to the NYSE (Mahwah, NJ).

When it comes to choosing where to rent a server on AWS, it is best to choose a data center in the US-East Region, more specifically in North Virginia. The same applies if you decide to use Google Cloud Instead.

Fidelity Investments server location

Fidelity Investments placed its servers in Papillion, Omaha. Thus, it is best to rent server space in Iowa both for AWS and Google Cloud.

E*Trade server location

E*Trade leases a data center in Alpharetta (Georgia) in order to host their backend services. Thus, if you choose to use Google Cloud, you just choose its South Carolina data center. If, on the other hand, you’re using AWS, place your server in North Virginia.

TDAmeritrade server location

TDAmeritrade placed its servers in New York, making North Virginia the most efficient region for renting computing space on AWS and Google Cloud.

Alpaca server location

Alpaca’s data servers are located in New York. Additionally, their account information is stored in a data center in North Virginia. Thus, it is best to host an algorithm either on AWS or Google Cloud in the North Virginia data centers.

Robinhood server location

It is common knowledge that Robinhood uses Amazon Web Services as its main cloud solutions provider, but the specific region chosen is currently undisclosed. Thus is unclear which data center region one should choose when trading with Robinhood as the intermediary.

If required, it would be feasible to rent a virtual server on each AWS region available just in order to timestamp the creation and routing of an order. In such a case, it is probably better to choose another broker (if possible).

Cloud provider’s latency by US region

Having gone through the location of the servers of the most important stockbrokers, it is now time to talk about the latency between the different datacenters. For doing so, I’ll be using publicly available data from Amazon Web Services (AWS).

The minimum median latency, if we also consider intra-datacenter measures, is achieved at 1.23 milliseconds, and is achieved in North California. On the other hand, the slowest measures are between the Oregon and North Virginia data centers, which makes intuitive sense due to the distance between both regions.

The following table shows the median time it takes (in milliseconds) for a packet to arrive from one data center to another.

For most applications, it is relevant to measure the latency of a roundtrip. In other words, how long it takes the sender to receive a confirmation of delivery. When it comes to algorithmic trading, the relevant metric is, for most of the use-cases, just the time it takes to send a packet to arrive destination and, for example, place a trade.

Because of this, I made the assumption that sending the data takes exactly half the time of an entire roundtrip. Although it might not be the most precise calculation, it is a fair assumption.

Is exchange colocation important for day trading?

Exchange colocation is not relevant when it comes to day trading, since the relevant timeframes of day trading and manual discretionary trading are completely different. Given the fact that the human brain usually takes an average of 150 milliseconds, making those extra 30 milliseconds it takes to send an order to the broker completely irrelevant.

In a more practical sense, it would also be irrational to expect our performance to improve if we were to move our family to Aurora, IL (where the CME data center is located).

Cost of colocation to New York Stock Exchange (NYSE)

Although it is possible to colocate a server to the New York Stock Exchange, it is definitely a constant service. The cost of renting an 8-rack unit in a partial cabinet is $2.500 per month. 

Additionally, the NYSE also charges an extra fee of $1.500 for 1 kW of power.

As a result, server colocation to the NYSE is only justifiable for institutions that specialize in high-frequency trading and have substantial capital and assets under management.

As a side note, it is a common misconception to assume that the NYSE servers are located on Wall Street. Most of the orders are routed to a data center located at 1700 MacArthur Blvd, Mahwah (New Jersey).

Categories:

Tags:

[convertkit form=4793161]

2 Responses

Leave a Reply

Your email address will not be published. Required fields are marked *

[convertkit form=5379902]