What is BOCPD?
Bayesian Online Change-Point Detection (Adams & MacKay, 2007) estimates online — i.e. causally, using only data up to now — the distribution of the run length: how many bars ago the statistical regime (mean/variance of returns) last changed.
At its core: a recursive Bayesian update over the run-length probability, with a constant hazard rate (expected frequency of breaks) and a conjugate prior (Normal-Inverse-Gamma → Student-t predictive).
From this, two features: - p_short = P(run_length < k) — an indicator of a fresh change point. - e_runlen = E[run_length] — a measure of system stability.
What Botty found with it
ML experiment (PROMOTED, 2026-05-19): p_short has IC +0.16 against forward 4h volatility, positive in 21/21 walk-forward windows; bars in the fresh-change-point regime show +27% higher forward volatility. Important: BOCPD predicts when a break happens — not in which direction.
How Botty uses BOCPD
- Live:
ml/forecast/bocpd_live.py, precomputedata/bocpd_data.py. - Filter
bocpd_filter(strategies/conditions/filters.py): blocks entries whenp_shortis abovebocpd_max_p_short(default 0.3). The edge is mean-reversion-specific: it helpsbb_extreme(+17%), hurts Donchian (−15%) → enabled only in the bb_extreme pool.
Related
- VRP and Hurst-Exponent — related vol/regime indicators; the full landscape in Detecting & predicting market regimes: ADX/DMI is only one lens among many.