From ba3fa0002205e6f15dbcd59b50d81715410547d3 Mon Sep 17 00:00:00 2001 From: Tyler Date: Fri, 3 Apr 2026 19:01:53 -0700 Subject: Show uncapped historical FCF growth --- components/valuation.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'components') diff --git a/components/valuation.py b/components/valuation.py index 24405d6..4e2d003 100644 --- a/components/valuation.py +++ b/components/valuation.py @@ -30,6 +30,7 @@ from services.valuation_service import ( run_ev_revenue, run_price_to_book, compute_historical_growth_rate, + compute_raw_historical_growth_rate, ) from utils.formatters import fmt_ratio, fmt_pct, fmt_large, fmt_currency @@ -337,6 +338,7 @@ def _build_model_context(ticker: str) -> dict: base_fcf = _coerce_float(get_free_cash_flow_ttm(ticker)) hist_growth = compute_historical_growth_rate(fcf_series) if len(fcf_series) >= 2 else None + hist_growth_raw = compute_raw_historical_growth_rate(fcf_series) if len(fcf_series) >= 2 else None ebitda = _coerce_float(ratios_data.get("ebitdaTTM")) revenue_ttm = _coerce_float(get_revenue_ttm(ticker)) if revenue_ttm is None or revenue_ttm <= 0: @@ -435,6 +437,7 @@ def _build_model_context(ticker: str) -> dict: "fcf_series": fcf_series, "base_fcf": base_fcf, "hist_growth": hist_growth, + "hist_growth_raw": hist_growth_raw, "ebitda": ebitda, "revenue_ttm": revenue_ttm, "book_value_per_share": book_value_per_share, @@ -473,7 +476,9 @@ def _render_dcf_model(ctx: dict): st.markdown("**Discounted Cash Flow (DCF)**") hist_growth = ctx["hist_growth"] + hist_growth_raw = ctx["hist_growth_raw"] hist_growth_pct = hist_growth * 100 if hist_growth is not None else 5.0 + hist_growth_raw_pct = hist_growth_raw * 100 if hist_growth_raw is not None else hist_growth_pct slider_default = float(max(-20.0, min(30.0, hist_growth_pct))) st.caption( @@ -515,11 +520,11 @@ def _render_dcf_model(ctx: dict): max_value=30.0, value=round(slider_default, 1), step=0.5, - help=f"Historical median: {hist_growth_pct:.1f}%. Drag to override.", + help=f"Historical median: {hist_growth_raw_pct:.1f}%. Drag to override.", key=f"dcf_growth_{ctx['ticker']}", ) - st.caption(f"Historical FCF growth (median): **{hist_growth_pct:.1f}%**") + st.caption(f"Historical FCF growth (median): **{hist_growth_raw_pct:.1f}%**") result = run_dcf( fcf_series=ctx["fcf_series"], -- cgit v1.3-2-g0d8e