aboutsummaryrefslogtreecommitdiff
path: root/components/valuation.py
diff options
context:
space:
mode:
authorTyler <tyler@tylerhoang.xyz>2026-03-30 18:19:50 -0700
committerTyler <tyler@tylerhoang.xyz>2026-03-30 18:19:50 -0700
commitf6b21398b8d9d13fa707955852f4e73158d7db19 (patch)
tree7dd49e0f483b2bda9ff4b5db0f10df3a5eef06ca /components/valuation.py
parentfde921603425de36c6cbf583f1ec0e2f2ce034cb (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 'components/valuation.py')
-rw-r--r--components/valuation.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/components/valuation.py b/components/valuation.py
index 5536818..b6e9d46 100644
--- a/components/valuation.py
+++ b/components/valuation.py
@@ -567,6 +567,13 @@ def _render_earnings_history(ticker: str):
use_container_width=True,
hide_index=False,
)
+ st.download_button(
+ "Download CSV",
+ display.to_csv().encode(),
+ file_name=f"{ticker.upper()}_earnings_history.csv",
+ mime="text/csv",
+ key=f"dl_earnings_{ticker}",
+ )
# EPS chart — oldest to newest
df_chart = eh.sort_index()