diff options
| author | Tyler <tyler@tylerhoang.xyz> | 2026-03-30 18:57:26 -0700 |
|---|---|---|
| committer | Tyler <tyler@tylerhoang.xyz> | 2026-03-30 18:57:26 -0700 |
| commit | 8f6199a97c592e68f812d952b41942603723e2ed (patch) | |
| tree | b342cf0d1f2c47ce714ed4dced61103cebb1c13d /components/valuation.py | |
| parent | 712bbf675cfcb32535d8c494505e566efa347feb (diff) | |
Always compute EV/EBITDA from income stmt, never pre-computed multiples
FMP and yfinance both return the same bad EV/EBITDA value (4998x for DDOG)
because their pre-computed multiples use a miscalculated EBITDA. Removed
the FMP preference fallback — EV/EBITDA is now always computed directly as
enterpriseValue / get_ebitda_from_income_stmt().
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'components/valuation.py')
| -rw-r--r-- | components/valuation.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/components/valuation.py b/components/valuation.py index a168580..e77073f 100644 --- a/components/valuation.py +++ b/components/valuation.py @@ -149,13 +149,9 @@ def _render_ratios(ticker: str): val = info.get(yf_key) return fmt(val) if val is not None else "—" - # Compute EV/EBITDA from income statement EBITDA — yfinance's info["ebitda"] - # is a known bad value for many tickers (miscalculated TTM aggregation). + # Always compute EV/EBITDA from income statement — both FMP and yfinance's + # pre-computed multiples use a bad EBITDA figure for many tickers. def _ev_ebitda() -> str: - # Prefer FMP if available - fmp_val = (ratios or {}).get("enterpriseValueMultipleTTM") or (ratios or {}).get("evToEBITDATTM") - if fmp_val is not None: - return fmt_ratio(fmp_val) ev = info.get("enterpriseValue") ebitda = get_ebitda_from_income_stmt(ticker) if ev and ebitda and ebitda > 0: |
