Projects / 01

Portfolio Optimization & Risk Analysis

An end-to-end portfolio optimization workflow on a 25-asset universe, from parameter estimation to risk control.

Python · yfinance · independent project

Objective

Build a complete portfolio optimization workflow, from parameter estimation to portfolio selection, with explicit risk criteria.

Data

A 25-asset universe, with historical prices sourced through the yfinance library.

Methodology

  • Estimated expected returns and covariances with the Single-Index Model.
  • Applied Vasicek beta shrinkage to reduce estimation error.
  • Constructed the efficient frontier and derived the global minimum variance (GMV) and tangency portfolios.
  • Implemented the Elton–Gruber optimal portfolio algorithm.
  • Applied VaR-based risk criteria.

Results

The workflow produces the efficient frontier, the weights of the GMV and tangency portfolios, the Elton–Gruber optimal portfolio and the related VaR measures.

Limitations

  • Estimates rely on historical data: past returns and covariances do not guarantee future ones.
  • The Single-Index Model assumes securities are correlated only through the market. Sector and style correlations fall outside the model.
  • Mean-variance optimization is highly sensitive to errors in expected returns. Beta shrinkage reduces them but does not remove them.
  • VaR sets a loss threshold; it says nothing about the size of losses beyond it.

What I learned

How much input quality drives the output: small changes in expected returns shift optimal weights materially, which is why estimation techniques matter as much as the optimization itself.

Educational project. Any results are hypothetical, based on historical or simulated data, and are not indicative of future returns. Nothing on this page constitutes investment advice or a solicitation to invest.

Next project: FX Options Pricing & Volatility Modeling

Open