Skip to content
All library documents

Bayesian Online Change-Point Detection for Regime Monitoring and Risk Control

Article MQL5 articles

Summary

The article explains Bayesian Online Change-Point Detection (BOCPD), an online method that updates each bar using only current and past observations. It maintains a probability distribution over run length, the time since the latest regime break, and uses the probability mass at run length zero as a probabilistic change signal. A constant hazard sets the prior frequency of regime changes. The model assumes observations within a regime follow a Gaussian distribution with unknown mean and variance, updated through a Normal-Gamma prior and Student-t predictive density. The implementation uses log probabilities and caps the tracked run length to control numerical and computational growth.

The author presents three uses: a chart-side regime monitor, a moving average that resets after detected breaks, and a risk overlay that temporarily reduces exposure after a break. The text reports that a random-timed control with matched frequency helps distinguish the risk overlay’s timing effect from exposure reduction alone. These examples are presented as demonstrations, not broad evidence of trading profitability. Results depend on model assumptions and hazard settings; richer observation models and multivariate detection are left for future work.

Key ideas

  • BOCPD estimates the probability that a regime has just ended from data available up to the current bar.
  • The method tracks a posterior distribution over the number of observations since the last change-point.
  • A constant hazard controls the prior expected duration of a regime and affects detector sensitivity.
  • A Gaussian observation model with unknown mean and variance yields a Student-t predictive distribution.
  • The change signal can drive monitoring, adaptive indicators, or temporary reductions in strategy risk.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.