feat(site_finder): future-supply-pressure index (#950 Step 6) #1006

Merged
lekss361 merged 1 commit from feat/950e-future-supply-index into main 2026-06-03 05:10:08 +00:00
Owner

Site Finder v2 / EPIC 6 — #950 Step 6 (финальный compute ядра). future_supply.py — §9.3 индекс будущего давления. Читает v_supply_layers_latest (stubs incl), reuse market_metrics absorption, index[0,1]=clamp(months_of_pressure/18мес), confidence=MIN, L3 horizon-weighted, open исключён. 54 теста, code-reviewer opus OK (8 priority-чеков). Refs #950

**Site Finder v2 / EPIC 6 — #950 Step 6 (финальный compute ядра).** future_supply.py — §9.3 индекс будущего давления. Читает v_supply_layers_latest (stubs incl), reuse market_metrics absorption, index[0,1]=clamp(months_of_pressure/18мес), confidence=MIN, L3 horizon-weighted, open исключён. 54 теста, code-reviewer opus OK (8 priority-чеков). Refs #950
lekss361 added 1 commit 2026-06-03 05:10:07 +00:00
Add backend/app/services/site_finder/future_supply.py — deterministic,
no-LLM §9.3 composite quantifying queued competing supply (hidden + future)
vs market absorption, computed on-the-fly (not stored).

- Reads VIEW v_supply_layers_latest (incl. non-derivable graddoc_stub/
  insider_manual L3 rows), not a layer recompute.
- Reuses market_metrics.compute_market_metrics for monthly absorption
  (available / months_of_supply == sold/mo; algebra verified).
- months_of_pressure = (hidden + future_by_horizon) / absorption/mo;
  index = linear-clamp saturation at 18mo (1.5x EKB cycle); confidence=MIN
  (thin L2/L3 honestly drags composite to low).
- L3 horizon-weighted (NULL expected_online_date -> neutral 0.5);
  open excluded from numerator (only hidden+future compete with a new object).
- Graceful: empty/thin/no-absorption -> index None + low, div-by-zero guarded.
- 54 unit tests (pure-helper math + mocked db/market_metrics).
lekss361 merged commit a10592847d into main 2026-06-03 05:10:08 +00:00
lekss361 deleted branch feat/950e-future-supply-index 2026-06-03 05:10:09 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lekss361/gendesign#1006
No description provided.