Contents · 13 sections
  1. Problem and scope
  2. Five numbers in the order book
  3. Spread, inventory and adverse selection
  4. Futures basis and roll
  5. A numerical example
  6. Execution algorithms and the basis trade
  7. Boundaries and counterexamples
  8. One-page checklist
  9. Common misreads
  10. Data conventions
  11. Exercises
  12. Related
  13. Sources

Problem and scope

The same stock or futures contract can trade at prices that differ by tens of basis points depending on time and order type. That difference is not explained by "sentiment"; it comes from the structure of the order book: how many limit orders sit at each price, how thick each level is, how unbalanced the flow is and how much inventory a market maker is willing to carry. Market microstructure does not ask what the price "should" be. It asks what price a trade can actually obtain given the current order flow.

This article separates the order book into five numbers: best bid and ask, spread, depth at each level, order imbalance and impact cost. It then connects futures basis to show how spot, futures and roll yield constrain one another. A hand-calculable example compares a market order, a limit order and a split execution. All numbers are teaching assumptions, not quotes from any real contract.

Five numbers in the order book

First, best bid and ask. The highest bid is the best bid; the lowest offer is the best ask. Their midpoint is often called "the market price," but no trade executes at the midpoint: a buyer pays the ask, a seller receives the bid.

Second, spread. Ask minus bid is the absolute spread; divided by the midpoint it becomes a relative spread, usually quoted in basis points. The spread is the fee a market maker charges for immediacy and the most visible scale of liquidity. A narrow spread is not the same as cheap execution: if only one lot is posted, a large order still walks the book.

Third, depth. The quantity posted at each price and the cumulative quantity behind the best price. Depth determines how many levels a large order consumes. Looking only at the top level mistakes a market that "looks deep" for one that can absorb size.

Fourth, order imbalance. Total bid depth minus total ask depth, or aggressive buying volume minus aggressive selling volume. Positive imbalance means buyers are more impatient; negative means sellers are. Imbalance is an observable short-run price pressure, not a sufficient statistic for direction.

Fifth, impact cost. As an order walks from the best price through several levels, the volume-weighted average price differs from the midpoint at arrival. That difference is impact cost. It rises non-linearly with size: a small order may pay half a spread; a large order consumes several levels and leaves a footprint.

Transmission from order flow to book, spread/depth and VWAP (teaching illustration) Transmission from order flow to book, spread/depth and VWAP (teaching illustration)。Numbers are teaching assumptions, not official statistics. Four accounting nodes Order flow Order book Spread/depth Fill/VWAP Arrows show accounting order, not causation
Figure 1:Transmission from order flow to book, spread/depth and VWAP (teaching illustration)。

Spread, inventory and adverse selection

A market maker is not a risk-free intermediary. Three costs sit behind the quote: order-processing cost (systems, clearing, staff), inventory risk (price moves against the acquired position), and adverse selection (the counterparty knows something before the quote is hit). The spread must cover all three; otherwise the market maker exits and liquidity thins.

Inventory risk has a simple arithmetic. A market maker buys 1,000 shares at 100; a 0.5% immediate fall loses 500. If each round trip earns 0.2 per share, normal flow of 2,500 shares is needed to recover. The larger the inventory, the more the market maker lowers the bid and raises the ask, widening the spread.

Adverse selection is subtler. If informed traders are 20% of order flow and each informed order costs 0.3, the adverse-selection cost per 100 orders is 20×0.3 = 6. If each normal order earns 0.2, 80 normal orders earn 16, leaving 10. If the informed share rises to 35%, adverse-selection cost is 10.5 and net income falls to 5.5. The market maker does not need to predict direction; it needs to identify the information content of flow.

Futures basis and roll

Futures prices are not a simple copy of spot. Basis equals spot minus futures (or the reverse, depending on convention) and contains carrying cost, convenience yield, financing and supply-demand expectations. For storable commodities, basis usually fluctuates around carrying cost; for equity-index futures, dividends, rates and short-selling costs matter; for Treasury futures, the cheapest-to-deliver bond and conversion factor split basis into delivery options.

Roll yield is the gain or cost from moving a position from the near contract to the next. In contango, a long position buys a more expensive deferred contract and bears negative carry; in backwardation, it buys a cheaper deferred contract and earns positive carry. Roll yield is not free money: it may compensate storage cost, or reflect convenience yield and risk premium. Treating the historical average roll yield as expected return ignores the structural source of basis.

Top-two-level bid and ask quantities: 500/400 at the touch (teaching assumption) Top-two-level bid and ask quantities: 500/400 at the touch (teaching assumption)。Numbers are teaching assumptions, not official statistics. Value comparison (teaching assumption) 500lots Bid 1 400lots Ask 1 600lots Bid 2 700lots Ask 2
Figure 2:Top-two-level bid and ask quantities: 500/400 at the touch (teaching assumption)。

A numerical example

Suppose the order book is: bid 99.80×500, 99.50×600, 99.20×900; ask 100.20×400, 100.50×700, 100.80×1,000. The midpoint is 100.00, the absolute spread 0.40 and the relative spread 40 basis points.

A market buy of 600 lots first takes 400 at 100.20, then 200 at 100.50. VWAP = (400×100.20 + 200×100.50)/600 = 100.30. Relative to the arrival midpoint of 100.00, impact is 0.30, or 30 basis points. If only 400 lots are bought, VWAP is 100.20 and impact is 20 basis points. A 50% larger order raises impact from 20 to 30 basis points: the increase is non-linear.

A market sell of 500 lots takes 400 at 99.80 and the remaining 100 at 99.50. VWAP = (400×99.80 + 100×99.50)/500 = 99.74, a 0.26 discount to the midpoint, or 26 basis points. A 500-lot round trip costs about 56 basis points before commissions and further price movement.

Third, a market maker fills 1,000 lots a day and earns half a spread of 0.20 per lot, gross 200. If 20% of fills are informed and each costs 0.30, adverse-selection cost is 60. Average inventory is 300 lots and an adverse price move of 0.10 costs 30. Net income is 110. Spread revenue is not net profit; adverse selection and inventory must be deducted.

Execution algorithms and the basis trade

Execution algorithms are not magic that removes impact. They trade speed against footprint. A VWAP schedule spreads an order in proportion to expected volume; a TWAP schedule spreads it evenly over time; a POV algorithm participates at a fixed share of observed volume. Each chooses a point on the same frontier: trade faster and pay more impact, or trade slower and bear more timing risk.

Take a 5,000-lot order in a market that trades 50,000 lots a day. A 10% POV schedule would take about one day if volume is evenly distributed; a 20% POV schedule halves the time but doubles participation. Expected impact is not linear: at 10%, the order may hide inside normal flow; at 20%, it becomes visible demand and other traders adjust. A backtest that assumes the same impact at both rates is not conservative; it is wrong.

The basis trade has a similar structure. A trader buys spot and sells futures when the basis is wide, or does the reverse when it is narrow. The position earns convergence plus carry but bears margin, funding, delivery and roll risk. If the futures curve is in contango and the trader rolls long, the roll cost can exceed the initial basis gain. If it is in backwardation, roll yield is positive but may reflect a physical shortage that makes delivery expensive. Basis is a package of risks, not one mispricing.

For both execution and basis, compare net of cost and risk, not gross. A strategy that earns 20 basis points of convergence but pays 12 of spread, 4 of funding and 3 of roll has almost nothing left. The order book tells us the cost of immediacy; the futures curve tells us the cost of time. A serious analysis puts both on the same spreadsheet.

A final execution point is margin. Futures positions require initial and variation margin; a basis trade that looks profitable on price can be forced out by a margin call before convergence. The funding plan must include a margin buffer, not just the expected profit. The order book may show a liquid contract, but the clearing house sets the collateral rules, and those rules can change in a stress event.

Impact cost as order size rises from 100 to 1,000 lots (teaching assumption) Impact cost as order size rises from 100 to 1,000 lots (teaching assumption)。Numbers are teaching assumptions, not official statistics. Path and threshold (teaching assumption) 10bp 100 20bp 300 30bp 600 45bp 1000
Figure 3:Impact cost as order size rises from 100 to 1,000 lots (teaching assumption)。
VWAP and impact for three orders (teaching assumption) VWAP and impact for three orders (teaching assumption)。Numbers are teaching assumptions, not official statistics. Key numbers table (teaching assumption) Order VWAP Impact Buy 400 100.20 20 bp Buy 600 100.30 30 bp Sell 500 99.74 26 bp
Figure 4:VWAP and impact for three orders (teaching assumption)。

Boundaries and counterexamples

First, quotes are not fills. Orders can be cancelled at any time; displayed depth can be ghost liquidity. In fast markets, the top-level quantity can disappear in milliseconds. A static snapshot underestimates large-order impact.

Second, iceberg and hidden orders. Real size may be sliced into small pieces; the visible book is only the tip. Conversely, posted size can be intentionally misleading. Visible depth alone cannot establish true supply.

Third, high-frequency market making is not a sure profit. A market maker earns the spread in calm markets and can lose several days' income in a gap. The 2010 flash crash and the 2015 Swiss franc de-peg are counterexamples to inventory-risk-free market making.

Fourth, basis is not a risk-free arbitrage. If spot, futures or financing breaks down, the arbitrage breaks too. Delivery rules, warehouse receipts, margin and counterparty risk all change basis.

Fifth, impact and volatility reinforce each other. When volatility rises, market makers widen spreads and cut depth; the same order has larger impact, and impact can trigger stops that amplify volatility. Using calm-period cost assumptions in a crisis backtest is a common underestimate.

Execution risk under volatility and depth combinations (teaching illustration) Execution risk under volatility and depth combinations (teaching illustration). Numbers are teaching assumptions, not official statistics. Two-axis decision matrix (teaching illustration) Normal Monitor Caution Split/delay Low volatility High volatility Deep book Thin book
Figure 5:Execution risk under volatility and depth combinations (teaching illustration).

Additional boundary one: an order-book snapshot is not liquidity. Icebergs, hidden orders and fleeting cancellations make visible depth differ from executable depth; only 500 of 5,000 lots may show, and a 10% participation rate still faces queue and cancel risk.

Additional boundary two: impact rises non-linearly. A 600-lot buy takes 400 at 100.20 and 200 at 100.50, giving VWAP 100.30 and 30 bp impact versus the 100.00 midpoint. At 1,000 lots the later levels are deeper, so average cost cannot be extrapolated linearly from 30 bp.

Additional boundary three: basis is not riskless arbitrage. A 50,000 notional with 10% margin is 5,000; a 12% adverse move is 6,000, already above margin. Roll, margin calls and a liquidity squeeze can force liquidation before spot and futures converge.

Additional numerical counterexample: bid 99.80 and ask 100.20 give a 0.40 spread, about 40 bp. A market maker filling 1,000 lots at 0.20, minus 20% informed orders losing 0.30 each and 30 inventory cost, nets about 110. The result is sensitive to the informed share and inventory cost.

One-page checklist

  • Record best bid, best ask, midpoint and spread in both absolute and basis-point terms at arrival.

  • Record top-five depth and cumulative depth, not just the best level.

  • Compare VWAP with the arrival midpoint to calculate impact cost.

  • Estimate cost separately for small, medium and large orders; do not use one average.

  • Deduct adverse selection, inventory and system cost from market-making revenue; do not look only at spread.

  • State the basis convention, cheapest-to-deliver, carrying cost and roll rule in futures analysis.

  • Add a volatility scenario and a "depth disappears" scenario to execution-cost backtests.

  • Label every order-book number with snapshot time and teaching status.

  • Record cancel rate, fill rate and snapshot time; static depth cannot replace execution quality.

Common misreads

Misread one: a tight spread means low cost. The spread is only the explicit cost at the top level; a large order also pays depth, queue and impact. A 0.20 bid-ask looks like 40 bp, but a 600-lot execution can turn it into 30 bp or more of impact.

Misread two: basis must converge, so arbitrage is riskless. Convergence needs time, funding and deliverability; margin calls, roll cost and a liquidity squeeze can blow up the position first.

Misread three: market makers earn the spread for free. A 0.20 spread must cover adverse selection, inventory and cancel risk; 20% informed orders losing 0.30 each can cut the net on 1,000 lots to 110.

Misread four: order-book depth is liquidity. Visible quotes can be cancelled, hidden or diluted by icebergs; only 500 of 5,000 lots may be executable, and a static snapshot cannot replace execution simulation.

Misread five: VWAP is the all-day average, so it represents true cost. VWAP is a volume-weighted outcome, not an executable quote; using end-of-day VWAP to judge a 600-lot order ignores timing and the impact path, and may include the closing auction.

Data conventions

Convention one: an order book record needs timestamps, bid/ask, depth by level and cancel rate. A snapshot stores one instant of quotes; VWAP and impact need trade prints or order-book reconstruction. 5,000 lots quoted and 500 executable are two different objects.

Convention two: basis needs spot, futures, contract month and margin. A 50,000 notional at 10% margin is 5,000; a 12% adverse move loses 6,000. Roll yield and margin calls belong in the same cash-flow table.

Convention three: market-making net income splits into spread revenue, adverse-selection loss and inventory cost. 1,000 lots at 0.20 is 200 revenue; 20% informed at 0.30 loss is 60; inventory cost 30; net 110. Without the split, one cannot see which parameter is fatal.

Convention four: execution benchmarks must separate arrival price, decision price and close. Arrival midpoint measures impact, decision price measures delay and close measures opportunity cost; mixing the three confuses execution with selection.

Exercises

  1. Bid 99.80 and ask 100.20; compute absolute spread, midpoint and relative spread in basis points.
  2. A buy of 600 takes 400 at 100.20 and 200 at 100.50; compute VWAP and impact versus midpoint.
  3. A sell of 500 takes 400 at 99.80 and 100 at 99.50; compute VWAP and impact.
  4. For a 1,000-lot order, how would you use top-five depth to estimate impact? Explain the non-linearity.
  5. A market maker fills 1,000 lots at 0.20 each, 20% informed at 0.30 loss, inventory cost 30; compute net income.
  6. Distinguish adverse-selection cost from inventory risk and give one observable indicator for each.
  7. Explain long roll yield in contango and backwardation, and what it compensates.
  8. Why does a large top-level quote not imply cheap execution for a large order?
  9. How do iceberg and hidden orders change a static order-book cost estimate?
  10. Design a 10% POV execution plan with time, participation and main risks.
  11. How can a margin change force liquidation of a seemingly profitable basis trade?
  12. Explain the limits of an order-book snapshot in one paragraph and give two data improvements.

Data note: order-book and market-structure material draws on the SEC, IOSCO, BIS, Kyle, Glosten–Milgrom, NYSE, Nasdaq and CFA Institute[1][2][3][4][5][6][7][8]; all body numbers are teaching assumptions.

Related

  • Prerequisite: MKT-013 Crude Oil and Refined Products.
  • Further reading: MKT-067 Volmageddon 2018: Inverse Volatility ETNs and Rebalancing.

Sources

  1. U.S. Securities and Exchange Commission. Market structure. https://www.sec.gov/marketstructure/ (accessed 2026-11-25)
  2. IOSCO. Market microstructure and liquidity research. https://www.iosco.org/ (accessed 2026-11-25)
  3. Bank for International Settlements. Market liquidity and stress. https://www.bis.org/ (accessed 2026-11-25)
  4. Kyle, A. S. Continuous auctions and insider trading. https://doi.org/10.2307/1913210 (accessed 2026-11-25)
  5. Glosten, L. R. and Milgrom, P. R. Bid, ask and transaction prices. https://doi.org/10.1016/0304-405X(85)90044-3 (accessed 2026-11-25)
  6. NYSE. Market model and order types. https://www.nyse.com/markets/nyse (accessed 2026-11-25)
  7. Nasdaq. Order book and trading mechanics. https://www.nasdaq.com/ (accessed 2026-11-25)
  8. CFA Institute. Market microstructure and execution. https://www.cfainstitute.org/ (accessed 2026-11-25)

Worked demo

Read-through check: can you say three things?

No recitation needed. Tick each sentence below and see whether you can explain the mechanism, one worked example and one boundary in your own words.

Ticked 0 / 3

The numbers are teaching assumptions that show relationships, not forecasts or investment advice.

This article has passed the current publication gate. Factual, calculation and translation revisions update both language versions together.

Cite this article

For non-commercial citation, credit the author, title, site and link. Third-party sources remain under their own licences.

Order Books, Market Making and Futures Basis. 51invest, 2026-11-26. https://markets.51invest.com/en/learn/order-books-market-making-futures-basis/

Back to station