feat(site_finder): market-metrics service (#949 PR A, §9.2) #997

Merged
Light1YT merged 1 commit from feat/949-competitor-relevance into main 2026-06-02 19:26:26 +00:00

1 commit

Author SHA1 Message Date
c4a06813c2 feat(site_finder): market-metrics service (#949 PR A, ТЗ §9.2)
Deterministic, no-LLM market metrics from Objective data for a location
(district and/or obj_ids): absorption_rate, months_of_supply, sell_through_pct,
unit/area_velocity, liquidity_index per room-type, overstock_index,
demand_concentration (HHI), price_sensitivity (reuses
analytics_queries._elasticity_coef). Frozen MarketMetrics dataclass + as_dict,
sample-size confidence (§15 spirit).

Graceful on thin data (the #1 coverage risk): no data → metric None (never
0/crash), confidence='low'. Filters by district/obj_ids to sidestep the sparse
domrf↔objective mapping. Read-only SELECTs, 55 unit/mock tests. Consumed by
forecast (#952) + relevance (#949 PR B). No migration, no endpoint.
2026-06-03 00:23:55 +05:00