add detectors ← · ⚙ to configure · select 2+ & group to nest
RDI — basic training
The RDI takes a fixed book and shows what a regime detector's exposure
overlay would have done to it. You shape the overlay with three levers — the score
itself, where you cut it into states, and how hard you de-risk per state — and watch the
counterfactual equity curve respond.
The pipeline
A detector scores the universe; thresholds turn the score into a state;
a policy turns the state into gross exposure; that gross re-sizes the book's raw path into a
counterfactual NAV. The three teal boxes are the levers you
control — the detector's own dimensions, the thresholds, and the policy.
Anatomy of a regime
Real turbulence stress through 2019–2020. Your two cut lines
(degraded 0.50, bad 0.80) split the continuous score into good / degraded / bad bands; the policy
then maps those states to the gross step below. Move a cut line and the bands — and the gross —
move with it.
Lever 1 · The score itself (detector ⚙)
Before you threshold anything, you shape the score. Every detector computes its continuous score
from its own dimensions — a look-back above all (how much history the stress / breadth /
drawdown integrates), plus its baked thresholds and quantiles. Checking a detector auto-reveals
these params inline (the ⚙ gear toggles them); editing one re-runs the detector and reshapes
the raw score live. The look-back is a real, connected, tunable dimension — not a hidden constant.
The percentile view has its own look-back too: the Pct window, next to Scale, sets the
history the rank is measured against.
Worked example · sweeping the look-back
Drawdown detector, its own baked state, default policy, sweeping only the
look-back. A short 126-day window fires bad 5% of days and lands at 33×; a 504-day window
fires 8% and reacts more slowly at 30× — different scores, different counterfactuals, before a
single threshold is touched. Milder than the threshold or policy here, but it is the very score
you go on to cut.
Lever 2 · Thresholds — a regime from the score (signal → state)
Tick author a regime from a score, choose a source detector, pick raw or
percentile and a polarity (high = bad for stress, high = good for quality), then set
your own degraded and bad cutoffs. The state is derived from your cuts, not
the detector's baked logic, and the authored regime leads the score panel (its cut lines and bands
are drawn there). It re-queries as you edit.
Worked example · sweeping the threshold
Same book, turbulence stress, degraded fixed at 0.50, sweeping the
bad cutoff. A looser cut (bad≥0.60) fires 72% of days and de-risks the book down to 6×;
a tighter cut (bad≥0.90) fires 15% and lands at 20×; holding through returns 66×. In a bull market
more de-risking costs compounding — so read the underwater drawdown alongside CF, never CF
alone.
Lever 3 · Policy (state → gross)
The Policy control sets the gross held in each state (default good 1.0 · degraded 0.65 ·
bad 0.15). It decides how hard a bad call actually bites. Editing it moves the gross step
and every counterfactual instantly.
Worked example · tuning the policy
Same fixed cuts (0.50 / 0.80), sweeping only the bad gross. Cutting
to 15% in bad lands at 14×; a gentle 50% at 20×; staying fully invested in bad at 31×. The policy
is as powerful as the threshold — tune all three levers.
How to run an experiment
Pick a book (the equity curve to improve) and a benchmark.
Check one or more detectors — their params reveal inline; set the look-back and
watch the raw score reshape.
Author a threshold regime from the score whose shape you like, and set your cuts.
Sweep — look-back, then cutoffs, then policy — watching the counterfactual NAV and
the underwater drawdown; you want less drawdown without giving back too much compounding.
Compose two good signals with an operator, then re-check on other books and
episodes.
Guardrail: judge a setting by improvement that holds across books and episodes
at a sensible firing rate. One best-looking curve on one book is the overfitting trap.
Panels
Cumulative equity & drawdown
Book vs benchmark (log growth-of-1) over a 0-to-max
underwater drawdown. Your starting point.
Detector continuous score
The signal. Channel (stress / quality / confidence / any
block) and raw vs percentile. Threshold guides + state bands from the leading regime.
What it would have done to exposure
Top: the gross step. Bottom: each counterfactual
NAV vs the raw hold-through baseline.
Rolling statistic
Rolling correlation between two channels (or a detector vs book
drawdown), over the Corr window — a display stat, not a model dimension.
Controls
Book / Benchmark
Typeahead book (filter by name or run-date); bench = equal_weight,
the book's own benchmark, or any ticker.
Detectors + ⚙
Multi-select; checking a detector auto-reveals its numeric params —
the score's own dimensions (lookback, thresholds…) — and edits live-re-query (Lever 1).
Composite
Nest the checked detectors under a combination (worst_of, best_of, …).
Threshold regime
Lever 2 — author a state from a score's own cutoffs.
Policy
Lever 3 — the good/degraded/bad gross levels.
Channel / Scale / Pct window
Which signal; raw vs percentile; and the look-back the
percentile rank is measured over (default 252d, tunable — not a buried constant).
Corr window / Episode
Display-only window for the rolling-correlation panel (touches no
detector or state); jump to GFC / COVID / 2022 / Aug-2015.
Glossary
raw / hold-through
The book at gross=1 — the counterfactual baseline.
gross
Fraction in equities (1.0 fully invested, 0.15 = 85% defensive).
counterfactual NAV
Raw path re-sized by the detector's gross; first-order, de-risked
capital earns ≈0.
state bands
good (none) / degraded (amber) / bad (red) behind the score.
look-back
How much history a score integrates — the primary dimension of most
detectors (⚙), and separately the Pct window for percentile.
percentile
Rolling rank of the raw score over the Pct window (default 252d, tunable), 0–1.
block signals
A detector's internal sub-signals (e.g. turbulence vol_score).
Caveats
The detector is a universe-derived market-regime overlay, not the book's own holdings.
The counterfactual is first-order and parks de-risked capital in cash (≈0); it
understates crisis protection where the real book used TLT/GLD.
Each book covers only its own run window — many start ~2010 (no GFC).
The raw path is reconstructed from the run; noisy on the rare very-low-gross day.