gendesign/backend/app/services/forecasting/__init__.py
bot-backend c7bfc9e22a
All checks were successful
Deploy / changes (push) Successful in 5s
Deploy / build-frontend (push) Has been skipped
Deploy / build-backend (push) Successful in 1m20s
Deploy / build-worker (push) Successful in 2m17s
Deploy / deploy (push) Successful in 1m6s
feat(forecasting): monthly sales series builder for §9.6 (#951c) (#1008)
2026-06-03 05:52:33 +00:00

51 lines
1.8 KiB
Python

"""Forecasting services — детерминированный форсайт-слой Site Finder v2.
#951 (Site Finder v2 / «GG-форсайт», EPIC 7 «Чувствительность к ключевой ставке»).
Этот пакет — фундамент data-independent логики прогноза: monthly макро-ряды,
классификатор режима ставки, лаговые помощники. Всё ДЕТЕРМИНИРОВАННО, БЕЗ LLM.
Слои (по PR):
• macro_series (#951b) — monthly макро-ряд + классификатор режима ставки (X-ось §9.6).
• sales_series (#951c) — monthly ряд продаж по сегменту (Y-ось §9.6).
• rate_sensitivity (later PR) — §9.6 чувствительность продаж к key_rate.
• macro_coefficient (later PR) — §9.5 макро-коэффициент.
Источники данных:
• макро — таблица macro_indicator через reader site_finder/macro.py (reuse).
• продажи — objective_corpus_room_month / objective_lots (см. sales_series).
"""
from __future__ import annotations
from app.services.forecasting.macro_series import (
MonthlyMacro,
classify_regime,
get_monthly_macro,
is_confounded_window,
macro_at_lag,
)
from app.services.forecasting.sales_series import (
SalesSeries,
SegmentSpec,
build_sales_series,
fill_month_grid,
log_diff,
price_bucket_of,
room_area_bucket_of,
)
__all__ = [
"MonthlyMacro",
"SalesSeries",
"SegmentSpec",
"build_sales_series",
"classify_regime",
"fill_month_grid",
"get_monthly_macro",
"is_confounded_window",
"log_diff",
"macro_at_lag",
"price_bucket_of",
"room_area_bucket_of",
]