Lesson 4 of 15
Minimum Variance Portfolio
Minimum Variance Portfolio
The minimum variance portfolio (MVP) is the portfolio that achieves the lowest possible variance for a given set of assets — regardless of expected return.
For two assets, the optimal weight in asset 1 that minimizes portfolio variance has a closed-form solution:
And w₂ = 1 − w₁.
Intuition
- The numerator captures how much of asset 2's risk can be offset by holding asset 1
- When ρ = 0, the formula simplifies: w₁ = σ₂² / (σ₁² + σ₂²) — you hold more of the lower-volatility asset
N-Asset Generalization
For N assets, the minimum variance portfolio requires solving a constrained optimization. Given the covariance matrix Σ (an N×N matrix), the MVP weights are:
where 1 is a vector of ones. This can be implemented without matrix inversion using a system of linear equations.
For the simple case of diagonal covariance (uncorrelated assets), this simplifies to inverse-variance weighting:
w_i = (1 / sigma_i^2) / sum(1 / sigma_j^2 for all j)
Your Task
Implement:
min_var_portfolio_2(s1, s2, corr)— returns w₁ for the 2-asset minimum variance portfoliomin_var_n_uncorrelated(sigmas)— returns a list of minimum variance weights for N uncorrelated assets (inverse-variance weighting), each rounded to 4 decimal places
Python runtime loading...
Loading...
Click "Run" to execute your code.