From c5575a1760a88e486e354e56be68bdb75d053db6 Mon Sep 17 00:00:00 2001 From: Tyler Date: Tue, 31 Mar 2026 00:24:15 -0700 Subject: Fix EBITDA consistency and minority interest bug in valuation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Use TTM EBITDA (from compute_ttm_ratios) as the single canonical source for both Key Ratios and DCF EV/EBITDA — eliminates disagreement between tabs - Remove "Total Equity Gross Minority Interest" from minority_interest fallback in get_balance_sheet_bridge_items; that yfinance row is total equity (not just minority portion) and would have massively over-deducted from DCF equity value Co-Authored-By: Claude Sonnet 4.6 --- services/data_service.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'services/data_service.py') diff --git a/services/data_service.py b/services/data_service.py index 156a33e..412ca94 100644 --- a/services/data_service.py +++ b/services/data_service.py @@ -355,6 +355,11 @@ def compute_ttm_ratios(ticker: str) -> dict: if net_income and net_income > 0: ratios["dividendPayoutRatioTTM"] = dividends_paid / net_income + # Expose raw EBITDA so callers (e.g. DCF EV/EBITDA section) use the + # same TTM figure as the Key Ratios tab — single canonical source. + if ebitda is not None: + ratios["ebitdaTTM"] = ebitda + return ratios except Exception: return {} @@ -601,7 +606,6 @@ def get_balance_sheet_bridge_items(ticker: str) -> dict: minority_interest = pick( "Minority Interest", "Minority Interests", - "Total Equity Gross Minority Interest", ) or 0.0 net_debt = total_debt - cash_and_equivalents -- cgit v1.3-2-g0d8e