Rolling Average Trade Size
Quick Reference
| Property | Value |
|---|---|
| Dimension | quality |
| Category | order_flow |
| Version | v1.0 |
| Output Column | avg_trade_size |
Rolling average of individual trade sizes 鈥?measures typical trade magnitude
Formula
rolling_mean(size, window)
CDM Inputs
| Column | CDM Table | Description |
|---|---|---|
size | cdm_trade_enriched | Trade data enriched with bar context 鈥?price, volume, side, trade type |
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
window | integer | 60000 | Window for rolling average |
Output
Column: avg_trade_size
Rolling mean of trade sizes
Market Intuition & Trading Rationale
Rolling average trade size measures typical trade magnitude: rolling_mean(size, window). A rising average trade size means larger orders are dominating 鈥?institutions, algorithms executing parent orders, or informed traders. A falling average trade size means the market is fragmenting into smaller trades 鈥?retail activity, algo slicing, or low-conviction flow.
Average trade size is a useful complement to trade_intensity. High intensity + small average size = many small trades (algo execution, retail). Low intensity + large average size = few large trades (institutional block trading). High intensity + large average size = broad institutional participation (most informative regime for directional signals).
Usage Cases
- Flow composition analysis: Rising avg_trade_size 鈫?institutional flow dominating. Falling avg_trade_size 鈫?retail/algo flow dominating. Adjust strategy accordingly 鈥?institutional flow is more informative for direction; retail flow is noisier.
- Execution algo parameterization: When avg_trade_size is large, your orders can be larger without standing out. When avg_trade_size is small, large orders will be conspicuous 鈥?slice more aggressively.
- quality context: Used in
large_trade_pressurepack 鈥?avg_trade_size provides the baseline against which size_threshold for large trades is calibrated.
YAML Definition
name: rolling_average_trade_size
description: Rolling average of individual trade sizes 鈥?measures typical trade magnitude
category: order_flow
dimension: quality
version: v0.9.0 (Beta)
required_inputs:
- size
output_column: avg_trade_size
output_description: Rolling mean of trade sizes
tags:
- quality
- volume
parameters:
window:
type: integer
description: Window for rolling average
required: false
default: 60000
formula: rolling_mean(size, window)