The Value of Queue Position in an Order Book

by | 12.23.2021 | Articles

The Value of Queue Position in an Order Book

There is a great little barbecue place in Austin, TX called Franklin BBQ. People come from all over the country for this excellent BBQ and fantastic brisket. Many days, the line outside Franklin BBQ starts before 5 a.m. Franklin has no set closing time; they serve their barbecue until they sell out each day. If you are in line and they sell out, no barbeque for you. Your only option to come back another day. Close your eyes and imagine this scene, and you have a basic understanding of the importance of your spot in the queue within the order book.

The Importance of Your Spot in the Order Book Queue

If you’re an experienced trader, you likely have seen a limit go unfilled, despite the stock trading heavily at your limit price. Often an unfilled or only partially filled order is because you were too far back in the order book queue. Orders ahead of you were filled, but there were not enough shares for sale to fill every order and trade through your price. The prospect of going home empty-handed is alpha-destroying for algorithmically-driven traders, which makes the queue position critical for high-speed algorithmic traders. A whole set of complex mathematics applies to determining the value of any given position in an order book queue.

Queue Position on a Macro Level

Rather than detail those equations, let’s look at queue position on a more macro level. Simply put, if you are near the beginning of the order book queue for the type of order you’ve placed, then you are in the most effective position as your order will be the first filled once your price trades. As orders ahead of yours fill, your order moves up in the queue, and as you move up, the probability of your order filling becomes greater.

Canceled orders can also move you up in the queue; however, canceled orders are where the valuation mathematics gets complex. You can’t know if they were initially in front of you or behind you in the queue. Therefore, the high-speed algo trader must attempt to figure out where they are in the queue in order to calculate the probabilities of a fill before the bid/offer shifts. If their queue position shows that an order is less likely to get filled or that the trade is no longer desirable by the time the fill happens, their method may dictate the order should be canceled.

Taking the example of Franklin BBQ one step further, being too far back may only get you smoked turkey as the first people in line overwhelmed the limited supply of brisket and ribs.

How to Optimize Your Speed to Be Near the Front of the Order Queue

While it’s hard to know exactly where your order is in the queue, one of the most important factors in your control is speed to the order queue. Queue position is why the HFT and algorithmic trading community spend so much time and money optimizing their speed. Faster rates of order transmission along with deterministic market data can lead to a greater probability of orders being near the front of the queue.

The customers at Lime Direct rely on the speed and reliability that Lime offers which allows quantitative orders being sent to the markets to be processed within microseconds, which could result in an advantageous position in the queue. At Franklin BBQ, one needs to plan on getting up early and waiting in line until they open at 11.

In terms of trading, have your trading servers colocated with the exchange servers and optimized for speed. Once that is done, focus on refining the math to help determine the probabilities that the orders will be filled in the timeframe your trading algorithms require.

Backtesting, simulation, and production trading

Featured Video

Is Your Broker Reliable?

Is Your Broker Reliable?

If you’ve dealt with unreliable trading technology in the past year, you’re not alone. Both slow reporting and complete outages happened to several trading firms during high volatility days in 2021.

read more
What is Rule 15c3-5?

What is Rule 15c3-5?

Before an order is eligible to be sent for execution, it must pass through a broker’s pre-trade risk check to ensure the order is not violating any pre-determined thresholds. This rule is known as Rule 15c3-5, but what is this rule exactly? Bob Iaccino explores.

read more

Sign Up For Our Newsletter