Top Level Bid Ask Ratio
Quick Reference
| Property | Value |
|---|---|
| Dimension | regime |
| Category | order_flow |
| Version | v1.0 |
| Output Column | bid_ask_ratio |
Ratio of top-N bid depth to top-N ask depth 鈥?measures liquidity asymmetry
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
This FeatureType has no configurable parameters.
Output
Column: bid_ask_ratio
Ratio of bid to ask depth at top levels
Market Intuition & Trading Rationale
Top-level bid-ask ratio measures liquidity asymmetry at the touch: best_bid_size / best_ask_size. Ratio > 1 means more bid depth 鈥?bullish liquidity skew. Ratio < 1 means more ask depth 鈥?bearish skew. This is the simplest liquidity asymmetry measure 鈥?a single division of the two touch sizes. Unlike depth_imbalance (which is normalized to [-1,1]), the ratio can take any positive value, making it sensitive to extreme asymmetries.
Usage Cases
- Directional skew: ratio > 2 鈫?strong bid dominance (bullish). ratio < 0.5 鈫?strong ask dominance (bearish). Between 0.5鈥? 鈫?roughly balanced.
- Execution side selection: Buy when ratio > 1 (more bid depth to absorb fills). Sell when ratio < 1 (more ask depth).
- context: Used in
iceberg_detectionpack 鈥?bid-ask ratio anomalies at specific levels can indicate hidden iceberg orders.
YAML Definition
name: top_level_bid_ask_ratio
description: Ratio of top-N bid depth to top-N ask depth 鈥?measures liquidity asymmetry
category: order_flow
dimension: regime
version: v0.9.0 (Beta)
required_inputs:
- best_bid_size
- best_ask_size
output_column: bid_ask_ratio
output_description: Ratio of bid to ask depth at top levels
tags:
- regime
- liquidity
- depth
parameters: {}
formula: best_bid_size / best_ask_size