Portfolio Allocation Optimizer

Category: Portfolio & Performance

Optimize your investment portfolio allocation based on Modern Portfolio Theory (MPT). Balance risk and return by finding the optimal asset weights for maximum Sharpe ratio or minimum volatility.

Portfolio Assets

Asset
Expected Return (%)
Volatility (%)
Action
%
%
%
%

Correlation Matrix

Enter the correlation coefficients between assets (values between -1 and 1).

S&P 500
US Bonds
S&P 500
1.00
US Bonds
1.00

Optimization Parameters

%
Typically treasury yield of matching duration

Portfolio Tools

📊

Presets Library

Load common asset allocation models to start your optimization.

📋

Import/Export Data

Save your work or import data from external sources.

Modern Portfolio Theory & Efficient Frontier

Modern Portfolio Theory (MPT) is a mathematical framework for constructing a portfolio of assets such that the expected return is maximized for a given level of risk. It was pioneered by Harry Markowitz in 1952 and is centered on the concept that an investment's risk and return should not be assessed by itself, but by how it affects the portfolio's overall risk and return.

Key Concepts

  • Efficient Frontier: The set of optimal portfolios that offer the highest expected return for a defined level of risk.
  • Sharpe Ratio: A measure of risk-adjusted return, calculated as (portfolio return - risk-free rate) / portfolio standard deviation.
  • Diversification: Combining assets with different return patterns to reduce overall portfolio risk.
  • Correlation: How assets move in relation to each other. Lower correlation increases diversification benefits.

Optimization Goals

  • Maximize Sharpe Ratio: Find the portfolio with the highest risk-adjusted return.
  • Minimize Volatility: Construct the lowest-risk portfolio possible.
  • Maximize Return: Find the highest return portfolio (usually results in a single-asset portfolio).
  • Target Return: Construct the lowest-risk portfolio for a specified return.
  • Target Risk: Construct the highest-return portfolio for a specified risk level.

Key Formulas

Portfolio Return
E(Rp) = ∑ wi × E(Ri)

The weighted sum of individual asset returns, where wi is the weight of asset i and E(Ri) is its expected return.

Portfolio Variance
σp2 = ∑∑ wiwjσiσjρij

Where wi and wj are the weights, σi and σj are the volatilities, and ρij is the correlation between assets i and j.

Sharpe Ratio
Sp = (E(Rp) - Rf) / σp

The excess return (over the risk-free rate Rf) per unit of risk (standard deviation σp).

Diversification Ratio
DR = σp(weighted) / σp

Measures diversification benefit as the ratio of weighted average of individual asset volatilities to actual portfolio volatility.

Limitations of MPT

  • Assumes Normal Distribution: Returns may not follow a normal distribution, especially during market stress.
  • Historical Inputs: Optimization relies on historical data that may not predict future performance.
  • Constant Correlations: Asset correlations tend to increase during market crises.
  • Single-Period Model: MPT optimizes for a single time horizon and doesn't account for changing market conditions.

Despite these limitations, MPT remains a fundamental framework for portfolio construction and risk management.

What this calculates

Portfolio weights that target the best return for a given level of risk.

Formula
portfolio σ² = ΣΣ wᵢwⱼσᵢσⱼρᵢⱼ, minimised subject to the weights summing to 1
Worked example
Two assets each with 20% volatility and a correlation of 0.3, held 50/50, give a portfolio volatility of about 16.1% — lower than either alone.
When to use it
When deciding how to split capital across positions rather than sizing each one alone.
Common mistake
The output is only as good as the correlation and return estimates fed in, and both are measured from a past that may not repeat.