add market-regime guard (SPY trend) — inform + warn
Deploy / lint (push) Successful in 6s
Deploy / test (push) Successful in 36s
Deploy / deploy (push) Successful in 25s

New market_regime_service computes a benchmark (SPY) trend from its 50/200-day
SMAs, cached in a SystemSetting and refreshed by a nightly job; GET /market/regime
exposes it. Dashboard shows a regime banner; setup cards flag a counter-trend
caution when a setup fights the regime (LONG in a bearish market / SHORT in a
bullish one). Informational only — nothing is suppressed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-15 12:34:07 +02:00
parent 1951531453
commit c4f2673799
14 changed files with 354 additions and 6 deletions
+2
View File
@@ -483,6 +483,7 @@ VALID_JOB_NAMES = {
"ticker_universe_sync",
"outcome_evaluator",
"alerts",
"market_regime",
}
JOB_LABELS = {
@@ -493,6 +494,7 @@ JOB_LABELS = {
"ticker_universe_sync": "Ticker Universe Sync",
"outcome_evaluator": "Outcome Evaluator",
"alerts": "Alerts Dispatcher",
"market_regime": "Market Regime",
}