Trade Flow Imbalance
Quick Reference
| Property | Value |
|---|---|
| Dimension | signal |
| Category | order_flow |
| Version | v0.9.0 (Beta) |
| Output Column | trade_flow_imbalance |
Trade flow imbalance: buy_volume - sell_volume - net aggressive demand pressure
Formula
buy_volume - sell_volume
CDM Inputs
| Column | CDM Table | Description |
|---|---|---|
buy_volume | cdm_* | CDM source table |
sell_volume | cdm_* | CDM source table |
Parameters
This FeatureType has no configurable parameters.
Output
Column: trade_flow_imbalance
Net aggressive trading pressure (buy volume minus sell volume)
Market Intuition & Trading Rationale
Trade flow imbalance measures net aggressive demand: buy_volume - sell_volume. It partitions all executed volume into buyer-initiated and seller-initiated trades (using trade_sign), then subtracts. A positive value means more volume was executed by aggressive buyers than aggressive sellers — bullish pressure. A negative value means aggressive sellers dominated — bearish pressure.
Unlike OFI (which measures changes in resting orders), trade flow imbalance measures executed trades — what actually happened, not what was intended. The two can diverge: OFI may show buying pressure (bids being added) while trade flow imbalance shows selling pressure (aggressive sellers hitting those bids). This divergence is informative — passive buyers are accumulating while aggressive sellers are providing the liquidity. When both OFI and trade flow imbalance point in the same direction, the signal is higher conviction.
Trade flow imbalance is scale-dependent — it's measured in share or contract units, which vary across instruments. For cross-sectional comparison, normalize by total volume: trade_flow_imbalance / total_volume produces a scale-free ratio between -1 and +1. The normalized_trade_imbalance FeatureType does exactly this.
Usage Cases
- Aggressive demand gauge: Use trade_flow_imbalance to assess which side is paying the spread. When buy volume dominates, traders are willing to pay the ask — bullish. When sell volume dominates, traders are hitting the bid — bearish.
- OFI confirmation: Trade in the direction where both OFI and trade_flow_imbalance agree. When they disagree, the market is mixed — one side is passively positioning while the other is aggressively executing. The aggressive side (trade flow imbalance) usually dominates in the very short term; the passive side (OFI) predicts the medium term.
- Volume-weighted momentum: Rising trade_flow_imbalance with rising price confirms bullish momentum — more volume is committing to the long side. Rising price with falling trade_flow_imbalance suggests the rally is losing conviction — fewer aggressive buyers are supporting it.
YAML Definition
name: trade_flow_imbalance
description: 'Trade flow imbalance: buy_volume - sell_volume - net aggressive demand
pressure'
category: order_flow
version: v0.9.0 (Beta)
dimension: signal
status: Pre-release
required_inputs:
- buy_volume
- sell_volume
output_column: trade_flow_imbalance
output_description: Net aggressive trading pressure (buy volume minus sell volume)
parameters: {}
formula: buy_volume - sell_volume