From 7a169d4f2bfeb79735823c1eb39f9162329b240e Mon Sep 17 00:00:00 2001 From: Tyler Date: Mon, 30 Mar 2026 19:12:50 -0700 Subject: Fix EV/EBITDA valuation tooltip using computed multiple instead of info dict The slider tooltip still read info["enterpriseToEbitda"] (the bad yfinance pre-computed value showing 4998x for DDOG). Now computed as enterpriseValue / income statement EBITDA, consistent with the Key Ratios tab fix. Co-Authored-By: Claude Sonnet 4.6 --- components/valuation.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'components') diff --git a/components/valuation.py b/components/valuation.py index 7ac32f5..88ea889 100644 --- a/components/valuation.py +++ b/components/valuation.py @@ -318,7 +318,10 @@ def _render_dcf(ticker: str): ebitda = get_ebitda_from_income_stmt(ticker) or info.get("ebitda") total_debt = info.get("totalDebt") or 0.0 total_cash = info.get("totalCash") or 0.0 - ev_ebitda_current = info.get("enterpriseToEbitda") + + # Compute current EV/EBITDA from our own data, not the bad info dict value + ev_val = info.get("enterpriseValue") + ev_ebitda_current = (ev_val / ebitda) if (ev_val and ebitda and ebitda > 0) else None if not ebitda or ebitda <= 0: st.info("EBITDA not available or negative — EV/EBITDA valuation cannot be computed.") -- cgit v1.3-2-g0d8e