Order Flow Trend Persistence
Quick Reference
| Property | Value |
|---|---|
| Dimension | signal |
| Category | momentum |
| Version | v0.9.0 (Beta) |
| Output Column | flow_persistence |
Order flow trend persistence: autocorr(ofi, window) - measures whether directional order flow persists over time
Formula
rolling_corr(ofi, ofi, window)
CDM Inputs
| Column | CDM Table | Description |
|---|---|---|
ofi | cdm_* | CDM source table |
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
window | integer [5, 1000] | 100 | Rolling window for autocorrelation calculation |
Output
Column: flow_persistence
Autocorrelation of order flow imbalance (higher = more persistent flow)
Market Intuition & Trading Rationale
Order flow trend persistence measures the serial correlation of OFI: rolling_corr(ofi, ofi, window). It answers: is the current directional flow similar to recent flow, or is it flipping direction? High positive autocorrelation means flow is persistent — buying pressure today tends to be followed by buying pressure tomorrow. Low or negative autocorrelation means flow is mean-reverting — buying pressure today tends to reverse.
Persistent flow is the hallmark of informed trading. When an institution works a large order, they generate sustained directional OFI over minutes or hours — the flow doesn't randomly flip direction. Mean-reverting flow is the hallmark of noise trading and market making — flow oscillates around zero as liquidity providers absorb and offset each trade. This feature distinguishes between the two regimes.
The window parameter controls the timescale of persistence measurement. Short windows (20–50) capture microstructural persistence — is the current tick's flow direction similar to the last few ticks? Long windows (200–500) capture strategic persistence — is there a sustained buying or selling program active over minutes? Different trading strategies care about different timescales.
Usage Cases
- Informed vs noise flow classification: High persistence → informed flow (trade with the trend). Low persistence → noise flow (trade mean-reversion, fade extremes). This classification is more reliable than using OFI magnitude alone.
- Execution program detection: Sustained high persistence in one direction signals an institutional execution program. Join the trend early — the institution's remaining orders will provide continued directional pressure. Exit when persistence breaks down — the program is complete.
- Regime context for OFI signals: When persistence is high, OFI signals are more reliable — trade in the OFI direction. When persistence is low, OFI signals are less reliable — the flow direction will likely reverse, so take profits quickly or avoid trading OFI signals entirely.
YAML Definition
name: order_flow_trend_persistence
description: 'Order flow trend persistence: autocorr(ofi, window) - measures whether
directional order flow persists over time'
category: momentum
version: v0.9.0 (Beta)
dimension: signal
status: Pre-release
required_inputs:
- ofi
output_column: flow_persistence
output_description: Autocorrelation of order flow imbalance (higher = more persistent
flow)
parameters:
window:
type: integer
description: Rolling window for autocorrelation calculation
required: false
default: 100
constraints:
min: 5
max: 1000
formula: rolling_corr(ofi, ofi, window)