Back to Research
Liquidity & Execution August 30, 2026 • 13 min read

Liquidity Beyond the Spread: Order-Book Depth, Slope, and the Cost of a Round Trip

The bid-ask spread tells you what it costs to trade one share. It tells you almost nothing about what it costs to trade a thousand. Liquidity is not a single number at the top of the book — it is the whole shape of the resting orders behind the touch: how much size is waiting, how quickly the price gets worse as you consume it, and what a full round trip actually costs. Here is how to read all three straight off the limit order book.

1. The spread is only the first inch

Ask a trader how liquid a market is and the reflex answer is the spread — the gap between the best bid and the best ask. It is a fair measure for the smallest possible order, but it describes exactly one price level. The moment your order is larger than the size resting at the touch, the spread stops being relevant: you sweep through the best quote, then the next, then the next, each one worse than the last. Two markets can quote an identical spread and yet be worlds apart in what they cost to actually trade — one backed by deep resting size, the other a thin veneer over a vacuum.

This was the point of Irvine, Benston & Kandel's (2000) study, bluntly titled "Liquidity Beyond the Inside Spread." The inside spread is the tip; the information that matters for anyone trading real size is in the depth behind it. To measure liquidity honestly you have to read the whole book, and that resolves into three complementary questions: how much is there, how steep is it, and what does a round trip cost.

2. Depth: how much can trade near the price

The first question is the simplest: how much size is resting close to the mid? Not at the mid — near it, within a band you care about. Pick a tolerance in basis points, say ±10 bps of the mid price, and sum the resting size on each side that falls inside it. That is near-touch depth, and it answers the practical question directly: how much can I trade right now without pushing the price more than 10 bps?

Depth is the order-book cousin of Kyle's (1985) notion of market depth — the quantity that can be absorbed for a given price move. Kyle framed it as 1/λ, the inverse of the price-impact coefficient; on a live book you can read the same idea off the resting orders without estimating anything. A market with 20,000 shares within ±10 bps is a very different animal from one with 200, even if both quote a one-tick spread. And splitting the depth by side — bid depth versus ask depth — is itself a signal: a book that is deep on the bid and thin on the ask is telling you where the pressure is, a static analogue of order-flow imbalance.

3. Slope: how fast the book gets worse

Depth tells you the total; it doesn't tell you how that size is distributed. Two books can hold the same quantity within ±10 bps while feeling completely different to trade against: one packs it right at the touch, the other spreads it thinly out to the edge of the band. The distinction is the slope of the order book — how steeply cumulative size builds up as you move away from the mid.

A useful, model-free version is simply the cumulative resting size divided by the relative price distance it spans:

slope = (Σ size) / ( |Plast − Pref| / Pref )

A steep slope means size is concentrated near the mid — you can trade a lot before the price moves, and the book is resilient. A shallow slope means liquidity is scattered far from the touch, so even a modest order walks a long way up the ladder. Næs & Skjeltorp (2006) showed that this slope carries real information: flatter books go with higher volatility and thinner trading, and the shape of the book relates systematically to the volume-volatility dynamics of the market. It compresses the entire depth profile into one interpretable number — bigger is more liquid.

4. The round trip: what liquidity actually costs

Depth and slope describe the book; the third measure prices it. Suppose you buy a given size by walking up the asks, then immediately sell the same size by walking down the bids. The gap between what you paid and what you received — expressed in basis points of the mid — is the cost of a round trip: the pure friction of entering and exiting a position of that size right now.

round‑trip cost (bps) = ( VWAPbuy − VWAPsell ) / mid × 104

This is the Cost of a Round Trip (CRT) of Irvine, Benston & Kandel (2000): a single, size-aware liquidity price that generalises the spread. For a tiny order it collapses back to the quoted spread in basis points; for a larger one it grows as the trade eats into deeper, worse-priced levels. It is a strictly increasing function of size — trade more, pay more per unit — and that curve, cost versus size, is the most honest liquidity fingerprint a book has. It is also an ex-ante number: computed from the resting book before you trade, it tells you the cost you would face, not the one you already paid.

5. Snapshot liquidity is not realized impact

A caveat worth stating plainly: these three measures read the standing book — a photograph of the resting orders at one instant. That is not the same as the impact you realize when you actually trade. Between the photograph and your fill, the book moves: passive orders cancel, fresh liquidity refills, and other participants react to your footprint. Snapshot depth can overstate what is really available (some of it evaporates the moment you lean on it) or understate it (hidden and refilling liquidity appears as you go).

So the book-shape measures are the ex-ante view, and they pair naturally with the ex-post ones. Amihud's (2002) illiquidity ratio — average |return| per unit of volume — measures realized impact over time. A market-order simulation walks a single order through the book to get the fill you'd actually get on this snapshot. And full transaction-cost analysis reconciles the two after the fact. Depth, slope, and round-trip cost are what you check before you send the order; they are cheap, instantaneous, and exactly the pre-trade gauges an execution system needs to size and schedule an order sensibly.

6. Computing it

Our open-source orderflow-metrics library ships all three, dependency-free, in TypeScript and Python. They take plain arrays of price levels sorted best-first — bids high to low, asks low to high — so you can drop in a book snapshot from any feed:

import {
  depthWithin,
  orderBookSlope,
  costOfRoundTrip,
} from "orderflow-metrics";

// a book snapshot — mid = 99.975
const bids = [{ price: 99.95, size: 6 },  { price: 99.90, size: 10 },
              { price: 99.85, size: 15 }, { price: 99.75, size: 25 }];
const asks = [{ price: 100.00, size: 5 }, { price: 100.05, size: 8 },
              { price: 100.10, size: 12 },{ price: 100.20, size: 20 }];

// 1. how much rests within ±10 bps of mid, split by side
depthWithin(bids, asks, 10);
// { bidDepth: 16, askDepth: 13, total: 29 }

// 2. how steeply the ask side thickens away from mid
orderBookSlope(asks, 99.975);   // ≈ 19995  — size per unit relative move

// 3. the bps cost of buying then selling 15 units
costOfRoundTrip(bids, asks, 15);
// { avgBuyPrice: 100.04, avgSellPrice: 99.92,
//   roundTripBps: 12.00, filledSize: 15 }

The Python distribution exposes the same functions (depth_within, order_book_slope, cost_of_round_trip). They sit beside the rest of the execution toolkit — price-impact models, optimal-execution scheduling, and the order-book reconstruction that feeds them — in the wider market microstructure library we build in the open. Notice how tiny the round-trip cost of 15 units (12 bps) is relative to what 150 would be: run the same call across a size grid and you have the cost curve that should drive how you slice an order.

7. Conclusion

Liquidity is not the spread. The spread prices the first share; everything that matters for real size is in the depth behind it — how much is resting near the touch, how steeply the book thickens as you consume it, and what a full round trip costs in basis points. Read all three off the standing book before you trade and you replace a single misleading number with an honest, size-aware picture of what the market can absorb. Pair them with realized-impact measures after the fact, and you close the loop between the liquidity you expected and the liquidity you got. Explore the rest of the toolkit in our quantitative research library, or read the implementation in our open-source metrics.

For more on execution analytics and open-source tooling, visit our official resources:

🧩 Open Source 💻 orderflow-metrics on GitHub 📚 More Research