aboutsummaryrefslogtreecommitdiff
path: root/components/valuation.py
diff options
context:
space:
mode:
authorTyler <tyler@tylerhoang.xyz>2026-03-30 19:12:50 -0700
committerTyler <tyler@tylerhoang.xyz>2026-03-30 19:12:50 -0700
commit7a169d4f2bfeb79735823c1eb39f9162329b240e (patch)
tree1011887919f7c0d357c4ddd58b094a2d985851fc /components/valuation.py
parent92b7eae36866c3424f44b4b6a653833a65df91a9 (diff)
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 <noreply@anthropic.com>
Diffstat (limited to 'components/valuation.py')
-rw-r--r--components/valuation.py5
1 files changed, 4 insertions, 1 deletions
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.")