← Back to Financial Concepts
Portfolio Theory

Efficient Frontier

Harry Markowitz's Modern Portfolio Theory (MPT) shows that diversification reduces risk without sacrificing returns. The efficient frontier represents optimal portfolios—those offering the highest expected return for a given level of risk. Any portfolio below this curve is suboptimal. Markowitz won the Nobel Prize (1990) for this work.

Stocks 60%
Return: 10% Risk: 18%
Bonds 30%
Return: 4% Risk: 6%
Cash 10%
Return: 2% Risk: 1%
Portfolio Return
8.5%
Portfolio Risk (σ)
12.0%

The Mathematics

Portfolio Return:
E[Rp] = w₁E[R₁] + w₂E[R₂] + ... + wₙE[Rₙ]

Portfolio Variance:
σ²p = ΣᵢΣⱼ wᵢwⱼσᵢσⱼρᵢⱼ

Where w = weights, σ = standard deviation, ρ = correlation.

How It Works

// Asset parameters
const assets = [
    { return: 0.10, risk: 0.18 },  // Stocks
    { return: 0.04, risk: 0.06 },  // Bonds
    { return: 0.02, risk: 0.01 }   // Cash
];

// Correlation matrix
const corr = [
    [1.0, 0.2, 0.0],
    [0.2, 1.0, 0.0],
    [0.0, 0.0, 1.0]
];

// Calculate portfolio metrics
function portfolioStats(weights) {
    // Expected return
    const ret = weights[0]*assets[0].return +
                 weights[1]*assets[1].return +
                 weights[2]*assets[2].return;
    
    // Variance (includes correlation)
    let variance = 0;
    for (let i = 0; i < 3; i++) {
        for (let j = 0; j < 3; j++) {
            variance += weights[i] * weights[j] 
                * assets[i].risk * assets[j].risk * corr[i][j];
        }
    }
    
    return { 
        return: ret, 
        risk: Math.sqrt(variance) 
    };
}