Module 4 — Portfolio Construction

Portfolio Allocation and Markowitz

From Markowitz to drawdown-aware sizing. The math behind every allocator's spreadsheet.

Learning objectives

  • Compute portfolio return and variance from weights.
  • Construct the efficient frontier intuitively.
  • See why Markowitz is rarely used naively in production.

FORMULA

Portfolio moments

E[r_p] = wᵀ μ
Var(r_p) = wᵀ Σ w
σ_p = sqrt(wᵀ Σ w)

TEXT

The efficient frontier

For any target expected return, there is a unique minimum-variance portfolio. Plotting these in (σ, μ) space traces the efficient frontier. Adding a risk-free asset lets you draw the Capital Market Line, and the tangent portfolio is the famous 'market portfolio'.

TEXT

Why nobody runs raw Markowitz

Markowitz weights are extremely sensitive to estimates of μ (expected returns). Tiny errors in μ produce enormous swings in optimal weights, often resulting in massive long/short positions. Production allocators use shrinkage (Ledoit-Wolf), Black-Litterman views, risk parity, or hierarchical risk parity — all of which reduce reliance on point-estimates of μ.

CODE

Two-asset portfolio variance

import numpy as np
w = np.array([0.6, 0.4])
Σ = np.array([[0.04, 0.012],
              [0.012, 0.09]])
var = w @ Σ @ w
print('vol =', np.sqrt(var))