feat(financial): levered (equity) IRR — capstone финмодели #1881 #1900

Merged
bot-backend merged 2 commits from feat/levered-equity-irr into main 2026-06-25 09:06:46 +00:00

2 commits

Author SHA1 Message Date
5de5367fab test(concepts): add levered_irr keys to FinancialModel contract-key assertion
All checks were successful
CI / changes (pull_request) Successful in 7s
CI / frontend-tests (pull_request) Successful in 59s
CI / openapi-codegen-check (pull_request) Successful in 1m52s
CI / backend-tests (pull_request) Successful in 11m43s
test_concepts_response_matches_contract_keys pins the exact financial key
set; the two additive levered IRR fields broke it (full-suite-only test,
outside test_financial_dcf.py). Refs #1881
2026-06-25 13:54:21 +05:00
1ae8ae3ca0 feat(financial): levered (equity) IRR for the developer financial model
Some checks failed
CI / openapi-codegen-check (pull_request) Successful in 1m52s
CI / backend-tests (pull_request) Failing after 11m33s
CI / changes (pull_request) Successful in 6s
CI / frontend-tests (pull_request) Successful in 54s
Walk the existing debt schedule to emit the equity holder's monthly cashflow
((1−LTC) share of outflows; residual inflow after debt service) and run the
same DCF IRR + roi-proxy fallback over it. Degenerate cases (LTC≥1, no equity
at risk) → 0.0 / proxy, never a fabricated return. Levered IRR можно выше или
НИЖЕ проектной (отрицательный леверидж, если проект не покрывает стоимость долга
15%) — показываем честно, со знаком (Unicode «−»).

Инвариант Σ equity_cf == net_profit_after_financing держится точно. Unlevered
NPV/IRR/PBP и Σ cashflow == net_profit НЕ затронуты (levered чисто additive).

Schema: additive levered_irr / levered_irr_is_proxy на FinancialModel
(api-types.ts регенерён точной CI-цепочкой openapi-typescript+prettier).
Frontend: строка «IRR на собственные средства» в finance-drawer кокпита +
concept-каскаде (drawer-only — не раздуваем above-the-fold KPI), proxy/negative
помечаются честно. Завершает паритет с Excel-эталоном «Авангардная 13» (IRR).

Deep-review  (equity-cashflow математика независимо перепроверена, инвариант,
codegen byte-identical, blast radius contained).

Refs #1881
2026-06-25 13:25:25 +05:00