Institutional Market Risk Dashboard
Equal-weighted multi-asset portfolio analytics — volatility, VaR, stress testing, and Monte Carlo simulation
Project information
- Category: Data Science / Quantitative Finance
- Portfolio: ~30 assets (equity, bonds, gold, real estate, crypto), equal-weighted, priced since 2018
- Stack: Python, pandas, NumPy, yfinance, SciPy, scikit-learn, Plotly, Streamlit
- Link to github: GitHub repo →
- Interactive Dashboard: View dashboard →
- Live app: Live app →
Measuring portfolio risk the way a risk desk would
This project takes a diversified basket of ~30 assets — big tech stocks, European equities, bonds, gold, real estate, and crypto — and builds the full toolkit a market risk desk uses to understand how that portfolio behaves: historical volatility, Value at Risk and Expected Shortfall, correlation structure, scenario stress tests, and forward-looking Monte Carlo simulation. The goal was to make each of these genuinely institutional-grade risk concepts explorable and understandable through a single interactive dashboard, rather than a one-off notebook calculation.
Project deep dive
Problem statement
Take a basket of investments, treat it as a real equal-weighted portfolio, and answer the questions a risk manager actually needs answered: how risky is this combination historically, how would it have survived past crashes, how correlated are its holdings really, and — looking forward — what's the plausible range of outcomes over the next N days? The dashboard was built so each of these questions gets its own page, explained in a way that doesn't require a finance background to read.
Dataset
Daily price history since 2018, pulled via yfinance and cached to data/prices.csv.
- ~30 assets across equities (US big tech + European names), bonds, gold, real estate, and crypto
- Weighting: equal-weighted — each asset holds roughly 1/30th of the portfolio
- Risk-free rate used as the baseline for risk-adjusted return metrics (Sharpe, Sortino)
Methodology
- Portfolio construction — daily returns computed per asset, then combined into a single equal-weighted portfolio return series.
- Performance — cumulative return of the portfolio over time, plus an efficient-frontier simulation that tests thousands of alternative weightings to show the best possible risk/return trade-offs against the equal-weighted baseline.
- Risk metrics — annualized return, volatility, Sharpe ratio, Sortino ratio, and maximum drawdown computed from the historical return series.
- Correlation analysis — a full pairwise correlation heatmap across all ~30 assets, to check whether the portfolio is genuinely diversified or effectively concentrated.
- VaR / Expected Shortfall — Value at Risk and Expected Shortfall (CVaR) computed at selectable confidence levels (95%/99%), with the full daily-return distribution visualized as a histogram.
- Stress testing — historical scenario replay (e.g. COVID Crash, using the portfolio's real returns during that window) alongside hypothetical shocks (Interest Rate Shock, Inflation Shock, Equity Crash, Crypto Collapse) applied to specific asset classes.
- Monte Carlo simulation — thousands of randomly generated alternative future paths, built from the portfolio's historical average return and volatility, summarized into mean/median, 5th/95th percentile, and best/worst-case outcomes over a chosen time horizon.
Key findings
| Metric | What it captures |
|---|---|
| Sharpe / Sortino ratio | Return earned per unit of risk taken — Sortino only penalizes downside swings |
| Max Drawdown | Worst peak-to-bottom loss the portfolio has ever experienced |
| VaR 95% / 99% | Expected loss ceiling on a "normal" bad day, at each confidence level |
| Expected Shortfall | Average loss specifically on the worst days beyond the VaR threshold |
- Expected Shortfall is consistently larger than VaR by construction — it's the metric risk managers weight more heavily, since it doesn't ignore the tail.
- The correlation heatmap is the clearest diversification check available: a portfolio where every asset is dark red against every other effectively behaves like one asset, no matter how many tickers it technically holds.
- Stress testing and Monte Carlo intentionally answer different questions than VaR — VaR describes "normal" risk, while these describe what happens when the normal statistical pattern breaks down.
Tech stack
Limitations worth flagging: the portfolio is equal-weighted for simplicity rather than optimized to a goal; all risk numbers are historical and assume the future statistically resembles the past; and the hypothetical stress scenarios use simplified assumed shocks rather than a full macroeconomic model.