How jenisezyang/universe works
Universe is a Streamlit portfolio-analytics app for a fixed 10-stock universe. Users choose equal, market-cap, or custom weights; the dashboard loads market data, presents performance, risk, attribution, and allocation analyses, and can show Black–Litterman expected returns and optimized weights. The graph separates those user-facing analytics from data retrieval and the optimizer’s internal stages. Edges reflect calls or documented data flow in the excerpts; the Yahoo Finance connection is shown as an external dependency.
Main entry points: dashboard.py Streamlit dashboard · config.py Universe settings · bl_model.py BL pipeline · data.py Price and cap data
Components 15
Dashboard
- Streamlit dashboard
dashboard.py
Market data
- Universe settings
config.py - Price and cap data
data.py
Portfolio analytics
- Performance metrics
metrics.py - Risk metrics
metrics.py - Return attribution
metrics.py - Sector allocation
metrics.py - Covariance model
metrics.py
Black–Litterman
- BL pipeline
bl_model.py - Implied returns
bl_model.py - View matrices
bl_model.py - Posterior returns
bl_model.py - Max-Sharpe weights
bl_model.py
Other components
- Investor
- Yahoo Finance
Connections 26
- Investor → Streamlit dashboard: uses
README.md - Streamlit dashboard → Universe settings: reads settings
dashboard.py - Streamlit dashboard → Price and cap data: loads data
dashboard.py - Price and cap data → Yahoo Finance: fetches prices and caps
data.py - Price and cap data → Universe settings: reads universe
data.py - Price and cap data → Streamlit dashboard: returns data
dashboard.py - Streamlit dashboard → Performance metrics: computes returns and summary
dashboard.py - Streamlit dashboard → Risk metrics: computes risk
dashboard.py - Streamlit dashboard → Return attribution: computes attribution
dashboard.py - Streamlit dashboard → Sector allocation: computes sector weights
dashboard.py - Streamlit dashboard → Covariance model: requests covariance
dashboard.py - Performance metrics → Universe settings: reads risk settings
metrics.py - Risk metrics → Universe settings: reads risk settings
metrics.py - Return attribution → Universe settings: reads sectors
metrics.py - Sector allocation → Universe settings: reads sectors
metrics.py - Covariance model → Universe settings: reads annualization
metrics.py - Streamlit dashboard → BL pipeline: runs optimization
dashboard.py - Streamlit dashboard → BL pipeline: passes covariance and market weights
dashboard.py - BL pipeline → Implied returns: computes prior
bl_model.py - BL pipeline → Posterior returns: blends views
bl_model.py - BL pipeline → Max-Sharpe weights: optimizes weights
bl_model.py - Posterior returns → Implied returns: gets prior
bl_model.py - Posterior returns → View matrices: builds view inputs
bl_model.py - Implied returns → Universe settings: reads risk aversion
bl_model.py - View matrices → Universe settings: reads views
bl_model.py - Max-Sharpe weights → Universe settings: reads risk-free rate
bl_model.py