Portfolio optimization

Metrics and finance1min read

Portfolio optimization is the process of choosing investment weights to meet an objective, such as the lowest risk for a target expected return, subject to limits on holdings, costs or liquidity. It evaluates how investments behave together, not just individually.

How it works

Mean-variance optimization uses expected returns, volatility and correlations to choose portfolio weights. Set the objective and constraints first: required return, position limits, cash needs and whether short selling is allowed.

The output depends on estimates, not known future results. Small changes in expected returns can produce very different allocations, so test several scenarios rather than treating one answer as definitive.

Targeting 6% with less volatility

Consider two hypothetical assets with annual expected returns of 8% and 4%, annual volatility of 20% and 6%, and zero correlation. Weights must be nonnegative and total 100%; ignore fees and taxes.

Asset A / Asset BExpected annual returnAnnual volatility
100% / 0%8%20%
60% / 40%6.4%12.2%
50% / 50%6%10.4%
0% / 100%4%6%

For the 50/50 mix:

  • Expected return: \(0.5(8\%)+0.5(4\%)=6\%\).
  • Volatility, with zero correlation: \(\sqrt{(0.5\times20\%)^2+(0.5\times6\%)^2}\approx10.4\%\).

Under these assumptions, 50/50 is the lowest-volatility allocation that meets a 6% expected-return floor. Holding only Asset B has lower volatility but misses the target. None of these expected returns is guaranteed.

Questions people ask

What is the portfolio optimization formula?

A standard mean-variance formulation minimizes \(w^\top\Sigma w\), subject to \(\mu^\top w\ge r^\) and \(\sum_i w_i=1\). Here, \(w\) represents weights, \(\Sigma\) the covariance matrix, \(\mu\) expected returns and \(r^\) the target return. Add \(w_i\ge0\) to prohibit short selling.

Is optimization the same as diversification?

No. Diversification spreads exposure; optimization chooses weights for a stated objective. An optimizer can produce a concentrated portfolio, so position limits matter. The lowest-volatility portfolio is not necessarily the one with the most holdings.

Related terms