From f6b21398b8d9d13fa707955852f4e73158d7db19 Mon Sep 17 00:00:00 2001 From: Tyler Date: Mon, 30 Mar 2026 18:19:50 -0700 Subject: Add score card, 52W range bar, short interest, options tab, CSV exports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Overview: - Score card: green/yellow/red signals for valuation, growth, profitability, leverage, momentum (vs 52W high), and short interest - 52W high/low visual range bar with current price marker and % context - Short interest metrics row: % of float, days to cover, shares short vs prior month - Replaced static 52W High/Low metrics with volume and avg volume Options tab (new): - Expiry selector across all available expirations - Put/call ratio by volume and open interest with bullish/bearish label - IV smile chart (calls + puts) with ATM marker - Open interest by strike (calls above, puts mirrored below axis) - Full chain table (calls/puts) in expandable section CSV exports: - Download button on each financial statement (income, balance, cash flow) - Download button on earnings history table Also fix top padding cut-off: block-container padding-top 1rem → 3.5rem Co-Authored-By: Claude Sonnet 4.6 --- components/financials.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'components/financials.py') diff --git a/components/financials.py b/components/financials.py index 828f256..9078770 100644 --- a/components/financials.py +++ b/components/financials.py @@ -116,6 +116,13 @@ def render_financials(ticker: str): else: display, colors = _build_statement(df) st.dataframe(_style(display, colors), use_container_width=True) + st.download_button( + "Download CSV", + df.to_csv().encode(), + file_name=f"{ticker.upper()}_income_{'quarterly' if quarterly else 'annual'}.csv", + mime="text/csv", + key=f"dl_income_{ticker}_{quarterly}", + ) with tab_balance: df = get_balance_sheet(ticker, quarterly=quarterly) @@ -124,6 +131,13 @@ def render_financials(ticker: str): else: display, colors = _build_statement(df) st.dataframe(_style(display, colors), use_container_width=True) + st.download_button( + "Download CSV", + df.to_csv().encode(), + file_name=f"{ticker.upper()}_balance_{'quarterly' if quarterly else 'annual'}.csv", + mime="text/csv", + key=f"dl_balance_{ticker}_{quarterly}", + ) with tab_cashflow: df = get_cash_flow(ticker, quarterly=quarterly) @@ -132,3 +146,10 @@ def render_financials(ticker: str): else: display, colors = _build_statement(df) st.dataframe(_style(display, colors), use_container_width=True) + st.download_button( + "Download CSV", + df.to_csv().encode(), + file_name=f"{ticker.upper()}_cashflow_{'quarterly' if quarterly else 'annual'}.csv", + mime="text/csv", + key=f"dl_cashflow_{ticker}_{quarterly}", + ) -- cgit v1.3-2-g0d8e