From 679baae2773dc7eaf419648ac7a59c4734fca735 Mon Sep 17 00:00:00 2001 From: Tyler Date: Thu, 14 May 2026 00:08:12 -0700 Subject: Move DCF sliders into left rail of canvas iframe MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The sliders live inside the canvas iframe (keeping live JS behavior) but are now in a narrow left rail column — the same visual layout as before the live-DCF refactor. The canvas uses a 272px + 1fr grid: left aside has the header, four range inputs, and the filings panel; right div has all output sections unchanged. Removes the horizontal va-controls bar added in the previous commit. Co-Authored-By: Claude Sonnet 4.6 --- components/valuation.py | 326 +++++++++++++++++++++++++----------------------- 1 file changed, 172 insertions(+), 154 deletions(-) diff --git a/components/valuation.py b/components/valuation.py index 8d52ae0..6fc0171 100644 --- a/components/valuation.py +++ b/components/valuation.py @@ -493,6 +493,7 @@ _DCF_CANVAS_CSS = """ --oxford:#1F3B5E;--oxford-light:#243E5A; --positive:#4F8C5E;--positive-bg:#15241A; --negative:#B5494B;--negative-bg:#2A1517; + --warning:#C49545;--warning-bg:#2A1F0A; --font-display:'EB Garamond',Georgia,serif; --font-sans:'IBM Plex Sans',system-ui,sans-serif; --font-mono:'IBM Plex Mono',monospace; @@ -888,6 +889,13 @@ def _build_dcf_canvas_html( gap_display = f"{gap_sign}${gap:,.2f}" if has_market else "—" gap_pct_str = f"{upside_pct:.1f}% vs market" if has_market else "—" + # Rail filing strings (static, Python-formatted) + net_debt_raw = ctx["total_debt"] - ctx["cash_and_equivalents"] + base_fcf_str = _fmt_b(result["base_fcf"]) + hist_growth_str = f"{result['growth_rate_used']*100:+.1f}%" + net_debt_str = _fmt_b(net_debt_raw) + shares_str = f"{ctx['shares']/1e9:.2f} B" + html = f""" @@ -897,144 +905,183 @@ def _build_dcf_canvas_html( -
- -
-
-
-
WACC{wacc_pct:.2f}%
+
+ +
- -
-
-
-
- DCF Intrinsic Value - {iv_str} - per share · firm value method · {yrs}-yr horizon + + +
+ +
From the filings
+
Base FCF (TTM){base_fcf_str}
+
FCF · 5-yr median{hist_growth_str}
+
Net debt{net_debt_str}
+
Shares outstanding{shares_str}
+ + +
+ +
+
+
+
+ DCF Intrinsic Value + {iv_str} + per share · firm value method · {yrs}-yr horizon +
+ vs +
+ Market Price + {market_str} + {pill_text} +
- vs -
- Market Price - {market_str} - {pill_text} +
+ Reading · DCF implies {gap_str} {gap_dir} the current market. + {reading}
-
-
- Reading · DCF implies {gap_str} {gap_dir} the current market. - {reading} -
-
+
-
-
-

Enterprise value build — present value of FCFs + terminal

- USD · billions · discounted at WACC {wacc_pct:.1f}% -
-
- - {hdr_cells} - - {fcf_cells} - {df_cells} - {pv_cells} - -
Forecast FCF
Discount factor
Present value
-
- -
-
-

From enterprise to equity

- Balance-sheet bridge{(' · ' + source_date) if source_date else ''} -
-
-
Enterprise value{ev_b}
-
Net debt
-
Net debt{net_debt_b}
-
Other claims
-
Other claims{other_claims_b}
-
=
-
Equity value{equity_b}
-
-
- Total debt {total_debt_b} - · - Cash & equiv. {cash_b} - · - Preferred + minority {_fmt_b(other_b_val)} -
-
+
+
+

Enterprise value build — present value of FCFs + terminal

+ USD · billions · discounted at WACC {wacc_pct:.1f}% +
+
+ + {hdr_cells} + + {fcf_cells} + {df_cells} + {pv_cells} + +
Forecast FCF
Discount factor
Present value
+
+ +
+
+

From enterprise to equity

+ Balance-sheet bridge{(' · ' + source_date) if source_date else ''} +
+
+
Enterprise value{ev_b}
+
Net debt
+
Net debt{net_debt_b}
+
Other claims
+
Other claims{other_claims_b}
+
=
+
Equity value{equity_b}
+
+
+ Total debt {total_debt_b} + · + Cash & equiv. {cash_b} + · + Preferred + minority {_fmt_b(other_b_val)} +
+
-
-
- Intrinsic · Per Share - {iv_str} - Equity value ÷ shares -
-
- Market · Last - {market_str} -   -
-
- Gap - {gap_display} - {gap_pct_str} -
-
- Shares Outstanding - {shares_b:.2f} B - diluted -
-
+
+
+ Intrinsic · Per Share + {iv_str} + Equity value ÷ shares +
+
+ Market · Last + {market_str} +   +
+
+ Gap + {gap_display} + {gap_pct_str} +
+
+ Shares Outstanding + {shares_b:.2f} B + diluted +
+
-
-
-

Cross-check against the multiples

- Same business, different lenses · implied per-share -
-
- {cx_dcf} - {cx_ev} - {cx_rev} - {cx_pb} +
+
+

Cross-check against the multiples

+ Same business, different lenses · implied per-share +
+
+ {cx_dcf} + {cx_ev} + {cx_rev} + {cx_pb} +
+
+ +
+ Firm-value DCF · enterprise value bridged to equity using debt & cash from the most recent balance sheet. Negative-FCF years are excluded from the base; terminal value uses Gordon Growth Model. + Methodology & sources ↗
-
-
- Firm-value DCF · enterprise value bridged to equity using debt & cash from the most recent balance sheet. Negative-FCF years are excluded from the base; terminal value uses Gordon Growth Model. - Methodology & sources ↗
-