Regimes in the Order Flow: Duration-Aware and Multivariate Bayesian Online Changepoint Detection for High-Frequency Markets

By Ramzi Jebali

Rating

1763
Battle Count: 83

Relevance

8/10
Highly relevant to quantitative trading. The paper directly addresses regime detection in high-frequency order flow, which is fundamental to execution algorithms, market making, and risk management. The finding that duration-aware (log-normal) hazard rates improve over constant-hazard BOCPD has direct practical implications for trading systems that need to adapt to changing market conditions. The negative result on multivariate BOCPDMS is also practically important, warning against over-engineering multivariate regime models for heavy-tailed order flow. The work builds on Tsaknaki et al. (2025) which showed regime information improves order flow and market impact prediction.

Implementation Complexity

7/10
The baseline BOCPD is relatively straightforward with conjugate Gaussian updates. The duration-aware HSMM extension requires careful derivation of hazard functions from explicit duration laws and dimensionality reduction from 3D to 2D inference. The multivariate BOCPDMS with BVAR and online hyperparameter learning via gradient ascent on Student-t densities is significantly more complex, requiring matrix operations, sufficient statistics tracking for each run length, and careful handling of positive-definiteness constraints. The paper notes computational challenges requiring numba compilation and parallelization for practical runtimes on real data. The changepoint detection heuristic and data standardization add further implementation subtleties.

Reproducibility

3/5
The paper provides detailed mathematical derivations, algorithm pseudocode, and implementation notes. However, the high-frequency data from LOBSTER is restricted to subscribing institutions and not publicly available. The algorithms are re-implemented by the author (not the original authors' code), and while the reference implementations of Adams-MacKay, Agudelo-España et al., and Knoblauch-Damoulas are cited, no GitHub repository is provided for the author's own implementations. Synthetic data experiments are fully reproducible given the described generative processes. The paper notes an inconsistency in the reference implementation of Knoblauch and Damoulas (2018) regarding the shape convention for the Inverse-Gamma posterior.

About this paper

Methodology: Bayesian Online Changepoint Detection with Duration-Aware and Multivariate Extensions. Problem types: Time Series Forecasting, Anomaly Detection, Online Learning, Clustering, Density Estimation, Risk Management.

The interactive Everscope explorer (charts, battles, favorites) loads below.