Order book and microstructure

Order flow imbalance

Also called OFI

Net buying pressure at the best quotes over an interval, measured from bid and ask queue changes, new orders, cancellations and trades.

How it works

Order flow imbalance (OFI) is the net change in buying minus selling interest at the best bid and ask over a short interval. Cont, Kukanov and Stoikov defined it in "The price impact of order book events", using one month (April 2010) of NYSE TAQ quotes for 50 US stocks.

OFI is built one book event at a time. For each change in the best quotes, the contribution is:

e(n) = [bid(n) >= bid(n-1)] x qbid(n) minus [bid(n) <= bid(n-1)] x qbid(n-1) minus [ask(n) <= ask(n-1)] x qask(n) plus [ask(n) >= ask(n-1)] x qask(n-1)

where [condition] is 1 if true and 0 if not, and qbid, qask are the sizes at the best quotes. If the bid price is unchanged, its part is just the change in bid size. A higher bid adds the whole new queue; a lower bid removes the whole old one. The ask side works the same way with signs reversed. OFI over an interval is the sum of e(n).

The paper finds that mid-price changes over short intervals are close to linear in OFI, with an average R-squared of 65%. In their stylised book, with D shares at every level behind the best quotes, the change in mid is about OFI / (2D) ticks. In the data the slope beta behaves like c / depth: the hypothesis that the power on depth is 1 could not be rejected for 35 of the 50 stocks.

OFI counts cancels and new limit orders, so a market sell and a cancelled bid of the same size count alike.

The common mix-up is with order book imbalance and the microprice. Order book imbalance is a snapshot of queue sizes at one moment. The microprice turns that snapshot into a fair-price estimate. OFI is a flow: it measures how the queues changed over a window, and it explains the price change that happened in the same window.

Worked example

Made-up numbers. Best bid 100.00 x 3,000, best ask 100.01 x 2,000. Four events happen in one second. A limit buy adds 1,000 to the bid: +1,000. A market buy takes 600 from the ask (2,000 to 1,400): +600. A bid cancel removes 500 (4,000 to 3,500): minus 500. A new 300-share offer joins the ask (1,400 to 1,700): minus 300. OFI = 1,000 + 600 minus 500 minus 300 = +800 shares. With depth of about 4,000 shares a level, the stylised model gives a mid change of 800 / (2 x 4,000) = 0.1 tick. The fitted slope for a real stock would replace the 1 / (2D).

In an interview

"How would you build a feature from order book updates that explains short-horizon mid-price changes better than signed trade volume?"

A strong candidate describes order flow imbalance from Cont, Kukanov and Stoikov. For each update at the top of the book, add bid size increases, subtract bid size decreases, subtract ask size increases and add ask size decreases; on a price change, count the whole new or old queue. Sum over the interval. Then regress mid changes in ticks on OFI: delta P = beta x OFI + noise, with beta about 1 / (2 x depth) in the stylised model. They found an average R-squared of 65% across 50 NYSE stocks, and price impact inversely proportional to depth. Its edge over trade imbalance is that cancels and new limit orders count too. The interviewer will likely push on whether this is a forecast: as specified it is contemporaneous, so to predict you would need lagged OFI, and the fit changes with intraday depth.

Put it to work in a timed game.

Practise with Dice Market Making

Sources

  1. arxiv.org/abs/1011.6402

Last checked November 2026.

← All 281 glossary terms

Was this definition clear?