gendesign/backend/tests/services/forecasting
Light1YT 6a79b99c29 feat(forecasting): monthly macro series + key-rate regime classifier (#951b)
New backend/app/services/forecasting package (Site Finder v2 EPIC 7, §9.5/§9.6
foundation). Deterministic, no LLM. MonthlyMacro dataclass + get_monthly_macro
(daily key_rate resampled to monthly last-known-value via SQL DISTINCT ON, reuses
macro.get_macro_series for the already-monthly sverdl mortgage series, carry-forward
key_rate over a continuous month grid, graceful on empty/DB error). Pure helpers:
classify_regime (down/up/stable, eps 0.25pp), macro_at_lag (0/1/2/3/6),
is_confounded_window (COVID 2020-03, geopolitics 2022-02, subsidy cutback 2024-07).
51 unit tests, no live DB. psycopg v3 CAST(:x AS type) throughout.
2026-06-03 10:37:24 +05:00
..
__init__.py feat(forecasting): monthly macro series + key-rate regime classifier (#951b) 2026-06-03 10:37:24 +05:00
test_macro_series.py feat(forecasting): monthly macro series + key-rate regime classifier (#951b) 2026-06-03 10:37:24 +05:00