An earlier post listed traditional asset-allocation weights like “60% equities, 40% bonds” in a table but deferred the question of where those numbers come from. The mean-variance model proposed by Markowitz in 1952 reduces the problem of choosing weights across N assets to a mathematical optimization. It finds the weight vector that satisfies “maximum return for a given risk” or “minimum risk for a given return”.
The model itself is simple. The trouble starts when its inputs — expected returns and the covariance matrix — are estimated, since estimation error then dominates the outcome. This is why practitioners rarely use Markowitz as-is and reach for variants instead.
The Math of Weight Selection
When there are N assets, the number of possible weight combinations is infinite. With only the constraint that weights sum to one (Σwᵢ = 1), N-1 degrees of freedom remain. Answering “which combination is best?” requires a definition first.
Markowitz’s definition starts with two objects.
- Expected return vector
μ ∈ ℝᴺ— the expected return of each asset - Covariance matrix
Σ ∈ ℝᴺˣᴺ— how returns move together across assets
Both are typically estimated from historical returns as sample mean and sample covariance. The diagonal of the covariance matrix holds individual variances; the off-diagonal entries capture how pairs of assets co-move.
Given a weight vector w, the portfolio’s expected return and variance are:
E[Rₚ] = wᵀμ
σₚ² = wᵀΣw
Expanding the two-asset case makes the intuition clearer.
σₚ² = w₁²σ₁² + w₂²σ₂² + 2w₁w₂ρσ₁σ₂
The lower the correlation ρ, the smaller the last term, and the lower the variance. This is the mathematical foundation of diversification. With ρ = -1, two assets can be combined to drive variance to zero with the right weights. Such pairs are rare in practice, but even combining assets with low correlation meaningfully reduces risk.
The Efficient Frontier
Plotting all possible weight combinations on the (risk σₚ, return E[Rₚ]) plane produces a filled region. The boundary that gathers only the points with the highest return for each level of risk is the efficient frontier.
Points on the frontier are weight vectors that “cannot do better”. Points inside the frontier are inefficient — another weight vector exists that delivers a higher return at the same risk. Analysis then naturally narrows to “we will only pick from the frontier”.
Two Optimal Solutions
Picking a single point on the frontier needs yet another definition.
Minimum-Variance Portfolio
min wᵀΣw s.t. Σwᵢ = 1
The objective is to find the weights that minimize variance. The key feature is that the return estimate μ does not appear. The greatest weakness of the Markowitz model is the instability of μ estimation, and the minimum-variance solution sidesteps that risk. Only the covariance needs to be estimated.
The trade-off is that return information is discarded, so the result tends to be conservative. Weights naturally concentrate in low-volatility assets.
Tangency Portfolio
max (wᵀμ - r_f) / √(wᵀΣw)
The objective is the portfolio’s Sharpe Ratio. The solution lies at the point where a line drawn from the risk-free rate r_f is tangent to the efficient frontier. Since the Sharpe Ratio is maximized, the chosen weights give the best risk-adjusted return.
In an earlier post, Sharpe Ratio was the metric measuring risk-adjusted return for individual strategies. The tangency portfolio transplants that concept into weight selection across assets. The weakness is sensitivity to μ — a small shift in expected returns moves the tangent point sharply, and the weights with it.
Constraints
The theoretical model has only the sum constraint, but practical setups add more.
wᵢ ≥ 0— long-only. No short selling. The default assumption for retail accounts.wᵢ ≤ w_max— upper bound on individual asset weight. Limits concentration risk in a single name.Σ_{sector} wᵢ ≤ s_max— sector-level cap.
Each added constraint narrows the feasible space. The efficient frontier itself shifts inward, settling at points below the “theoretical optimum”. Practitioners accept the efficiency loss in exchange for realizability and risk control.
Libraries like cvxpy and pypfopt expose this class of optimization through a standard interface. Users only need to provide μ, Σ, and the constraints.
Markowitz Pitfalls and Practical Adjustments
The model’s weaknesses lie in input estimation and distributional assumptions.
Expected-return estimation error is the most damaging. A small deviation in μ sends the optimal weights to extremes. This is why the Markowitz optimizer is sometimes called an “estimation error maximizer”. The premise of using historical means as forward-looking expectations is fragile.
Covariance matrix instability is another concern. As the number of assets grows, the sample covariance estimate itself becomes ill-conditioned. This limitation is one motivation behind methods like Hierarchical Risk Parity, discussed below.
The normality assumption is another limit. Measuring risk by variance alone cannot capture fat tails or skewness. Extreme events like the 2008 financial crisis lie outside the distribution the model assumes.
In practice, several variants are used instead of pure Markowitz.
- Equal-weight(1/N) — same weight on every asset. DeMiguel et al. (2009) reported that 1/N often beats Markowitz variants on out-of-sample performance, simply because there is no estimation error.
- Risk parity — weights are set so that each asset contributes equally to portfolio risk. No return estimate is required, avoiding the instability of
μ. - Hierarchical Risk Parity — assets are clustered by correlation and weights are assigned recursively. Proposed by López de Prado, it stays stable even when the sample covariance is ill-conditioned.
- Black-Litterman — combines market-equilibrium weights as a prior with investor views in a Bayesian framework. The uncertainty in
μbecomes an explicit part of the model.
The methods differ in which weakness of Markowitz they work around. Equal-weight removes estimation error entirely, risk parity and HRP avoid estimating μ, and Black-Litterman makes the uncertainty in μ an explicit part of the model.
The efficient frontier is a starting point for portfolio weight selection, not an endpoint. Since estimation error in the inputs dominates the outcome, a simple strategy like 1/N often beats Markowitz on out-of-sample data — a well-documented paradox.
This limitation leads directly to the next question: how do we verify that weights that look good in a backtest will hold up in live operation? The next post covers walk-forward analysis as a way to quantify the reliability of backtest results.
References
- Investopedia — Modern Portfolio Theory (MPT)
- Investopedia — Efficient Frontier
- pypfopt — Efficient Frontier
- Markowitz, H. (1952). “Portfolio Selection”. Journal of Finance 7(1)
- DeMiguel, V., Garlappi, L., Uppal, R. (2009). “Optimal Versus Naive Diversification”. Review of Financial Studies 22(5)
- López de Prado, M. (2016). “Building Diversified Portfolios that Outperform Out of Sample”