Skip to main content

Book Imbalance

Quick Reference

PropertyValue
Dimensionsignal
Categorymicrostructure
Versionv1.0
Output Columnbook_imbalance

Order book imbalance: (bid_size - ask_size) / (bid_size + ask_size) at best levels

Formula

(best_bid_size - best_ask_size) / (best_bid_size + best_ask_size + 1e-10)

CDM Inputs

ColumnCDM TableDescription
best_bid_sizecdm_trade_enrichedTrade data enriched with bar context — price, volume, side, trade type
best_ask_sizecdm_trade_enrichedTrade data enriched with bar context — price, volume, side, trade type

Parameters

This FeatureType has no configurable parameters.

Output

Column: book_imbalance

Normalized book imbalance at best levels

Market Intuition & Trading Rationale

Book imbalance measures the normalized difference between the best bid and best ask sizes: (best_bid_size - best_ask_size) / (best_bid_size + best_ask_size). The result ranges from -1 (all liquidity on the ask side — sellers dominating) to +1 (all liquidity on the bid side — buyers dominating). A value near zero indicates balanced liquidity at the top of the book.

This is the simplest and fastest limit-order-book signal. Unlike price, which only moves when a trade occurs, book imbalance updates with every order book event — limit order additions, cancellations, and executions at the best levels. This makes it a true leading indicator: the book becomes imbalanced before price moves in the direction of the heavy side. If there is three times as much size on the bid as on the ask, the next marketable order to arrive is more likely to sweep the ask (since there is less resistance), giving a short-term directional edge.

The normalization makes book imbalance comparable across instruments and time periods. Large-cap stocks with deep books naturally have large absolute sizes, but the ratio normalizes this. A book imbalance of +0.8 means the same thing for Apple as it does for a small-cap stock: extreme buying pressure at the best level. The 1e-10 epsilon prevents division by zero in the degenerate case where both sizes are zero.

Book imbalance is most effective at ultra-short horizons (100ms–1s). At these time scales, the book imbalance predicts the direction of the next trade with statistically significant accuracy. However, it can be manipulated by spoofing — placing large limit orders with no intention of maintaining them — so combining book imbalance with order book event frequency and cancellation rates helps distinguish genuine imbalance from gaming behavior.

Usage Cases

  • Next-trade direction prediction: The sign of book imbalance predicts the direction of the next marketable order with 60–70% accuracy in liquid equities, especially when |imbalance| > 0.5.
  • Short-term mean reversion trigger: Extreme imbalance values (|imbalance| > 0.9) often precede a snap-back — if one side is nearly empty, a small order sweeps it, and the new best level may flip the imbalance to the opposite extreme.
  • Flow signal confirmation: Combine with trade_sign or signed_volume. When trade direction agrees with book imbalance direction (buy trades + positive imbalance), the conviction is higher.

YAML Definition

name: book_imbalance
description: "Order book imbalance: (bid_size - ask_size) / (bid_size + ask_size) at best levels"
category: microstructure
version: v0.9.0 (Beta)
dimension: signal
required_inputs:
- cdm_trade_enriched.best_bid_size
- cdm_trade_enriched.best_ask_size
output_column: book_imbalance
output_description: Normalized book imbalance at best levels
tags: [book, imbalance, signal, microstructure]
parameters: {}
formula: "(best_bid_size - best_ask_size) / (best_bid_size + best_ask_size + 1e-10)"