Bid Ask Depth Ratio
Quick Reference
| Property | Value |
|---|---|
| Dimension | signal |
| Category | order_flow |
| Version | v1.0 |
| Output Column | bid_ask_depth_ratio |
Ratio of cumulative bid depth to cumulative ask depth at top N levels
Formula
best_bid_size / best_ask_size
CDM Inputs
| Column | CDM Table | Description |
|---|---|---|
best_bid_size | cdm_lob_snapshot | Order book snapshot data 鈥?depth levels, bid/ask prices and sizes |
best_ask_size | cdm_lob_snapshot | Order book snapshot data 鈥?depth levels, bid/ask prices and sizes |
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
levels | integer | 5 | Number of top levels to aggregate |
Output
Column: bid_ask_depth_ratio
Bid-to-ask depth ratio at specified levels
Market Intuition & Trading Rationale
Bid-ask depth ratio measures the asymmetry of resting liquidity at the touch: best_bid_size / best_ask_size. Ratio > 1 means more bid depth than ask depth 鈥?buying support exceeds selling pressure (bullish). Ratio < 1 means more ask depth than bid depth 鈥?selling pressure exceeds buying support (bearish). Unlike depth_imbalance (which uses total depth across levels), this focuses on the touch 鈥?where the next trade happens.
Usage Cases
- Short-term direction prediction: ratio > 1.5 鈫?strong bid-side dominance (bullish for next trade). ratio < 0.67 鈫?strong ask-side dominance (bearish). Trade in the direction of the ratio.
- Execution timing: For a buy order, favorable execution when ratio > 1 (bid depth available to absorb your sell). For a sell, favorable when ratio < 1.
- context: Used in
depth_imbalanceandmicrostructure_mean_reversionpacks 鈥?provides the touch-level imbalance signal.
YAML Definition
name: bid_ask_depth_ratio
description: Ratio of cumulative bid depth to cumulative ask depth at top N levels
category: order_flow
dimension: signal
version: v0.9.0 (Beta)
required_inputs:
- best_bid_size
- best_ask_size
output_column: bid_ask_depth_ratio
output_description: Bid-to-ask depth ratio at specified levels
tags:
- depth
- orderbook
- signal
parameters:
levels:
type: integer
description: Number of top levels to aggregate
required: false
default: 5
formula: best_bid_size / best_ask_size