Conectando

Conectando con el servidor de portafolio...

Data Analyst Portfolio

Portfolio Tracker

Multi-Asset Portfolio Analytics & Optimization

Data Analyst Portfolio: Project 05

Multi-Asset Portfolio Analytics & Optimization

A full-stack analytics dashboard that tracks a diversified 6-ETF portfolio against the S&P 500. It applies modern portfolio theory, risk analytics, and Monte Carlo simulation to evaluate performance, quantify risk, and find mathematically optimal allocations, all powered by live market data from Yahoo Finance.

The Challenge

  • *How does a diversified ETF portfolio perform versus a passive S&P 500 benchmark?
  • *What is the portfolio's true risk profile beyond headline returns?
  • *Can we find a mathematically optimal asset allocation using real market data?
  • *What range of future outcomes should an investor expect over 1-5 year horizons?

Why This Approach

  • *Live data keeps the analysis current, not a static snapshot from a CSV.
  • *Multiple VaR methods (historical, parametric, Monte Carlo) show risk from different angles.
  • *Efficient frontier optimization goes beyond “what happened” to “what should we do.”
  • *Full methodology notebooks let viewers audit every formula and assumption.

Data Source

Source

Yahoo Finance (yfinance)

Type

Daily adjusted close prices

Assets

6 ETFs + SPY benchmark

Frequency

Live on each request

Limitations: Yahoo Finance data may have minor gaps or delayed quotes. Dividends are reflected via adjusted close prices. Analysis assumes frictionless trading (no commissions or slippage).

Portfolio Composition

TickerNameWeightCategory
VOOVanguard S&P 500 ETF30%US Equity
VXUSVanguard Total Intl Stock ETF20%International Equity
VWOVanguard FTSE Emerging Markets ETF10%Emerging Markets
BNDVanguard Total Bond Market ETF20%Fixed Income
VNQVanguard Real Estate ETF10%Real Estate
GLDSPDR Gold Shares10%Commodities

Classic diversified allocation spanning 6 asset classes. Benchmark: SPY (S&P 500). Risk-free rate: 4.5%.

Methodology

Performance Analysis

  • -Cumulative & rolling returns
  • -Drawdown analysis
  • -Calendar heatmaps

Risk Analytics

  • -Historical, Parametric & Monte Carlo VaR
  • -CVaR / Expected Shortfall
  • -Rolling volatility & beta

Monte Carlo Simulation

  • -Geometric Brownian Motion
  • -Correlated multi-asset paths
  • -Probability cone forecasts

Portfolio Optimization

  • -Mean-variance frontier
  • -Min-variance & max-Sharpe
  • -Weight comparison analysis

How to Navigate

About: Project context, methodology overview, and how to navigate the dashboard.
Overview: Portfolio KPIs, allocation breakdown, and benchmark comparison.
Performance: Cumulative returns, drawdowns, calendar heatmap, and rolling returns.
Risk: Value at Risk (3 methods), risk-adjusted ratios, return distribution, and rolling volatility.
Correlation: Pairwise correlations, rolling correlation, and diversification ratio.
Monte Carlo: GBM simulation with adjustable parameters, fan charts, and probability forecasts.
Frontier: Efficient frontier optimization, current vs optimal weights, min-variance & max-Sharpe portfolios.
Methodology: Full Jupyter notebooks with math derivations and code.

Challenges & Learnings

01

Live data variability

Yahoo Finance data can gap or lag. Built caching and fallback logic so the dashboard stays responsive even when the upstream API is slow.

02

Monte Carlo at scale

Running 10,000 correlated simulations across 6 assets needs careful vectorization. Used numpy broadcasting instead of Python loops for 50x speedup.

03

Efficient frontier solver

scipy.optimize with equality + inequality constraints requires well-chosen initial guesses. Added bounds and SLSQP fallback to avoid convergence failures.

04

Bridging theory and UX

Financial math is dense. Invested in clear labels, contextual definitions, and methodology notebooks so non-quant viewers can follow the analysis.

Tech Stack

Backend

PythonFastAPIyfinancepandasnumpyscipy

Frontend

Next.jsReactRechartsTailwind CSSFramer Motion

Analysis

JupyterPlotlyLaTeXPortfolio Optimization

Key Definitions

Sharpe Ratio: Risk-adjusted return: excess return per unit of total volatility. Higher is better.
Sortino Ratio: Like Sharpe but only penalizes downside volatility, ignoring upside swings.
Max Drawdown: Largest peak-to-trough decline in portfolio value. Measures worst-case loss.
Value at Risk (VaR): Maximum expected loss at a given confidence level (e.g., 95%) over a time horizon.
CVaR (Expected Shortfall): Average loss in the worst tail scenarios beyond VaR. Captures tail risk.
Beta: Sensitivity of portfolio returns to benchmark returns. Beta = 1 means market-level risk.
Alpha: Excess return above what the benchmark delivered, adjusted for risk.
CAGR: Compound Annual Growth Rate, smoothed annualized return over the full period.
Efficient Frontier: Set of portfolios offering the highest return for each level of risk.
Geometric Brownian Motion: Stochastic model for asset prices used in Monte Carlo simulation.