feat(forecasting): what-to-build ranker + MAI proxy (#981, 952-B) #1013

Merged
bot-backend merged 1 commit from feat/952b-deficit-index-mai into main 2026-06-03 07:07:17 +00:00

1 commit

Author SHA1 Message Date
78b667b018 feat(forecasting): §9.7 what-to-build ranker + §7.9 MAI proxy (#981, 952-B)
EPIC 8 advisory deliverables over the #980 demand/supply engine, deterministic,
no LLM, no new SQL:
- what_to_build.rank_segments: runs compute_demand_supply_forecast across a
  class×room_bucket[×price] grid (default 3×5×1=15) per district/cad_num/horizon,
  drops deficit_index=None cells, ranks deficit_index DESC (tie-break confidence
  DESC then stable segment key). +deficit=build-signal, −=затоварка.
- affordability.compute_affordability: §7.9 MAI degraded payment-burden proxy via
  subsidized weighted rate (_current_mortgage_rate) + annuity on 50m²/240mo.
  payment_to_income always None (#946 no income), rate_kind always
  subsidized_weighted (market ~20% absent), confidence always low.
- Pure _rank_key / _annuity (rate≤0 → principal/months guard) unit-tested.
62 new tests; 368 forecasting tests green. Advisory + un-wired.
2026-06-03 12:07:12 +05:00