diff options
| author | Tyler <tyler@tylerhoang.xyz> | 2026-03-31 00:24:15 -0700 |
|---|---|---|
| committer | Tyler <tyler@tylerhoang.xyz> | 2026-03-31 00:24:15 -0700 |
| commit | c5575a1760a88e486e354e56be68bdb75d053db6 (patch) | |
| tree | 15fe70132d1f05fb43bbfd44824aac4b5b0ab400 /components | |
| parent | ef2374a88c555257f84ad9e629910fb12986aea0 (diff) | |
Fix EBITDA consistency and minority interest bug in valuation
- 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 <noreply@anthropic.com>
Diffstat (limited to 'components')
| -rw-r--r-- | components/valuation.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/components/valuation.py b/components/valuation.py index 863193b..a72d177 100644 --- a/components/valuation.py +++ b/components/valuation.py @@ -13,7 +13,6 @@ from services.data_service import ( get_recommendations_summary, get_earnings_history, get_next_earnings_date, - get_ebitda_from_income_stmt, ) from services.fmp_service import ( get_key_ratios, @@ -338,8 +337,9 @@ def _render_dcf(ticker: str): st.divider() st.markdown("**EV/EBITDA Valuation**") - # Use income statement EBITDA — info["ebitda"] is unreliable in yfinance - ebitda = get_ebitda_from_income_stmt(ticker) or info.get("ebitda") + # Use TTM EBITDA from compute_ttm_ratios — same source as Key Ratios tab + ratios_data = get_key_ratios(ticker) + ebitda = ratios_data.get("ebitdaTTM") ev_bridge_items = get_balance_sheet_bridge_items(ticker) total_debt = ev_bridge_items["total_debt"] total_cash = ev_bridge_items["cash_and_equivalents"] |
