The minimum-variance frontier traces portfolios achieving the lowest possible variance for each specified expected return when all assets are risky. Its upper branch is the efficient frontier; its lower branch is inefficient because another portfolio offers higher return at the same volatility. section 2.3 section 2.9
The frontier provides several useful portfolio-construction landmarks:
- It appears as a hyperbola in expected-return–standard-deviation space and as a sideways parabola in expected-return–variance space. section 2.7
- Its leftmost point is the global minimum-variance portfolio, with expected return B/A and variance 1/A. section 2.7
- For covariance matrix Σ and expected-return vector μ, define A = 1ᵀΣ⁻¹1, B = 1ᵀΣ⁻¹μ, and C = μᵀΣ⁻¹μ. section 2.7
- The standard-deviation equation is σₚ = √[(Aμₚ² − 2Bμₚ + C)/(AC − B²)]. section 2.7
Plotting the frontier with random portfolios
A practical workflow first generates 1,000 random weights, computes each portfolio’s mean and standard deviation with matrix operations, and plots the resulting risk–reward points. Computing A, B, and C then adds the analytical frontier: plot the lower segment as the minimum-variance frontier and the upper segment as the efficient frontier. section 2.3
Listing 2.8 Adding minimum-variance frontier to risk–reward plot
def plot_min_var_frontier(mu, Cov): #1
A,B,C = compute_ABC(mu, Cov)
y = np.linspace(0,B/A,100) #2
x = np.sqrt((A*y*y-2*B*y+C)/(A*C-B*B)) #2
plt.plot(x,y, color='black', lw=2.5, linestyle='--') #2
y = np.linspace(B/A,.45,100) #3
x = np.sqrt((A*y*y-2*B*y+C)/(A*C-B*B)) #3
plt.plot(x,y, color='black', lw=2.5, label='Efficient Frontier') #3
plt.legend()
def compute_ABC(mu, Cov): #4
Cov_inv = np.linalg.inv(Cov)
ones = np.ones(n_assets)
A = ones @ Cov_inv @ ones
B = ones @ Cov_inv @ mu
C = mu @ Cov_inv @ mu
return A,B,C
plot_points(mu, sigma, stocks)
plot_random_portfolios(mu, Cov, n_simulations)
plot_min_var_frontier(mu, Cov)
plt.show()
Inspect the Python implementation that computes A, B, and C and overlays both frontier branches on a risk–reward plot. section 2.3
