Trading Bot HQModels & runsTestsResearchShadow paper

Declared scan: rhythm falsification (R4 — mentor layer, tested to retire)

Date declared: 2026-07-24, before any computation. Split: Research only (BTCUSD 2017-08-17 → 2022-12-31). Layer 3, Edge Lab. Purpose: falsification — the mentor's "rhythm" layer (markets alternate in tradeable streaks/pulses beyond volatility level) is tested with the explicit goal of retiring it if it shows nothing. Lineage if anything survives: mentor.

Conditions (feature-store streak columns; constants declared here)

Signed direction = continuation of the streak (a negative signed effect = reversal information; both readings are the same hypothesis, sign tells which).

  1. streak_up_ge5: consecutive up-M5-closes ≥ 5, direction +1 — 4 horizons
  2. streak_down_ge5: consecutive down-M5-closes ≥ 5, direction −1 — 4 horizons
  3. streak_up_ge8: ≥ 8 (dose response vs #1) — 4 horizons
  4. streak_down_ge8: ≥ 8 (dose vs #2) — 4 horizons

Horizons: 15, 30, 60, 240 min. Universe: valid M5 bars, ATR14 > 0, complete forward window. Nulls: full battery, engine defaults (shuffle meaningful here — per-event direction varies with streak side across the merged read; within each one-directional condition the frequency-matched and bootstrap nulls carry, as recorded in the level-reaction precedent). 4 conditions × 4 horizons = 16 hypotheses (cumulative 77 → 93 of 2,000 assuming R3 runs first).

Pre-declared falsification rule

The rhythm layer is retired (struck from the mentor model as an edge candidate, kept only as descriptive color) unless at least one condition shows: |signed effect| with block-bootstrap CI excluding zero AND monotone dose response (ge8 stronger than ge5, same sign) AND ≥4/6 year-blocks sign-stable. Anything weaker = logged and closed. Honest prior: streak studies on liquid crypto at M5 scale are a graveyard; expected outcome is retirement. This is written down so a marginal wiggle cannot be promoted to "rhythm is real" after the fact.

Results (filled 2026-07-24, single ledger-logged run; 16 hypotheses, cumulative 93/2000)

SURVIVED (not retired) per the pre-declared mechanical rule — but only in a narrow, asymmetric form. Full table in results/rhythm-btcusd.json; existing feature-store up_streak/down_streak columns used unchanged (verified to match "consecutive up/down M5 closes" — no reinterpretation, no new columns); 149 tests green.

Freshness reading, stated explicitly (not literal declaration text): counting each streak once, at the bar where it first reaches the threshold (up_streak == 5 / == 8, not >= 5 / >= 8), so the ge5 and ge8 event sets are disjoint per side — the only reading under which a 12-bar streak doesn't contribute 8 overlapping ge5 events, and the only reading that makes the declared ge5-vs-ge8 dose-response comparison well-posed (nested/overlapping event sets would let the same bars drive both conditions).

Condition n Signed mean ATR: 15m / 30m / 1h / 4h
streak_up_ge5 6,741 −0.073 / −0.045 / +0.039 / +0.096
streak_up_ge8 498 −0.054 / +0.077 / +0.340 / +0.603
streak_down_ge5 6,425 −0.061 / −0.022 / −0.067 / −0.138
streak_down_ge8 466 −0.062 / −0.049 / +0.035 / +0.174

Mechanical rule check ("retired unless at least one condition shows CI-excludes-zero AND monotone dose response (ge8 > ge5, same sign) AND ≥4/6 year-blocks sign-stable"):

By the rule as declared, this is a survival, not a retirement: the rhythm layer is not struck from the mentor model. But the surviving evidence is narrow — one side (up-streaks-of-≥8), two horizons (1h/4h), driven by a sample of 498 events, with the 4h year-by-year effect dominated by 2017 (+1.29) and 2018 (+1.51) against a much smaller 2019–2022 tail (+0.45/+0.16/+0.22/+0.24) — sign-stable everywhere but magnitude front-loaded in the earliest, thinnest-liquidity years. Down-streaks show no comparable effect at any horizon. This does not license "rhythm" as originally conceived (symmetric alternating pulses); it licenses, at most, a follow-up on extended (≥8-bar) up-streaks specifically, which any successor scan would need its own pre-registration to pursue.

Null-battery caveat on record (as declared): shuffle-p is degenerate (=1.000) for every cell — permuting an array of identical per-variant sign values is a no-op by construction, exactly the level-reaction precedent. The frequency-matched random null and block bootstrap carry the weight; the random null confirms streak_up_ge8 events are genuinely high-volatility (rand-p 0.007–0.028 at 1h/4h) but that is magnitude evidence, not direction — consistent with, not independent proof of, the signed finding.

Implementation note: the level-reaction script's per-variant constant-direction template (f"{expr}*0 + {sign}") silently breaks under normal operator precedence when expr is a comparison rather than a bare column name (up_streak == 5*0 + 1 parses as up_streak == (5*0 + 1), not (up_streak == 5)*0 + 1) — caught before the ledger-logged run via a sanity check that a constant-sign variant's signed_mean_atr should not be exactly 0.000000 at every horizon/year with a degenerate [0.0, 0.0] bootstrap CI; fixed with explicit parentheses in scripts/run_rhythm_scan.py. The unlogged pre-fix run was never appended to the ledger.

Consequence for the mentor branch: R4 (rhythm) is not retired but narrows sharply — survives only as an extended-up-streak continuation effect, asymmetric and thin-sampled. With R7 already closed (level-reaction null, 2026-07-23) this completes the R1–R7 mentor-layer ladder: every rung now has a registered verdict. The up-streak-≥8 survivor is the ladder's only live research lead; pursuing it (e.g. cross-instrument on ETH, or an execution-geometry test) requires its own pre-registration and must pass the TEMPLATE's ex-ante cost arithmetic first.