gendesign/backend/app/services/forecasting
Light1YT 3ecfc2d7dc
All checks were successful
Deploy / changes (push) Successful in 6s
Deploy / build-frontend (push) Has been skipped
Deploy / build-worker (push) Successful in 2m16s
Deploy / build-backend (push) Successful in 1m28s
Deploy / deploy (push) Successful in 1m6s
feat(forecasting): seasonal (month-of-year) demand normalization (#979)
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
2026-06-04 11:19:50 +05:00
..
__init__.py feat(forecasting): §13 report assembler (#988, 955-A2) (#1021) 2026-06-03 08:51:23 +00:00
affordability.py fix(forecasting): #980 strongest deficit→deficit_index +1.0; #981 MAI uses CBR key rate 2026-06-04 11:10:26 +05:00
confidence_engine.py feat(forecasting): §15 confidence engine v2 (#990, 955-A4) (#1020) 2026-06-03 08:41:07 +00:00
demand_normalization.py feat(forecasting): §9.4 demand-normalization coefficient (#951f, advisory) (#1011) 2026-06-03 06:28:14 +00:00
demand_supply_forecast.py fix(forecasting): #980 strongest deficit→deficit_index +1.0; #981 MAI uses CBR key rate 2026-06-04 11:10:26 +05:00
macro_coefficient.py feat(forecasting): §9.5 macro coefficient (#951e, advisory) (#1010) 2026-06-03 06:20:04 +00:00
macro_series.py feat(forecasting): monthly macro series + regime classifier (#951b) (#1007) 2026-06-03 05:37:43 +00:00
normalize.py feat(forecasting): seasonal (month-of-year) demand normalization (#979) 2026-06-04 11:19:50 +05:00
product_scoring.py feat(forecasting): §14.2 product scoring card (#985, 954-B) (#1017) 2026-06-03 08:11:54 +00:00
rate_sensitivity.py feat(forecasting): seasonal (month-of-year) demand normalization (#979) 2026-06-04 11:19:50 +05:00
recommendation.py feat(forecasting): class/commercial/USP §10.2/10.4/10.5 + §16 (#983, 953-B) (#1015) 2026-06-03 07:52:24 +00:00
report.py feat(forecasting): §13 SiteFinderReport object (#987, 955-A1) (#1019) 2026-06-03 08:33:01 +00:00
report_assembler.py feat(forecasting): §13 report assembler (#988, 955-A2) (#1021) 2026-06-03 08:51:23 +00:00
sales_series.py feat(forecasting): monthly sales series builder for §9.6 (#951c) (#1008) 2026-06-03 05:52:33 +00:00
scenarios.py feat(forecasting): §11 macro-scenarios (#984, 954-A) (#1016) 2026-06-03 07:59:22 +00:00
special_indices.py feat(forecasting): §25 six special indices (#986, 954-C) (#1018) 2026-06-03 08:24:08 +00:00
what_to_build.py feat(forecasting): what-to-build ranker + MAI proxy (#981, 952-B) (#1013) 2026-06-03 07:07:17 +00:00