Practitioner synthesis. No detector can tell bad luck from broken alpha with certainty in real time, because at realistic Sharpe ratios the data simply do not contain enough information. What a good kill switch does is make the trade-off between whipsaw (stopping a healthy strategy) and inertia (running a dead one) explicit, calibrated and auditable, instead of leaving it to a committee in week six of a drawdown. Everything below runs on first-differenced, risk-normalized P&L. The simulation numbers come from a small study described in the text. They are illustrative, not a benchmark.

The problem: noise or decay?

A deployed strategy enters a drawdown. Two hypotheses are on the table. Under \(H_0\) the return-generating process is unchanged, and this is an expected excursion into the left tail. Under \(H_1\) the process has shifted to a regime with zero or negative mean, through crowding, a fee-schedule change, a venue upgrade that closed a latency gap, or a regime the edge never covered. The costs are asymmetric. A false positive crystallizes the drawdown and misses the recovery. A false negative keeps paying spread and impact into a negative-expectancy process.

The information limit. Distinguishing a daily Sharpe of \(SR_1\) from \(SR_0\) at roughly \(z\) standard errors takes about

$$ n \;\approx\; \left(\frac{z}{SR_1^{(d)} - SR_0^{(d)}}\right)^{2} \ \text{days}. $$

For a strategy whose annual Sharpe falls from 1.5 to 0, the daily difference is \(1.5/\sqrt{252} \approx 0.094\), and \(z = 2\) needs about 450 trading days. No algorithm gets around this for a pure change in the mean. Detectors become fast only when the break also changes something easier to see: volatility, tail shape, autocorrelation, or execution telemetry such as markouts and fill rates. The flip side matters as much. A healthy strategy with a daily Sharpe of 0.10 finishes 400 days under water about 2% of the time (\(400 \times 0.10 = 40\) against a standard deviation of 20). One of our simulated healthy paths did exactly that. Before trusting any rule, look at what healthy drawdowns look like with the equity-curve simulator, and check how much track record the claimed Sharpe needs with the minimum-track-record output of the deflated Sharpe calculator.

Why raw equity curves fail changepoint detectors

Cumulative P&L is an integrated process: \(\mathbb{E}[\mathrm{PnL}_t] = \mathrm{PnL}_0 + \mu t\) and \(\operatorname{Var}(\mathrm{PnL}_t) = \sigma^2 t\). Changepoint models assume piecewise-stationary segments. A random walk’s level drifts away from any fixed segment mean, so a detector fed the equity curve either flags “changes” constantly or, once its variance prior has absorbed the drift, never flags anything. The object to model is the step:

$$ x_t = \mathrm{PnL}_t - \mathrm{PnL}_{t-1}. $$

Two practical refinements matter as much as the differencing. Normalize by risk, not dollars. Divide by the gross exposure or the target volatility in force when the position was taken. Otherwise a capital increase, which raises dollar variance, looks exactly like a volatility regime change, and the detector fires on your own allocation decision. Feed net returns, not gross. The most common decay mode is costs rising underneath an unchanged signal (see the fee-wall section below). A detector fed gross returns is blind to it by construction.

BOCPD, written out

Adams and MacKay’s Bayesian online changepoint detection (2007) tracks the run length \(r_t\), the time since the last changepoint, through its posterior \(P(r_t \mid x_{1:t})\). With a predictive density \(\pi_t^{(r)} = P(x_t \mid r_{t-1}, x^{(r)})\) for each live run, the joint updates in two branches:

$$ \begin{aligned} P(r_t = r_{t-1} + 1,\, x_{1:t}) &= P(r_{t-1},\, x_{1:t-1})\; \pi_t^{(r)}\; \big(1 - H(r_{t-1})\big) && \text{(growth)}\\ P(r_t = 0,\, x_{1:t}) &= \sum_{r_{t-1}} P(r_{t-1},\, x_{1:t-1})\; \pi_t^{(r)}\; H(r_{t-1}) && \text{(changepoint)} \end{aligned} $$

followed by normalization over \(r_t\). With a constant hazard \(H(\tau) = 1/\lambda_{\text{gap}}\), the prior on regime length is geometric with mean \(\lambda_{\text{gap}}\). For a daily strategy, \(\lambda_{\text{gap}}\) between 250 and 1,000 days encodes “regimes last one to four years.”

The observation model. Returns within a regime are modelled as Gaussian with unknown mean and variance under a normal-inverse-gamma prior \((\mu_0, \kappa_0, \alpha_0, \beta_0)\). The sufficient statistics update in closed form for every run:

$$ \mu_{n+1} = \frac{\kappa_n \mu_n + x}{\kappa_n + 1}, \quad \kappa_{n+1} = \kappa_n + 1, \quad \alpha_{n+1} = \alpha_n + \tfrac12, \quad \beta_{n+1} = \beta_n + \frac{\kappa_n (x - \mu_n)^2}{2(\kappa_n + 1)}, $$

and the posterior predictive is Student-\(t\):

$$ \pi^{(r)}(x) = t_{2\alpha_n}\!\left(x \,\Big|\, \mu_n,\ \frac{\beta_n(\kappa_n + 1)}{\alpha_n \kappa_n}\right). $$

Work in log space, and prune run lengths whose posterior mass falls below about \(10^{-8}\), or keep only the top \(K\). That makes each update \(O(K)\) instead of \(O(t)\), with no visible change in output.

Caveat on the “Student-t” label. The \(t\) predictive comes from parameter uncertainty, not from fat tails in the data. As a run grows, \(\alpha_n\) grows, the predictive converges to a Gaussian, and a long healthy run becomes more fragile to a single tail event. In our simulation, one −6σ day inside a healthy regime collapsed \(\mathbb{E}[r_t]\) from about 210 to about 1. The detector called a regime change on a single outlier. Two fixes work. Robustify the inputs by winsorizing at a multiple of a trailing robust scale such as the median absolute deviation (a full-sample scale would be look-ahead). With winsorizing at 4× trailing MAD, the same day barely moved \(\mathbb{E}[r_t]\). Or use a genuinely heavy-tailed or divergence-robust likelihood (the β-divergence variants of BOCPD).

Priors. Set \(\mu_0\) from the deflated backtest mean, not the raw one, because the backtest mean is selected and therefore inflated (why). Set \(\alpha_0 > 2\) so the prior variance is finite, choose \(\beta_0\) to match the backtest variance of \(x_t\), and keep \(\kappa_0\) small so the mean prior counts as one or two observations. The detector then asks “is this still the strategy I validated?”, but only after the validation’s optimism has been taken out.

Expected run length, not the changepoint probability

Many implementations alarm on \(P(r_t = 0 \mid x_{1:t})\). With a constant hazard, that quantity equals \(H\) on every step. Divide the changepoint branch by the sum of both branches and \(\sum P(r_{t-1}, x_{1:t-1})\,\pi_t^{(r)}\) cancels. In our simulation it sat at 0.001 to fifteen decimal places for 600 days, through the break. The evidence for a break shows up one step later, as mass moving onto short run lengths \(r_t = 1, 2, \dots\). Even variants that score the new point under the prior turn \(P(r_t = 0)\) into a single-observation outlier test, which is the wrong question for fat-tailed returns.

The useful summary is the whole posterior. Its first moment,

$$ \mathbb{E}[r_t] = \sum_{r} r\; P(r_t = r \mid x_{1:t}), $$

collapses when mass moves from the long run to short ones, and it collapses for a sustained change rather than a single point. That makes it a natural continuous position scalar:

$$ w_t = \min\!\left(1,\ \frac{\mathbb{E}[r_t]}{r_{\min}}\right), $$

where \(r_{\min}\) is the regime age you need before trusting a regime with full size (60 days below). Continuous sizing beats a binary switch for the same reason volatility targeting beats on/off risk rules: errors cost a fraction of the position instead of all of it.

The flaw: \(\mathbb{E}[r_t]\) measures age, not quality. After a detected break, the new run starts aging, and \(w_t\) climbs back to 1 after \(r_{\min}\) days whether or not the new regime makes money. The run-length posterior says when the process changed. The posterior of the current run’s mean says whether you still want to own it. The scalar needs both:

$$ w_t = \min\!\left(1,\ \frac{\mathbb{E}[r_t]}{r_{\min}}\right) \cdot q_t, \qquad q_t = \operatorname{clip}\!\left(\frac{P(\mu > 0 \mid x_{1:t}) - 0.5}{0.3},\ 0,\ 1\right), $$

where \(P(\mu > 0 \mid x_{1:t})\) is mixed over run lengths using each run’s Student-\(t\) marginal for \(\mu\). A smoother alternative for \(q_t\) is the parameter-uncertainty Kelly shrinkage \(t^2/(1+t^2)\) on the current run’s \(t\)-statistic, the same haircut the Kelly fraction calculator applies to an edge estimated with error. Either way, a fresh regime has to earn its size back.

  flowchart LR
  A["Trade fills"] --> B["Mark-to-market P&L per interval"]
  B --> C["Stationary returns: difference, net of costs, divide by risk"]
  C --> R["Robustify: winsorize at k x trailing MAD"]
  R --> D["Student-t BOCPD posterior P(r_t | x_1:t)"]
  D --> E["Expected run length E[r_t]"]
  D --> Q["Current-regime quality P(mu > 0)"]
  E --> W["Position scalar w_t = min(1, E[r_t]/r_min) x q_t"]
  Q --> W
  C --> K["Conformal lower band on h-step P&L"]
  K --> W
  M["Execution telemetry: markouts, fill rates"] --> W
  W --> S["Sizing with rebalance bands"]
Simulated daily strategy P&L with a cliff-edge break at day 400 (Student-t noise, ν = 4)break: mean +0.10σ → −0.10σ, vol ×2Cumulative P&L (σ units)Expected run length E[rₜ] (days); P(rₜ = 0) equals the hazard H on every dayr_min = 603500Position scalar wₜ10day 0day 200day 400day 599age only: min(1, E[rₜ]/r_min)age × regime quality (posterior P(μ > 0))

Simulated, not a real strategy. Detector: NIG/Student-t BOCPD, H = 1/250, inputs winsorized at 4× a trailing MAD. On this path E[rₜ] falls from about 300 to 34 within 40 days of the break, then climbs again as the new (losing) regime ages, so the age-only scalar returns to full size. Across 60 simulated paths with these settings, the age-only scalar kept 99% of healthy exposure but avoided only 6% of post-break exposure. The quality-gated scalar kept 83% and avoided 79%.

Calibrating it: false alarms versus detection delay

The hazard, robustification and \(r_{\min}\) are the knobs. The only defensible way to set them is to simulate healthy paths and broken paths matched to your strategy’s moments and look at both error types. Statistical process control calls these the in-control and out-of-control average run lengths. We ran a small version: 600 days of Student-\(t\) (\(\nu = 4\)) daily returns at a daily Sharpe of 0.10 (about 1.6 annualized), with a break at day 400 to either a cliff (mean −0.10σ, volatility ×2) or a decay (mean −0.06σ, volatility unchanged). Detector: the NIG BOCPD above, \(r_{\min} = 60\), 60 paths per cell.

HazardInputAge-only scalar: healthy exposure keptAge-only: post-break exposure avoided (cliff)Gated scalar: healthy keptGated: avoided (cliff)Gated: avoided (decay)
1/250raw94%11%69%80%66%
1/250winsorized 4×MAD99%6%83%79%48%
1/1000raw96%8%78%77%51%
1/1000winsorized 4×MAD100%4%88%77%30%

Three conclusions hold across the table. The age-only scalar barely protects anything. It avoids 4–11% of post-break exposure, because the losing regime ages back to full size. The quality gate does the protecting. It catches 77–80% of cliff-edge exposure under every setting. The cost is healthy exposure: 12–31% of a good strategy’s sizing is lost to its own noise. Hazard and winsorization move you along a frontier and do not lift it. Sensitive settings catch gradual decay (66%) and pay for it in healthy exposure (69%). Robust settings keep 88% of healthy exposure and catch only 30% of the decay. Run as a binary alarm (kill when \(\mathbb{E}[r_t] < 60\)), the raw detector false-alarmed on 89–98% of healthy 500-day paths. Winsorizing at 4× and 3× trailing MAD with \(H = 1/1000\) brought that down to 33% and 11%, at the price of missing 18–30% of variance-expanding breaks and 65–87% of pure mean decays within 200 days. Which point on the frontier is right depends on how long your strategies usually stay healthy relative to how long a broken one would otherwise keep running. That ratio is a business fact you should estimate, not a statistical constant.

BOCPD is model-based. Two complementary tools make fewer assumptions and catch different failures.

Conformal-RANSAC. RANSAC estimates the equity curve’s drift from the largest consensus set. It repeatedly fits a line through a minimal random subset, counts the observations within \(\pm\delta\) of it, keeps the line with the most inliers, and refits on them. Its breakdown point is far above least squares, so a few windfall days cannot manufacture a positive slope, and the inlier ratio is itself a health statistic: the share of history consistent with the dominant drift. Pair it with split-conformal prediction to get a finite-sample lower band. Calibrate the residual quantile \(\hat q\) at level \(\lceil (n+1)(1-\alpha) \rceil / n\) on held-out data, and flag when realized P&L falls below the band. The guarantee \(P(Y < \hat y - \hat q) \le \alpha\) needs only exchangeability. That is the catch. Residuals of a line fitted to an equity curve’s level are not exchangeable. They are the residuals of a random walk, so they are strongly autocorrelated, and the nominal coverage does not hold. Apply the conformal step to \(h\)-step P&L increments instead: predict \(\mathrm{PnL}_{t+h} - \mathrm{PnL}_t \approx \hat\beta h\) using the robust slope, calibrate on past realized \(h\)-step increments (which are close to exchangeable within a regime), and use adaptive conformal inference to adjust \(\alpha_t\) online when coverage drifts. Recent work applies the same idea to regime-weighted conformal VaR control. A practical rule stacks two conditions: robust slope \(> 0\) and current P&L above the conformal lower band. Expect them to disagree during recoveries, when the slope is positive while P&L is still below the band, and decide in advance which one wins.

Robust PELT. Pruned Exact Linear Time segmentation minimizes \(\sum_{\text{segments}} \mathcal{C}(x_{\text{seg}}) + \beta_{\text{pen}} \cdot \#\text{changepoints}\) exactly, with a pruning rule that keeps it near-linear. Replacing squared error with Tukey’s biweight loss (fitted by iteratively reweighted least squares) stops outliers from creating spurious segments. PELT is an offline tool, and it should stay one. Re-running it on an expanding window can move past changepoints as new data arrive, so using it as a live switch reintroduces hindsight. Its real jobs are post-mortems (“when did this actually break?”) and calibrating the BOCPD hazard from the empirical segment lengths across your book. Pre-whiten or aggregate to weekly data first: trend strategies’ autocorrelated P&L over-segments, and mean-reversion strategies’ negative autocorrelation does the opposite. Related corpus work includes Bayesian decision rules that trade false alarms against delay, statistical jump models for regime-based de-risking, Bayesian change-point detection on order flow, and measures of strategy-decay risk.

The fee wall: what a kill switch costs and what it misses

Decay usually arrives as cost creep. Take a short-horizon strategy with a gross edge of 6 bps per trade and 4 bps of round-trip costs: 2 bps net. A competitor arrives and your conditional markouts worsen by 1.5 bps. Net edge falls to 0.5 bps, a 75% decline, while the signal’s directional accuracy and gross information coefficient stay exactly where they were. A monitor built on hit rate, IC or gross \(R^2\) never fires, because the signal never stopped predicting. The prediction just no longer pays for the trip across the spread. This is the same fee wall that order-flow signals and LOB imbalance run into, moving underneath a live strategy. Feed the detector net returns, and monitor the cost components (markouts, not P&L) as leading indicators. Markouts are measured per fill, so they reach statistical significance orders of magnitude faster than daily P&L does.

Whipsaw is a turnover cost. Every off-and-on cycle liquidates and rebuilds the book. At 5 bps per side on 100% gross, a cycle costs about 10 bps of capital before counting any missed recovery. Eight false cycles a year is 80 bps, a fifth of a strategy netting 4% a year. The continuous scalar with rebalance bands (trade only when \(w_t\) moves by more than about 0.2) removes most of this churn. Model the trade-off with the transaction-cost break-even calculator.

Inertia is a drift cost. A dead strategy running at an annual Sharpe of −0.5 and 10% volatility loses about 5% a year. A 150-day detection delay is about 3% of capital. Compare that with the whipsaw cost of the settings that would have caught it sooner. That comparison, not a significance threshold, is the decision.

Production failure modes

  • Equity curve in, nonsense out. Feeding levels instead of differences, or dollars instead of risk-normalized returns, makes the detector respond to the integration and to your own allocation changes.
  • Gross returns hide cost decay. The commonest death of a live strategy is invisible to a detector that never sees costs.
  • Outlier-triggered resets. One fat-tailed day zeroes a naive detector’s run length. Robustify with trailing statistics only.
  • Re-armed into a dead regime. Age-only scalars return to full size in a losing regime. Gate on regime quality.
  • Hindsight in the switch. Offline segmentation re-run live, full-sample winsorization scales, or priors fitted to the full live history all leak information from the future.
  • No state persistence. The run-length posterior is path state. Persist it, and log every update so that a switch-off decision can be reconstructed and audited.
  • The human override. A switch that can be overridden “just this once” is a suggestion. Decide the override policy before the first drawdown, in writing.

Questions to ask a paper (or backtest)

  1. Is the detector run on differenced, risk-normalized, net returns, or on an equity curve?
  2. What are the in-control false-alarm rate and the detection delay, measured on simulated healthy and broken paths matched to the strategy?
  3. Is the alarm \(P(r_t = 0)\), which is uninformative under a constant hazard, or a run-length summary?
  4. Does the sizing rule gate on the current regime’s quality, or only on regime age?
  5. Are robust scales, priors and conformal calibration sets strictly trailing?
  6. For conformal claims: on what object is exchangeability assumed, and is it plausible there?
  7. Was the switch evaluated on its costed effect (whipsaw turnover and delay drift), or only on classification accuracy?

Related reading in the corpus: hyperbolic alpha decay under crowding, drawdown control with a restart mechanism, and Bayesian ensemble breakpoint detection on energy prices. The method hubs are Bayesian methods and econometrics & time series. The topic hub is risk management. The trade-level counterpart to this essay is exit policy design and ensembling.


Run your numbers: equity-curve simulator → · deflated Sharpe & minimum track record → · Kelly fraction under uncertainty → · volatility-targeting simulator → · The foundations: regime dependence → · confidence intervals for strategy research → · the production checklist →

Sources and background: Adams and MacKay (2007) for BOCPD; Killick, Fearnhead and Eckley (2012) for PELT; Fearnhead and Rigaill (2019) for changepoints with outliers; Gibbs and Candès (2021) for adaptive conformal inference. Practitioner treatments that informed this synthesis are the switch-off series in Trading the Breaking (BOCPD, conformal-RANSAC and robust changepoint protocols). The simulation study is our own. Browse the flowchart library, the guides, and the tools.