In the high frequency trading world, distance is everything. But for those outside the HFT arena, what role does distance play? Let’s start with some hard numbers.
Network Latency
I have a virtual private server (VPS) in New York, New York. I connect to my broker’s systems that are in Carmel, New York. How long does it take for a message to get between those two cities and back? Let’s see…
PING ndc1.ibllc.com (64.190.197.40) 56(84) bytes of data.
64 bytes from ndc1.ibllc.com (64.190.197.40): icmp_seq=1 ttl=247 time=19.4 ms
64 bytes from ndc1.ibllc.com (64.190.197.40): icmp_seq=2 ttl=247 time=18.6 ms
64 bytes from ndc1.ibllc.com (64.190.197.40): icmp_seq=3 ttl=247 time=18.6 ms
64 bytes from ndc1.ibllc.com (64.190.197.40): icmp_seq=4 ttl=247 time=18.6 ms
64 bytes from ndc1.ibllc.com (64.190.197.40): icmp_seq=5 ttl=247 time=18.6 ms
64 bytes from ndc1.ibllc.com (64.190.197.40): icmp_seq=6 ttl=247 time=18.5 ms
A fairly steady 18.6 milliseconds. Not bad. Of course, there are many factors that can affect this time. And note that this is using Ping, which are ICMP packets. So you can think of these times as a simple “Hello”.
But what if your distance increases? The approximate distance between these two servers is 52 miles (84 kilometers). My home is quite a bit further away at 2269 miles (3652 kilometers). Here are the Ping results between my location and my broker’s servers…
PING ndc1.ibllc.com (64.190.197.40): 56 data bytes
64 bytes from 64.190.197.40: icmp_seq=0 ttl=238 time=95.201 ms
64 bytes from 64.190.197.40: icmp_seq=1 ttl=238 time=94.614 ms
64 bytes from 64.190.197.40: icmp_seq=2 ttl=238 time=101.813 ms
64 bytes from 64.190.197.40: icmp_seq=3 ttl=238 time=93.248 ms
64 bytes from 64.190.197.40: icmp_seq=4 ttl=238 time=92.446 ms
64 bytes from 64.190.197.40: icmp_seq=5 ttl=238 time=104.808 ms
That is about 97 milliseconds. Note that the distances I mention are straight-line distances. Of course the actual distance is quite a bit longer, as even if I used microwave connections it would not be in a straight line. For fun, let’s calculate the speed per kilometer.
From New York, NY to Carmel, NY the time cost per mile was approximately 357.69 microseconds ( 0.35769 milliseconds).
From my location to Carmel, NY the time cost per mile was approximately 42.75 microseconds (0.04275 milliseconds). And that makes sense. The largest number of hops per distance traveled are within the data centers. Once they move longer distances between hops, the cost per mile goes down. Removing those hops will do more to improve those numbers than the actual miles traveled. That is why colocating in the same datacenter becomes important for high frequency trading.
Remember, these times are a simple “Hello”. They include only a small bit of processing on either side of the line. When trading you have many other layers. On the data side, you may even have a delay added on purpose by your broker for data licensing reasons. On the order execution side you are beholden to all the layers between you sending the order and the order entering the matching engine at the exchange.
How doe this affect your trading?
Ok, enough fun with the numbers. How much does this have to do with your trading? Perhaps everything, or nothing.
If your trading involves fighting for price (i.e. attempting to make the spread, or get a fill at the exact time you want at the price you want), you will need to be as close to the exchange as possible. You will also want to take measurements on the data and the order side. Compare data vendors, brokerages, and exchanges. If your strategy requires your decision to be made based on incoming data and you want the round-trip to be within close time constraints (i.e. under 1 second), your location will be a large factor in whether your trade gets done within those constraints.
If you are a discretionary trader and basing your trades on what you see, the distance will be less of an issue. The average human reaction time to visual queues is around 250 milliseconds (1/4 of 1 second). So if you are sitting in New York, see something on the tape, click the button on the mouse, and get your order to the exchange, where was the time spent?
Tick left the data vendor and traveled 52 miles: 9.25 milliseconds
You see the tick and click your mouse to send the order: 250 milliseconds
Order goes to your broker and enters their system: 9.25 milliseconds
Let’s do this again, but as if you live far away from the exchange:
Tick left the data vendor and traveled 2269 miles: 49 milliseconds
You see the tick and click your mouse to send the order: 250 milliseconds
Order goes to your broker and enters their system: 49 milliseconds
Granted, this is an extreme example, as most people live closer than 2269 miles from their broker’s servers. But this experiment does show some interesting facts about discretionary trading. Distance plays role, but your reaction time is the larger factor.
Of course these are just the “basic” layers. We will now zoom out a bit to examine where should we invest the effort that will make the biggest difference in reducing these times?
Automation is the biggest bang for the buck. If your computer can make the decision for you then you can shave much of that 250 millisecond reaction time off the clock.
Receiving your data from vendors that are faster will often save time as well. Due to licensing agreements, some brokers are required to include a 15 millisecond delay before displaying the quote. If you use your broker-provided data feed as most do, and they include that 15 millisecond delay, you may consider getting your data from a faster vendor. A side-by-side comparison is fairly trivial to construct when you sign up with several vendors. Most do not require long-term contracts. Many are priced based on a monthly fee plus the quantity of data retrieved.
Execution time is another factor you should consider. While not impossible to do, side-by-side comparisons are hard to accomplish. For a realistic test, you must have a funded account at each brokerage and execute several orders. Depending on your style of trading, you may want those orders to be at different times of the day (i.e. at the open vs mid-day vs after hours).
With most brokers, they have spent a large amount of effort in the order routing area. They attempt to make this as fast and efficient as possible. But where their system sends that order has an effect on the price and speed of your order. There are a few pieces of data that you can ask your broker that will give you good indications on what your results will be.
A (not so) secret about placing orders: It has become very popular for brokers to sell their order flow. That means that your order is not sent to the exchange until their partners have seen it fly by. That gives their partners a chance to react to that order. Most brokers will not openly tell you this, but will tell you if you ask. If your broker offers equity trading with no conditions, there is a very good chance they are selling their order flow data.
Is that hurting your trading? Perhaps not. But if you trade active names or “meme stocks” with a broker that sells their order flow, there is a good chance you are “tipping your hand” so-to-speak.
For more details on this practice, checkout this article to see what the Security and Exchange Commission says about the matter.
You have plenty of options
If your trading is not overly concerned with sub-second tick-to-trade times, the current zero commissions environment is probably a benefit. But if you want the fastest execution times, there are things you can do to get execution time down to a surprisingly small number. Each layer comes at a cost, but that cost may be worth it.
- Automate. Your strategy (almost certainly) must be automated if you want to trade in sub-second times.
- Get your data as quickly as possible. Low latency live streaming data on US equities (the majority of my business) is not outrageously expensive. You don’t have to rely on your broker to provide it.
- Colocate near the exchange. You can pay thousands to put your machine near the exchange. The costs go down quickly the further away you get. A few miles away can be exponentially cheaper.
- Use a broker that specializes in fast execution times. One that allows direct routing to a specific exchange may be a requirement for some strategies.
As you go further down the tick-to-trade rabbit hole, you begin looking at optimizing your strategy, custom hardware, and detailed studies of the performance of your vendors. The initial and ongoing costs rise substantially. Is it worth it? Possibly. While you will be competing against the well-heeled companies in the market making business, I am of the firm belief that some small, nimble and innovative participants will continue to appear to remove inefficiencies in the capital markets.
Where to go from here
It is human nature to want your order to fill before others. For the vast majority of traders such a concern will not add much to the profitability of the strategy. Concentration on improving the logic of the strategy will often provide a more noticeable result.
For those with the passion and ingenuity to enter the market-making world, the technical and cost barriers exist, but not as high as some expect. However as the strategies get closer to demanding the absolute best execution times the costs rise exponentially.
If you are looking for solutions to improve the technical aspects of your trading systems, feel free to reach out. JMJ Atlanta specializes in working with retail traders and small hedge funds to empower them to concentrate on their business objectives instead of internal infrastructure.