Markowitz Portfolio Optimization: Efficient Frontier Visualizer

simulator advanced ~8 min
Loading simulation...
Optimal Portfolio: Sharpe Ratio ≈ 0.85 with 30% diversification benefit

With 3 assets at 0.3 correlation and a 3% risk-free rate, the optimal tangency portfolio achieves a Sharpe ratio of approximately 0.85. Diversification reduces portfolio risk by about 30% compared to holding any single asset. The efficient frontier shows the set of portfolios that offer the highest return for each level of risk.

Formula

Portfolio return: Rp = Σ wᵢ · Rᵢ
Portfolio variance: σ²p = Σᵢ Σⱼ wᵢ · wⱼ · σᵢ · σⱼ · ρᵢⱼ
Sharpe ratio: SR = (Rp - Rf) / σp

Modern Portfolio Theory

In 1952, a 25-year-old graduate student named Harry Markowitz revolutionized finance with a simple but profound insight: investors should care not just about expected returns, but about the covariance structure of their portfolio. By combining assets that don't move in lockstep, you can reduce risk without sacrificing return — the only 'free lunch' in finance. This Modern Portfolio Theory (MPT) earned Markowitz the Nobel Prize and remains the foundation of institutional investment management.

The Efficient Frontier

The efficient frontier is the curved boundary of the set of all possible portfolios in risk-return space. Every point on this curve represents a portfolio that maximizes expected return for its level of risk. Points below the curve are suboptimal — you could do better without taking more risk. The shape of the frontier depends critically on the correlations between assets: lower correlation pushes the frontier further to the left, enabling more risk reduction through diversification.

The Tangency Portfolio and Capital Market Line

When a risk-free asset is available, the optimal strategy is to combine it with the tangency portfolio — the point on the efficient frontier with the highest Sharpe ratio. The line from the risk-free rate through the tangency portfolio is the Capital Market Line (CML). Conservative investors hold mostly risk-free assets with a small allocation to the tangency portfolio; aggressive investors lever up to hold more than 100% in the tangency portfolio.

Diversification in Practice

Watch how changing the correlation parameter transforms the efficient frontier. At ρ = 1, there is zero diversification benefit and the frontier is a straight line. As ρ decreases, the frontier curves leftward, showing that combinations of assets achieve lower risk than any individual holding. With negative correlations, portfolio risk can drop dramatically. In real markets, international diversification, asset class mixing, and factor investing all exploit this mathematical reality to build more efficient portfolios.

FAQ

What is the efficient frontier?

The efficient frontier is the set of portfolios that offer the maximum expected return for each level of risk (standard deviation). Portfolios below the frontier are suboptimal because you could achieve higher return for the same risk. The concept was introduced by Harry Markowitz in 1952 and earned him the Nobel Prize in Economics.

What is the tangency portfolio?

The tangency portfolio is the point on the efficient frontier where a line from the risk-free rate is tangent to the frontier. It has the highest Sharpe ratio (risk-adjusted return) of any portfolio. According to the Capital Asset Pricing Model (CAPM), all investors should hold this portfolio combined with the risk-free asset.

How does correlation affect diversification?

Lower correlation between assets provides greater diversification benefits. With correlation of -1, risk can be eliminated entirely. At correlation 0, risk is reduced significantly. At correlation +1, there is no diversification benefit — the portfolio behaves like a single asset. Real-world correlations typically range from 0.2 to 0.8.

What is the Sharpe ratio?

The Sharpe ratio measures risk-adjusted return: SR = (Rp - Rf) / σp, where Rp is portfolio return, Rf is risk-free rate, and σp is portfolio standard deviation. A higher Sharpe ratio indicates better return per unit of risk. Values above 1.0 are considered good, and above 2.0 are exceptional.

Sources

Embed

<iframe src="https://homo-deus.com/lab/decision-theory/portfolio-optimization/embed" width="100%" height="400" frameborder="0"></iframe>
View source on GitHub