Skip to content

feat(regime): drawdown-leg predictor-veto clamp (PR 3, gated default-off)#178

Merged
cipher813 merged 1 commit into
mainfrom
feat/drawdown-regime-veto
May 19, 2026
Merged

feat(regime): drawdown-leg predictor-veto clamp (PR 3, gated default-off)#178
cipher813 merged 1 commit into
mainfrom
feat/drawdown-regime-veto

Conversation

@cipher813
Copy link
Copy Markdown
Owner

What

PR 3 of the drawdown-regime arc — the first consumer (predictor-side veto clamp). Gated drawdown_regime_enabled (S3 predictor_params, default False) → zero behavior change on merge. Builds on #176 + #177 (merged). Plan: regime-drawdown-hysteresis-260518.md; ROADMAP alpha-engine-config #230 (P1).

Changes (inference/stages/write_output.py)

  • get_veto_threshold takes a new drawdown_effective_regime arg. When drawdown_regime_enabled=True and the composed daily drawdown effective regime (ctx.drawdown_effective_regime, stamped by PR 2's daily stage) is protective: bear → the same bear floor as forced-bear (base − cap); caution → a milder floor (base − cap/2), mirroring the discrete −0.20/−0.10 relationship.
  • Refactored the clamp tail from the forced-bear early-return into a single most-protective accumulator (min over {Wire-4/discrete, forced-bear, drawdown}) so no clamp is half-honored. Behavior-preserving for every currently-reachable state — with the drawdown flag off (always, today) the return is identical to before; covered by the existing forced-bear/Wire-4 tests plus a new explicit all-off regression test.
  • Flag off ⇒ parallel-observe: the would-be clamp is logged for the promotion gate without changing the threshold.
  • Call site passes getattr(ctx, "drawdown_effective_regime", None).

Tests

tests/test_veto_threshold.py → new TestDrawdownVetoClamp (+7): flag-off observe-only, bear/caution floors, benign-regime no-clamp, most-protective vs an existing (bull-raised) threshold, composition with forced-bear (min wins), all-off regression. 361 tests pass (-k "veto or write_output or regime or drawdown or daily_predict"), zero failures — the accumulation refactor breaks no existing forced-bear/Wire-4 behavior.

Arc status

#176 ✅ · #177 ✅ · #this (predictor-veto consumer) · next: executor signal_reader posture override (alpha-engine repo, same gate) · then research brief / dashboard panel / config EXPERIMENTS gate.

🤖 Generated with Claude Code

…off)

PR 3 of the drawdown-regime arc — first consumer. Mirrors the Stage-F
forced-bear veto clamp. Gated `drawdown_regime_enabled` (S3
predictor_params, default False) → zero behavior change on merge.
Plan: regime-drawdown-hysteresis-260518.md; ROADMAP config #230.

- get_veto_threshold: new drawdown_effective_regime param. When
  drawdown_regime_enabled AND the composed daily drawdown effective
  regime (ctx.drawdown_effective_regime, stamped by PR 2's daily stage)
  is protective, clamp the veto threshold — bear → the same bear floor
  as forced-bear (base-cap); caution → a milder floor (base-cap/2),
  mirroring the discrete -0.20/-0.10 relationship.
- Refactored the clamp tail from the forced-bear early-return into a
  single most-protective accumulator (min over {Wire4/discrete,
  forced-bear, drawdown}). Behavior-preserving for every
  currently-reachable state: with the drawdown flag off (always, today)
  the return is identical to before; verified by the existing
  forced-bear/Wire-4 tests + a new all-off regression test.
- Flag off ⇒ parallel-observe: the would-be clamp is logged (for the
  promotion gate) without changing the threshold.
- call site passes ctx.drawdown_effective_regime (getattr default None).
- tests: +7 (TestDrawdownVetoClamp) — flag-off observe-only, bear/
  caution floors, benign no-clamp, most-protective vs existing
  threshold, composition with forced-bear, all-off regression.

361 veto/write_output/regime/daily_predict tests pass, zero failures.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@cipher813 cipher813 merged commit bc3f4b4 into main May 19, 2026
1 check passed
@cipher813 cipher813 deleted the feat/drawdown-regime-veto branch May 19, 2026 02:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant