The Problem With Per-Position Stops in a Correlated Book
A multi-strategy paper account ran fine for weeks, then gave back almost everything in one market-wide selloff. The post-mortem was not subtle: every open position sank at the same time. Each strategy had its own stop, and every stop was individually reasonable. But stops are local instruments. They answer "is this position wrong?" They do not answer "is the book wrong right now?"
When correlation goes to one in a crash, per-position stops fire late and in sequence. By the time the last one triggers, the account has already eaten the full synchronized move. The failure mode is structural, not a tuning problem: N independent stops do not sum to one portfolio-level stop.
The fix we tested is a pool-level circuit breaker. Compute total unrealized PnL across all open positions. If it drops below a threshold, block every new entry until the drawdown recovers above a recovery line. Exits, stops, and take-profits keep working; only new risk is gated.
Designing the Breaker
Three parameters matter:
-
trigger_u: block entries whentotal_unrealized_pnl <= -trigger_u. -
recover_u: unblock whentotal_unrealized_pnl >= -recover_u. Setrecover_u < trigger_uso you get hysteresis and do not flap around the threshold. - Evaluation cadence: once per bar or tick, before the entry pipeline runs.
from dataclasses import dataclass
@dataclass
class PoolBreaker:
trigger_u: float = 8.0
recover_u: float = 3.0
blocked: bool = False
triggers: int = 0
def update(self, total_unrealized_pnl: float) -> bool:
"""Call once per bar before processing entries. Returns True if entries are allowed."""
if not self.blocked and total_unrealized_pnl <= -self.trigger_u:
self.blocked = True
self.triggers += 1
elif self.blocked and total_unrealized_pnl >= -self.recover_u:
self.blocked = False
return not self.blocked
Two implementation details that matter more than they look:
- Use unrealized PnL, not equity. Equity includes realized PnL and funding/fees, which muddies the signal. The breaker is about live exposure bleeding, so measure live exposure.
- Gate at the order router, not in each strategy. Strategies should not know the breaker exists. Put the check in one place where entries are submitted:
def submit_entry(order, breaker: PoolBreaker, pool):
if not breaker.update(pool.total_unrealized_pnl()):
return None # silently dropped, logged by the router
return broker.send(order)
Log every drop with the current pool PnL. That log is the dataset you will use to tune the threshold.
Choosing the Threshold: Counterfactual Backtests
Picking -8U because it feels right is how you end up writing another post-mortem. The threshold is a parameter, so scan it.
A counterfactual backtest replays the same historical signals and market data, changing only the risk control. That isolates the effect of the breaker from everything else. The critical requirement is determinism: same signal timestamps, same fill model, same fees. If your backtester is not deterministic, fix that first; otherwise the comparison is noise.
import pandas as pd
def run_backtest(signals: pd.DataFrame, prices: pd.DataFrame,
breaker_cfg: dict | None) -> dict:
breaker = PoolBreaker(**breaker_cfg) if breaker_cfg else None
pool = PaperPool()
equity_curve = []
for ts, row in prices.iterrows():
pool.mark_to_market(ts, row)
if breaker is not None:
allowed = breaker.update(pool.total_unrealized_pnl())
else:
allowed = True
for sig in signals_for(signals, ts):
if sig.is_entry and not allowed:
pool.log_drop(ts, sig, pool.total_unrealized_pnl())
continue
pool.apply(sig, row)
equity_curve.append((ts, pool.equity))
curve = pd.Series(dict(equity_curve))
return {
"final_pnl": curve.iloc[-1] - curve.iloc[0],
"max_dd_pct": max_drawdown_pct(curve),
"triggers": breaker.triggers if breaker else 0,
"curve": curve,
}
Then scan:
results = {}
results["no_breaker"] = run_backtest(signals, prices, None)
for t in (6, 8, 10, 12):
results[f"breaker_{t}u"] = run_backtest(
signals, prices, {"trigger_u": t, "recover_u": t * 0.4}
)
summary = pd.DataFrame({
k: {"final_pnl": v["final_pnl"],
"max_dd_pct": v["max_dd_pct"],
"triggers": v["triggers"]}
for k, v in results.items()
}).T
print(summary)
What the Scan Showed
On this account's history, the difference was not marginal:
| Config | Final PnL | Max Drawdown |
|---|---|---|
| No breaker | -71.58U | 96.4% |
| Pool breaker | +46.91U | 20.4% |
The breaker did not just cut the tail; it flipped the sign of the result. That is worth being skeptical about, and we were. Three things explain it:
1. The loss distribution was fat-tailed and one-sided. Without the breaker, the account kept adding positions into a falling market. Each new entry was individually fine by strategy logic, but collectively they were doubling down on a correlated move. The breaker's main job was to stop adding to a losing book, not to exit existing positions.
2. The -71.58U was concentrated. A handful of sessions did most of the damage. Removing entries during those sessions removed the bulk of the loss without touching the winners much, because winners came from quieter regimes where the breaker never armed.
3. Max drawdown fell from 96.4% to 20.4%. This is the more trustworthy number. Final PnL can be lucky; drawdown reduction across a scan is a structural effect. If the breaker only improved final PnL but not drawdown, we would not have shipped it.
Reading the Threshold Scan
The scan across -6/-8/-10/-12U is where the real decision happens:
- -6U: triggers often, including in normal noise. You lose good entries and the trigger count is high. Expect lower final PnL with a smoother curve.
- -8U: the sweet spot on this data. Triggers cluster in the deep-drawdown sessions; few false positives in normal regimes.
- -10U / -12U: too loose. The breaker arms late, after most of the damage is done, and the drawdown reduction largely disappears.
Do not pick the threshold with the best final PnL. Pick the one with the best drawdown-adjusted result and a trigger count you can explain. A breaker that fires 200 times in a year is a filter, not a circuit breaker. You can quantify this directly from the drop log:
def trigger_profile(drop_log: pd.DataFrame) -> pd.DataFrame:
"""drop_log: columns [ts, pool_pnl_at_drop, session_id]"""
return (
drop_log.groupby("session_id")
.agg(drops=("ts", "count"), worst_pnl=("pool_pnl_at_drop", "min"))
.sort_values("worst_pnl")
)
If most drops happen in sessions that also end deeply negative, the breaker is doing its job. If drops are spread evenly across PnL levels, your threshold is too tight.
Why Triggers Cluster in Deep-Drawdown Periods
This is the mechanism, and it is the reason the breaker works at all.
Pool unrealized PnL is a sum over correlated positions. In calm markets, positions are roughly independent: some up, some down, the sum stays near zero. In a selloff, correlation rises and the sum moves as one. So the breaker's trigger condition is rarely met in normal conditions and is met almost immediately when a broad move starts. The trigger distribution is bimodal by construction: near-zero in calm regimes, sharply negative in crashes.
That has two consequences:
- Low false-positive rate. You are not sacrificing many good entries, because in calm markets the pool PnL never approaches the threshold.
- Fast arming. The breaker arms at the start of the correlated move, when the book is still shallow. That is exactly when blocking new entries has the most value.
The failure mode to watch for is a strategy with genuinely uncorrelated, mean-reverting positions where a single loser can drag the pool PnL down while the rest of the book is healthy. In that case a pool-level breaker can block good entries because of one bad position. If you see that, either exclude that strategy from the pool PnL calculation or pair the breaker with a per-strategy cap.
How It Complements Basket-Level Stops
A basket-level stop closes positions when aggregate loss exceeds a limit. The breaker does something different: it stops new risk while leaving existing risk management untouched.
They cover different failure modes:
- Basket stop: "the book is losing, get flat." It reduces exposure but also locks in losses and forces re-entry decisions.
- Pool breaker: "the book is losing, stop adding." It caps the damage from pyramiding into a correlated move without forcing exits.
In practice you want both, with the breaker triggering before the basket stop. The breaker's threshold should be tighter than the basket stop's, so entries are blocked first and the basket stop only fires if the existing book keeps deteriorating. This ordering is what prevents the "add, add, add, capitulate" pattern that produced the -71.58U result.
A minimal combined policy:
def risk_gate(pool, breaker: PoolBreaker, basket_stop_u: float):
pnl = pool.total_unrealized_pnl()
entries_allowed = breaker.update(pnl)
if pnl <= -basket_stop_u:
pool.close_all("basket_stop")
entries_allowed = False
return entries_allowed
Keep the two limits separate in config and in logs. When you review a bad session, you want to know which control fired and when.
Practical Notes
-
Recovery line matters. Without hysteresis (
recover_u == trigger_u), the breaker flaps and you get a burst of entries the moment PnL ticks above the line. Userecover_uaround 30-40% oftrigger_u. - Re-run the scan after regime changes. A threshold tuned on a low-volatility quarter will arm too late in a high-volatility one. Re-scan monthly, or scale the threshold by realized volatility of pool PnL.
- Counterfactual means same everything else. If you change the threshold and also change position sizing, you have learned nothing. One variable per run.
- Log drops, not just triggers. The drop log is the artifact that lets you defend the threshold choice later, and it is cheap to keep.
The breaker is a small amount of code. The value is in the counterfactual backtest that tells you where to set it, and in the discipline of keeping it a pure gate on new entries rather than a second, confused exit rule.
More notes like this ship every week on this site.
Top comments (0)