Why Limit Orders Fill Right Before Price Moves Against You

Queue position and adverse selection: why a limit order often fills just before price moves against it, and what one NASDAQ study measured.

Key takeaways
  • Short answer: on an order book with price-time priority, orders at the same price are filled first-in-first-out. An order at the back of a long queue is reached mainly by large trades, and large trades are more often informed, so it tends to be filled just before price moves against it. This is called adverse selection.
  • Moallemi and Yuan (Columbia, 2017) value an order by its queue position: a static part (spread earned versus adverse selection, which rises with queue position) plus a dynamic part (the option of moving up the queue).
  • On Bank of America stock on NASDAQ in August 2013, the front of the queue was worth about 0.26 ticks more than an average position on 9 August and 0.21 ticks on 20 August, with a spread of about one tick. For some large-tick stocks the paper finds queue value of the same order as the spread.
  • The paper studies US equities, not crypto. We state what it measured and do not extrapolate its numbers to any crypto exchange.

Short answer. On an exchange with price-time priority, orders at the same price are filled in the order they arrived. If yours is far back in the queue, it is reached mostly by large market orders. Large trades are more often informed, so your fill tends to come just before price moves against you. The cost has a name, adverse selection, and an academic model from Columbia University puts a number on how much the queue position changes an order’s value.1

Diagram: first-in-first-out limit order queue at one price level: the front fills on any market order, the back fills mainly on large, often informed trades
Orders at the back of a queue are filled mainly by large trades, which are more often informed, so adverse selection grows with queue length.

What is queue position, and why does it exist?

Most electronic limit order books use price-time priority. Orders are sorted by price, with the best price first, and orders at the same price are ranked by arrival time: first in, first out. A market order meets the highest-priority limit orders first and can run through several of them.1 The paper adds that where the tick size is small, a trader can get priority by improving the price slightly, but when the tick is economically significant, as for the stocks it studies, queue position becomes important.

The same paper points out the exception: under a pro-rata rule, which splits trades proportionally across orders at the same price, queue position does not matter, and the paper does not consider such markets.1 Whether a given venue is price-time or pro-rata is in its rulebook.

Why do limit orders fill right before price moves against you?

The paper gives two reasons that a good queue position is valuable. The first is a faster fill and higher fill rate. The second is the one this article is about:1

“Orders at the end of a large queue will be executed in the next instance only against large trades.”

Large trades often come from informed traders who are confident about the trade’s profitability. In the authors’ words, a good queue position “acts as a filter” on the contra-side orders: the liquidity provider is less likely to trade against informed traders. At the back, the filter is gone. Your order fills mostly when a big, informed order sweeps through, and then price tends to continue in its direction. The authors say this link between queue position and adverse selection was first observed by Glosten (1994) in a single-period setting.1

What are the two parts of an order’s value?

The model identifies two components of positional value:1

  1. A static component. At the instant of a trade, the trade-off between earning the spread and incurring adverse selection costs, which increase with queue position.
  2. A dynamic component. The option value of locking in a queue position. An order that waits moves up as orders ahead of it trade or cancel, and that future gain has value.
Schematic: the value of a limit order is the spread earned times fill probability, minus adverse selection cost rising with queue length, plus the option value of moving up the queue
The model splits an order’s value into a static part (spread versus adverse selection) and a dynamic part (the option of moving up the queue).

The authors also describe how the model behaves: the probability of execution falls with queue length and flattens when the queue is very long, the adverse selection cost stays positive and grows with queue length, and the value curve declines as the queue gets longer, because of both effects together.1

How much is the front of the queue worth in numbers?

The authors calibrated the model on NASDAQ ITCH data (every order-book event, not just trades) for large-tick, liquid US stocks. Their worked example is Bank of America (BAC) in August 2013, whose bid-ask spread was almost always one tick (about 7 basis points of the price). They report that the difference between an order at the very front and one at an average queue length was about 0.26 ticks on 9 August 2013 and 0.21 ticks on 20 August 2013, and they call this comparable to the bid-ask spread.1

Bar chart: value of the front of the queue over an average queue position for Bank of America stock: 0.26 ticks on 9 August 2013 and 0.21 ticks on 20 August 2013, against a spread of about one tick
Model estimates for one large-tick stock on two days: the front of the queue was worth about a fifth to a quarter of a tick more than an average spot.

On the second day orders in the same position were worth less and had a lower fill probability, because the ratio of arrival rates was higher (0.69 against 0.43 on 9 August).1 The conditions of the day change the value. The authors checked the model against a backtest with artificial orders: the model values came close to the simulation. In their table, the average value of an order at the end of the queue ranges from slightly negative to about 0.14 ticks across nine stocks, and the gap between the front and the end is above 0.1 ticks for BAC and CSCO but below 0.1 for PFE and PBR.1

What the paper does not say

  • It is about US equities. The data are NASDAQ ITCH for large-tick stocks in August 2013. Nothing in it measures crypto exchanges, and the numbers (0.26, 0.21 ticks) are specific to those stocks and days.
  • It values orders, not signals. It is not a strategy: the authors say queue value is an ingredient for market making and optimal execution.
  • Speed buys position. The authors note the value embedded in queue position rewards the trading speed of high-frequency firms, creating a disadvantage for individual traders without fast technology, and raise the regulatory question of whether price-time priority is a good rule for large-tick assets.1

What a trader can take from this

  • A fill is information. If your resting order fills quickly and fully on a large print, expect more of the move than the spread suggests. The paper’s framework is that you traded against the type of flow that tends to be right.
  • A long queue costs more than waiting. Joining at the back raises the adverse selection per fill and lowers the chance of a fill before the price moves.
  • Compare the spread with the queue. When the spread is a single tick, the paper shows queue position can be worth a meaningful fraction of it.
  • Check the rulebook. Price-time priority is the case studied; confirm what your venue uses.

Related. How a market order moves price is in slippage and price impact; how order-book events relate to price changes in order flow imbalance and price impact; and how large resting orders can be fake in what spoofing is in crypto. What Caused the 2010 Flash Crash: Liquidity Vanished.

This is educational material, not investment advice.

Footnotes

  1. Moallemi, C. C., Yuan, K., “A Model for Queue Position Valuation in a Limit Order Book”, Columbia Business School Research Paper No. 17-70, SSRN 2996221 (initial version December 2016, revision June 2017; full text of the PDF read). Abstract: price-time priority, static and dynamic components, adverse selection increasing with queue position, queue value of the same order as the spread for some large-tick stocks. Section 1: FIFO rule, pro-rata exception (footnote 2), the two reasons queue position is valuable, adverse selection and Glosten (1994), the quoted sentence, regulatory question. Section 4: NASDAQ ITCH data, BAC in August 2013 (spread almost always one tick, about 7 basis points), model behaviour, front versus average queue 0.26 ticks on 9 August 2013 and 0.21 ticks on 20 August 2013, arrival rate ratios 0.43 and 0.69. Section 5: backtest validation, Table 3 (model values of orders at the end of the queue from -0.03 to 0.14 ticks; gap between front and end above 0.1 ticks for BAC and CSCO, below 0.1 for PFE and PBR). The text of Table 3 extracted from the PDF is partly scrambled, so we use only the ranges and the gaps stated in the paper’s own text. ↩ ↩2 ↩3 ↩4 ↩5 ↩6 ↩7 ↩8 ↩9 ↩10 ↩11

Frequently asked questions

Why does my limit order fill and then price moves against me?

Because who trades against you is not random. In a first-in-first-out queue, an order far back is reached mainly by large market orders, and large trades often originate from informed traders who are confident about the trade’s profitability. Moallemi and Yuan call the resulting cost adverse selection and show it increases with queue position.

What is queue position in a limit order book?

Most limit order books use price-time priority: orders at the best price come first, and orders at the same price are ranked by arrival time, first-in-first-out. Queue position is how many orders stand ahead of yours at your price. The paper notes that under a pro-rata rule, which allocates trades proportionally, queue position is not relevant.

How much is a good queue position worth?

In the paper’s calibration on NASDAQ data for Bank of America stock in August 2013, an order at the very front was worth about 0.26 ticks more than an order at an average position on 9 August and about 0.21 ticks on 20 August. The spread was almost always one tick. These are model estimates for one stock on two days.

Does this apply to crypto exchanges?

The paper studies US equities with market-by-order NASDAQ data and says nothing about crypto. Many crypto exchanges also run price-time priority order books, but you should check the matching rules in the exchange’s documentation; we did not verify them here, and the paper’s numbers should not be transferred.

What is adverse selection for a limit order?

It is the extra cost of trading with someone who knows more than you. A limit order earns the spread when filled, but if the fill comes from an informed trader, price tends to move against the order afterwards. The paper’s model nets the spread earned against this cost.

Sources

  1. A Model for Queue Position Valuation in a Limit Order Book. Ciamac C. Moallemi, Kai Yuan. Columbia Business School Research Paper No. 17-70, SSRN 2996221 (initial version December 2016, revision June 2017; full text read), 2017
OrderBlock.net Research

The team behind the OrderBlock.net scanner. We read the primary research and exchange documentation so you do not have to, and cite every source.

This article is research, not investment advice. Results on history do not guarantee future results.