diff options
| author | Tyler <tyler@tylerhoang.xyz> | 2026-05-17 00:54:46 -0700 |
|---|---|---|
| committer | Tyler <tyler@tylerhoang.xyz> | 2026-05-17 00:54:46 -0700 |
| commit | c48218eae73f1a07fd23496837cc030d82845353 (patch) | |
| tree | 8f0385387cdc2bd943b223995f1c4e19c9732320 /app.py | |
| parent | 2ea1abbe88b2b4acb1c58a74022fcec42d02a4c2 (diff) | |
Add Macro tab: Index Performance, Yield Curve, Sector Heatmap
Three market-wide panels backed by yfinance (no new API keys). Macro tab
renders before the st.stop() ticker guard so it's always accessible regardless
of ticker state.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'app.py')
| -rw-r--r-- | app.py | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -601,6 +601,7 @@ 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 components.macro import render_macro from services.data_service import get_company_info, search_tickers, get_latest_price import streamlit.components.v1 as components @@ -729,6 +730,7 @@ with st.sidebar: ("insiders", "○ Insiders"), ("filings", "▤ Filings"), ("news", "◉ News"), + ("macro", "⬡ Macro"), ] for _tab_id, _tab_label in _nav: _is_active = st.session_state["active_tab"] == _tab_id @@ -771,6 +773,13 @@ st.divider() # ── Main Content ────────────────────────────────────────────────────────────── +if st.session_state["active_tab"] == "macro": + try: + render_macro() + except Exception as e: + st.error(f"Macro data failed to load: {e}") + st.stop() + if not ticker: _watchlist = st.session_state.get("watchlist", []) if _watchlist: |
