Efficient Frontier Generation Process
Goal: Generate the efficient frontier curve by finding optimal risk-return trade-offs using a systematic 4-step process involving both Linear Programming (LP) and Quadratic Programming (QP).
1
Find Minimum Variance Portfolio (MVP)
Solve QP: minw wT Σ w
Subject to: Σwi = 1, 0 ≤ wi ≤ wmax
MVP: The Starting Point
Risk (Volatility) →
Return ↑
MVP
Leftmost Point
Purpose: Find the portfolio with the absolute minimum risk (leftmost point on frontier)
w_mvp, mvp = find_minimum_variance_portfolio(mu, Sigma)
# No return constraint - pure risk minimization
2
Find Feasible Return Bounds via Linear Programming
Max Return LP
max μT w
→ rmax
+
Min Return LP
min μT w
→ rmin
=
Feasible Range
[rmin, rmax]
LP Bounds: What Returns Are Actually Possible?
Risk (Volatility) →
Return ↑
MVP
Max Return
Feasible
Range
Purpose: Determine the theoretical limits of achievable returns under weight constraints
🤔 Key Insight: Why LP rmin ≠ Efficient Frontier Start
LP for rmin (ignores risk)
min μT w
s.t. Σwi = 1, 0 ≤ wi ≤ wmax
Goal: Lowest possible return
Reality: May put 100% in worst asset
Result: Very low return (1%) but extremely risky
QP for MVP (minimizes risk)
min wT Σ w
s.t. Σwi = 1, 0 ≤ wi ≤ wmax
Goal: Lowest possible risk
Reality: Balances weights optimally
Result: Higher return (3%) but much lower risk
Example Scenario:
LP rmin = 0.01 ← Portfolio: 100% worst asset (crazy risky)
MVP return = 0.03 ← Portfolio: Diversified mix (low risk)
lo = max(rmin, mvp['return']) = max(0.01, 0.03) = 0.03
Translation: "The efficient frontier starts at MVP return (3%), not the theoretical minimum (1%), because we care about efficiency - optimal risk-return trade-offs."
💡 Bottom Line: You can't have a point on the efficient frontier that's less efficient than the MVP. The LP bound is a theoretical limit, but MVP provides the practical starting point for efficient portfolios.
_, r_max = _lp_extreme_return(mu, sense="max")
_, r_min = _lp_extreme_return(mu, sense="min")
# Two separate LP problems to find return bounds
3
Set Curve Generation Limits
Lower bound: max(rMVP, rmin)
Upper bound: rmax
Efficient Frontier Boundaries
Lower Bound
Can't go below MVP return
Upper Bound
Maximum feasible return
Purpose: Define the actual range where the efficient frontier will be generated
lo = max(r_min, mvp['return']) # Can't go below MVP
hi = r_max # Maximum feasible return
4
Generate Frontier via QP Loop with Sliding Constraint
For each target t: minw wT Σ w
Subject to: Σwi = 1, μT w ≥ t, 0 ≤ wi ≤ wmax
The Sliding Constraint Process
Target 1
μT w ≥ t₁
(low return)
Target 2
μT w ≥ t₂
(medium return)
Target N
μT w ≥ tₙ
(high return)
Risk (Volatility) →
Return ↑
MVP
Max Return
Efficient Frontier
Key Insight: As the constraint μT w ≥ t becomes tighter (t increases), we trace out the efficient frontier curve point by point
targets = np.linspace(lo, hi, num_points)
for t in targets[1:]: # Skip first (already have MVP)
w_t, info_t = min_variance_for_return(mu, Sigma, t)
# Each QP solves: min variance subject to return ≥ t
🎯 The Complete Algorithm Flow
QP
Find MVP
(min risk)
→
LP × 2
Find bounds
[rmin, rmax]
→
Set Limits
Curve range
[lo, hi]
→
QP Loop
Generate curve
(sliding constraint)
Result: A smooth efficient frontier curve connecting minimum risk to maximum return, with each point representing the optimal risk-return trade-off at that return level.