add market-regime guard (SPY trend) — inform + warn
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:
@@ -83,6 +83,7 @@ from app.routers.sentiment import router as sentiment_router
|
||||
from app.routers.sr_levels import router as sr_levels_router
|
||||
from app.routers.tickers import router as tickers_router
|
||||
from app.routers.jobs import router as jobs_router
|
||||
from app.routers.market import router as market_router
|
||||
|
||||
|
||||
def _configure_logging() -> None:
|
||||
@@ -160,3 +161,4 @@ app.include_router(scores_router, prefix="/api/v1")
|
||||
app.include_router(trades_router, prefix="/api/v1")
|
||||
app.include_router(watchlist_router, prefix="/api/v1")
|
||||
app.include_router(jobs_router, prefix="/api/v1")
|
||||
app.include_router(market_router, prefix="/api/v1")
|
||||
|
||||
Reference in New Issue
Block a user