gendesign/tradein-mvp/backend/app/core
bot-backend a749151679 feat(tradein): per-cadastral-quarter price index in estimator (#764)
Apply quarter_price_index (FDW) via gap-correction to avoid double-counting
location already encoded in the analog median:
  adjusted_ppm2 = base_median_ppm2 × (target_index / avg_analog_index)
median_price/range_low/range_high scale by the same factor.

Guards (no double-count + no regression):
- feature flag estimate_quarter_index_enabled (default on)
- pure-radius path only: skip if same-building anchor fired (anchor_tier)
  or any Avito IMV anchor influenced median/range (imv_anchor_present)
- Guard-2: skip when >0.6 of analogs share the target quarter
- sparse fallback: no row / n_deals<10 / FDW error → no-op
- bimodal guard: price_index>2.0 & n_deals<50 → no-op (heterogeneous quarters)

Analog quarter from listings.building_cadastral_number (added to analog
SELECT); target quarter from dadata.house_cadnum. Batched single FDW lookup
for analog indexes. Disclosure appended to confidence_explanation.

Refs #764
2026-05-31 09:49:59 +03:00
..
__init__.py feat: add tradein-mvp subproject (Trade-In Estimator под /trade-in) 2026-05-21 00:25:39 +03:00
auth.py feat(tradein): brand-by-account + result IA redesign (distinct asking/sale prices) (#683) 2026-05-30 06:45:14 +00:00
config.py feat(tradein): per-cadastral-quarter price index in estimator (#764) 2026-05-31 09:49:59 +03:00
db.py feat: add tradein-mvp subproject (Trade-In Estimator под /trade-in) 2026-05-21 00:25:39 +03:00
fdw.py feat(tradein): postgres_fdw live read of gendesign.cad_buildings (replaces snapshot) (#493) 2026-05-24 08:57:30 +00:00
ratelimit.py fix(tradein): bypass rate-limit for authenticated pilots + configurable limit (#655) (#669) 2026-05-29 15:56:30 +00:00