同向成交连续段能持续多久,成交方向多久翻转一次。
同向连续成交的游程长度、游程失衡度、方向翻转率,以及方向翻转时的价格变动。
2025年6月11日14:38至14:39(UTC)Binance BTC-USDT永续合约的全部11,692笔成交,数据取自免费的原始成交预览。
步骤 1
游程(run)指吃单方向相同的连续成交序列。该分钟共有 1,200 个游程,其中 600 个为吃单卖出, 600 个为吃单买入。
步骤 2
最长一轮为连续 339 笔吃单方卖出,始于 14:38:19.1。价格变动 -1.36 bps ,自首笔成交计至末笔成交。
步骤 3
步骤 4
Binance BTC-USDT永续合约,5分钟K线,2025年5月1日至31日,取自免费预览。
按换向率对K线分组,从换向最少到最多. 个基点。
按换向率排序,换向最少的10%K线价格变动中位数为8.37 bps,换向最多的10%为3.02 bps。在全部K线中,换向率与价格变动幅度的相关系数为-0.27。K线换向率的中位数为10.9%。
典型K线内最长的连续段为同方向连续342笔成交,5月全月最长的连续段达5,482笔。
连续段指同一方向上连续发生的一串成交。 buy_run_max_len and sell_run_max_len 为K线内最长的连续段, _mean_len 字段则为其平均值。
flip_rate 为方向与前一笔相反的成交占比。接近1时,买卖交替出现;数值较低则说明某一方在持续成交。
run_imbalance 对比买方与卖方连续段,取值范围为-1至1。 price_change_on_flip 为方向切换时的平均价格变动。
从零讲解,详见 从第一性原理理解市场(我们的互动课程):
Here's a microstructure concept that rarely gets discussed outside market-making desks: trade runs — consecutive sequences of same-direction trades. Their statistical properties reveal the hidden structure of order flow in ways that aggregate volume metrics completely miss.
Lillo & Farmer (2004) made a striking empirical discovery: order flow in equity markets exhibits long-range autocorrelation, with a Hurst exponent significantly above 0.5. Buys tend to follow buys, and sells follow sells, at horizons far longer than can be explained by individual order splitting. They attributed this to the herding behavior of institutional investors and the mechanical persistence of algorithmic execution.
Earlier, Hasbrouck (1991) showed that the autocorrelation structure of trade signs (buy/sell sequences) carries information about the permanent price impact of trades. Trades that cluster into runs tend to have higher permanent impact than isolated trades — because runs are the signature of informed order flow that the market hasn't yet fully absorbed.
Bouchaud et al. (2004) formalized this in their propagator model, showing that the long memory of order flow, combined with a power-law decay in individual trade impact, produces a market that is approximately efficient despite highly predictable order flow.
The flip rate is directly related to the Roll (1984) model of the bid-ask bounce: in a pure noise-trading world with constant spreads, every trade should alternate between bid and ask, producing a flip rate near 1.0 and negative first-order return autocorrelation exactly equal to the squared half-spread. Deviations from this benchmark — particularly low flip rates — indicate that something beyond the mechanical bid-ask bounce is driving the tape.
Run imbalance is particularly powerful: if buy runs average 8 trades but sell runs average 3, buyers are sustaining pressure longer. This asymmetry often precedes continued price movement — it's the microstructure expression of the order flow autocorrelation that Lillo & Farmer documented at daily horizons, compressed into intrabar timescales.
References:
# Install the Aperiodic CLI into ~/.local/bin
mkdir -p "$HOME/.local/bin"
curl -fsSL https://raw.githubusercontent.com/aperiodic-io/cli/main/install.sh | INSTALL_DIR="$HOME/.local/bin" bash
export PATH="$HOME/.local/bin:$PATH"
# Free preview — no API key required
aperiodic run_structure --preview \
--exchange binance-futures \
--symbol perpetual-BTC-USDT:USDT \
--interval 5m \
--timestamp exchange \
--start-date 2025-05-01 \
--end-date 2025-05-31 \
--output-dir ./data && echo "Saved to $PWD/data"所有交易所和永续合约,从1分钟到日线K线,均提供 Pro.
成交连续段结构 ,API文档中的说明:端点与参数 →