docs: carry the risk-monitor wording through docs, comments and logs
Follows 5ea0785, which renamed the user-visible labels. This finishes the pass
so code, docs and operator output use one vocabulary: README (pipeline list,
route table, FRED row), the methodology doc title, .env.example and config
comments, the snapshot model / event-study / service / test docstrings, the
scheduler section headers and morning-pipeline docstring, the TopBar status
text ("bullish regime" -> "bullish trend"), and the four "Regime monitor:" log
prefixes.
Deliberately NOT changed, because "market regime" is also a standard finance
term and most occurrences are not this job: the backtest caveat "~6 months is
roughly one market regime" in backtest_service, README, BacktestPanel and every
generated reports/*.json; "a regime shift" in TrackRecordPanel; and the
capacity-bracket findings doc. Renaming those would have made the text wrong.
Also unchanged, being persisted or externally linked rather than wording: the
regime_monitor / market_regime job ids, the regime_quadrant_enabled setting key,
the /regime route, METHODOLOGY and the snapshot fields, the service/test module
filenames, and docs/research/regime-monitor-v3.md's path (referenced from commit
messages). The doc now carries a one-line note recording the old name and why
those identifiers still use it.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
"""Compact chronological validation for the Regime Monitor warning score.
|
||||
"""Compact chronological validation for the AI/Tech Risk Monitor warning score.
|
||||
|
||||
The study calls its outcome a 10% correction, uses the first 70% of sessions to
|
||||
freeze an 80th-percentile warning threshold, and reports alarm episodes only on
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"""AI/Tech Regime Monitor v3.
|
||||
"""AI/Tech Risk Monitor v3.
|
||||
|
||||
The monitor is a risk thermometer, not a probability or trading rule. It keeps
|
||||
two deliberately separate outputs:
|
||||
@@ -918,7 +918,7 @@ async def _fetch_prices(config: dict, start: date, end: date) -> dict[str, Serie
|
||||
bars = await provider.fetch_ohlcv(symbol, start, end)
|
||||
out[symbol] = sorted(((b.date, float(b.close)) for b in bars), key=lambda item: item[0])
|
||||
except Exception as exc:
|
||||
logger.warning("Regime monitor: price fetch failed for %s: %s", symbol, exc)
|
||||
logger.warning("Risk monitor: price fetch failed for %s: %s", symbol, exc)
|
||||
return out
|
||||
|
||||
|
||||
@@ -941,7 +941,7 @@ async def _fetch_fred_series(series_id: str, start: date, end: date) -> Series |
|
||||
response.raise_for_status()
|
||||
payload = response.json()
|
||||
except Exception as exc:
|
||||
logger.warning("Regime monitor: FRED fetch failed for %s: %s", series_id, exc)
|
||||
logger.warning("Risk monitor: FRED fetch failed for %s: %s", series_id, exc)
|
||||
return None
|
||||
|
||||
out: Series = []
|
||||
@@ -1026,7 +1026,7 @@ async def update_regime_monitor(
|
||||
try:
|
||||
overrides = await refresh_fundamental_overrides(db, config=config)
|
||||
except Exception as exc:
|
||||
logger.warning("Regime monitor: fundamentals refresh skipped: %s", exc)
|
||||
logger.warning("Risk monitor: fundamentals refresh skipped: %s", exc)
|
||||
|
||||
end = date.today()
|
||||
prices = await _fetch_prices(config, end - timedelta(days=1200), end)
|
||||
@@ -1050,7 +1050,7 @@ async def update_regime_monitor(
|
||||
)
|
||||
divergence = breadth_service.compute_divergence_series(breadth, leader_series)
|
||||
except Exception as exc:
|
||||
logger.warning("Regime monitor: fixed-basket breadth skipped: %s", exc)
|
||||
logger.warning("Risk monitor: fixed-basket breadth skipped: %s", exc)
|
||||
breadth, breadth_counts, divergence = {}, {}, {}
|
||||
|
||||
latest_snapshot = await _latest_snapshot_row(db)
|
||||
|
||||
Reference in New Issue
Block a user