REOPENED — normalize.py was never created; only rate-regime discount existed. New backend/app/services/forecasting/normalize.py with normalize_demand(series): multiplicative month-of-year deseasonalization of the raw monthly demand SalesSeries (§9.4). Pure/deterministic; min-data guard (<2 full years / empty month / overall_mean<=0 → factor 1.0, no divide-by-zero, no thin-data noise). Exposes seasonal factors for explainability. Synthetic unit test: seasonality removed (month means equalised), flat unchanged, thin/empty/all-zero safe. DoD (module + doc + test) MET. Production wiring into rate_sensitivity._align_sales_deltas DEFERRED (documented TODO): deseasonalizing the short rate-driven series perturbs the recovered β/lag on current data — needs a points-per-month gate / joint seasonal+rate estimation + backtest before wiring. Forecast stack is advisory regardless. Refs #979 |
||
|---|---|---|
| .. | ||
| cadastre | ||
| exporters | ||
| forecasting | ||
| scrapers | ||
| site_finder | ||
| __init__.py | ||
| test_cadastre_bulk.py | ||
| test_ekburg_permits.py | ||
| test_nspd_denorm.py | ||
| test_objective_backfill.py | ||
| test_quarter_dump_lookup.py | ||
| test_recommend_mix_velocity.py | ||