CPI Gate Regime v3.1 (SMA)CPI Gate Regime v3.1 (SMA)
A daily trend + macro-regime dashboard built for trading TQQQ, using QQQ as the regime instrument. The trend signal runs on the TQQQ chart you apply it to; the bear-market classifier deliberately measures the underlying index (QQQ), because the index defines the market regime while the leveraged ETF is only the vehicle.
What chart to use it on
Apply it to the TQQQ daily chart (or another QQQ-tracking vehicle you trade). The moving-average signal computes on the chart symbol — on TQQQ, the lines are TQQQ's own 200-day and 20-day SMAs. The bear latch, however, always reads QQQ's drawdown, regardless of chart symbol. This is intentional: a −15% drawdown in QQQ corresponds to roughly a −40% move in TQQQ, and measuring the regime on the noisier 3x series would latch it on ordinary corrections. Index for the regime, leveraged ETF for the trade.
The idea
Not all bear markets are the same shape. Fast crashes in low-inflation environments (2018, 2020) tend to V-bottom, and a fast re-entry catches the recovery early. Grinding bears in high-inflation environments (2000–02, 2022) chop down for months, and the same fast re-entry buys every failed rally. The differentiator used here: when CPI is above ~3%, the central bank is constrained (cutting into hot inflation is hard), so declines are more likely to grind. When CPI is below 3%, policy support is available and declines are more likely to snap back.
Trend signal (two-speed, on the chart symbol — TQQQ)
200-day and 20-day simple moving averages of the daily close, computed on daily bars regardless of chart timeframe. Lines plot green when the close is above them, red when below.
The rule: LONG when the close is above the 200-day SMA, or (below it) above the 20-day SMA; FLAT only below both. Above the 200-day the position is locked long and the 20-day is ignored — the fast line only becomes active below the 200, where it serves as the early re-entry during a recovery.
In a latched GRIND bear (see below), the 20-day re-entry is disabled entirely — only a full 200-day reclaim signals a buy.
Signals on the chart
Exactly two marker types, printed only when the complete system flips: a green BUY label below the bar, a red SELL label above it. No markers on ordinary 20-day crosses (they don't change the position above the 200-day), and no markers on 20-day re-entries during a grind bear (the system refuses those trades). What you see marked is what the rule set actually does. Signals form on the daily close; execution is assumed at the next open.
The latched bear regime (the "CPI gate", on QQQ)
A bear LATCHES when QQQ closes 15% or more below its trailing 2-year high.
At that moment — once — the classifier checks CPI YoY: above the gate (default 3%) = GRIND, below = SNAP.
Latched means latched: the mode does not flip-flop with daily data. One-way upgrade only: SNAP can become GRIND if CPI heats up mid-bear, never the reverse.
The latch releases when QQQ recovers to within 5% of its 2-year high.
Effect on signals: GRIND kills the fast re-entry (200-day reclaim only); SNAP keeps the normal two-speed.
Dashboard (early warnings, top right)
CPI YoY vs the gate (ECONOMICS:USIRYY)
FINRA margin debt YoY — manual input; elevated / blow-off thresholds
High-yield credit spread (FRED:BAMLH0A0HYM2) — waking / stress thresholds
QQQ drawdown from its 2-year peak — heads-up at −10%, trigger at −15%
Regime label escalates: CALM → FRAGILITY BUILDING (hot CPI + elevated margin) → STRESS IGNITING (credit spreads waking) → BEAR: SNAP or GRIND (latched)
Only the −15% / CPI latch changes the signals; the other rows are context so a latch never arrives as a surprise.
Inputs
All thresholds are configurable: SMA lengths, CPI gate %, margin elevated/blow-off %, HY spread waking/stress (bps), drawdown heads-up/trigger %, and the CPI / HY spread symbols. Margin debt YoY is entered manually (FINRA publishes monthly).
Notes
Designed on daily bars; on intraday charts the signal stays locked to daily data. The bear-latch state on historical bars is computed from the chart's loaded history, so labels at the far left edge of a short history may differ from a fully loaded chart; current-bar state is unaffected. For educational purposes — this is a regime framework, not financial advice. Test any rule set yourself before trading it.
v3.1 — markers now show only full-system BUY/SELL signals (including the grind-bear gate); removed the 20-day cross dots and 200-day flip triangles.
インジケーター



