diff options
| author | Tyler <tyler@tylerhoang.xyz> | 2026-03-30 18:19:50 -0700 |
|---|---|---|
| committer | Tyler <tyler@tylerhoang.xyz> | 2026-03-30 18:19:50 -0700 |
| commit | f6b21398b8d9d13fa707955852f4e73158d7db19 (patch) | |
| tree | 7dd49e0f483b2bda9ff4b5db0f10df3a5eef06ca /app.py | |
| parent | fde921603425de36c6cbf583f1ec0e2f2ce034cb (diff) | |
Add score card, 52W range bar, short interest, options tab, CSV exports
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 <noreply@anthropic.com>
Diffstat (limited to 'app.py')
| -rw-r--r-- | app.py | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -50,8 +50,8 @@ st.markdown(""" /* Tab labels */ [data-testid="stTab"] p { font-size: 0.85rem !important; font-weight: 500; } - /* Reduce default top padding */ - .block-container { padding-top: 1rem !important; } + /* Top padding — enough to clear Streamlit's sticky toolbar */ + .block-container { padding-top: 3.5rem !important; } </style> """, unsafe_allow_html=True) @@ -62,6 +62,7 @@ from components.valuation import render_valuation from components.insiders import render_insiders from components.filings import render_filings from components.news import render_news +from components.options import render_options from services.data_service import get_company_info, search_tickers @@ -140,10 +141,11 @@ if not ticker: st.info("Search for a company or ticker in the sidebar to get started.") st.stop() -tab_overview, tab_financials, tab_valuation, tab_insiders, tab_filings, tab_news = st.tabs([ +tab_overview, tab_financials, tab_valuation, tab_options, tab_insiders, tab_filings, tab_news = st.tabs([ "📈 Overview", "📊 Financials", "💰 Valuation", + "🎯 Options", "👤 Insiders", "📁 Filings", "📰 News", @@ -167,6 +169,12 @@ with tab_valuation: except Exception as e: st.error(f"Valuation failed to load: {e}") +with tab_options: + try: + render_options(ticker) + except Exception as e: + st.error(f"Options data failed to load: {e}") + with tab_insiders: try: render_insiders(ticker) |
