Markowitz Efficient Frontiers from Mean and Covariance Inputs
Summary
The document shows how to construct efficient portfolios from expected asset returns and a covariance matrix. For a chosen target return, it minimizes portfolio variance while requiring the weights to sum to one and the portfolio’s expected return to equal the target. The covariance matrix is formed from asset volatilities and their correlations, linking the supplied inputs to portfolio risk.
With only equality constraints, the answer applies Lagrange multipliers and gives a linear system whose solution provides portfolio weights for each target return. Repeating the calculation across target returns traces the efficient frontier; portfolio standard deviation can then be compared with expected return. The explanation assumes the stated estimates are suitable inputs and does not work through the numerical opportunity sets. If short selling is prohibited, nonnegative weight constraints make the problem an inequality-constrained optimization that requires an optimization solver.
Key ideas
- Portfolio variance is minimized for each specified expected return to identify efficient portfolios.
- The portfolio weights must sum to one, and their weighted expected returns must meet the target.
- Asset volatilities and correlations determine the covariance matrix used in the risk calculation.
- Lagrange multipliers reduce the equality-constrained problem to a linear system.
- A no-short-selling rule adds inequality constraints and calls for an optimization solver.
Tags
Full text
# Portfolio Risk-Return
# Portfolio Risk-Return
I have a question on risk-return portfolios.
How do I go about calculating up to 200 opportunity sets by varying the weights of three assets for each portfolio $w_1$,$w_2$ and $w_3$ given:
Mean return of each asset: $\mu = [0.4, 0.17, 0.19]^T$ as constant expected return
Standard deviation of each asset: $\sigma = [0.2, 0.1, 0.1]^T$
Correlation matrix: $$\rho = \begin{bmatrix} 1 & -0.2 & -0.4 \\ -0.2 & 1 & -0.5 \\ -0.4 & -0.5 & 1 \end{bmatrix}$$
Many thanks in advance.
## Answer by Attack68 (score 0, accepted)
https://quant.stackexchange.com/a/44617
The Markowitz Efficient Frontier can be characterised by the portfolio with lowest variance of portfolio valuation, for a given return. That is you have the objective function:
$$ \min_w f(w) = w^T \Sigma w, \quad s.t. \quad \delta^T w = 1, \quad \mu^T w = r, \quad where \quad \Sigma = \sigma^T \rho \sigma,$$
(If you prohibit short selling there is a further constraint: $w \geq 0$)
Using Lagrange Multipliers the above formulation is analytically solvable for $r$ (with only equality constraints).
$$ L(w) = f(w) - \lambda_1 (\delta^T w -1) - \lambda_2 (\mu^T w - r)$$ $$ \nabla_w L = \nabla_w f -\lambda_1 \delta - \lambda_2 \mu = 2 \Sigma w -\lambda_1 \delta - \lambda_2 \mu$$ $$ \nabla_{\lambda}L = \begin{bmatrix} -\delta^T w+1 \\ - \mu^Tw+r \end{bmatrix} $$
Setting all derivatives to zero (Karush-Kuhn-Tucker conditions) gives the linear system;
$$ \begin{bmatrix} 2\Sigma & -\delta & -\mu \\ -\delta^T & 0 & 0 \\ \mu^T & 0 & 0 \end{bmatrix} \begin{bmatrix} w \\ \lambda_1 \\ \lambda_2 \end{bmatrix} = \begin{bmatrix} 0 \\ -1 \\ -r \end{bmatrix}$$
Therefore you can vary $r$, the targeted return and yield the weights for each efficient portfolio solving the above linear system.
If you prohibit short selling you need to use an optimisation solver due to the inequality constraint.Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.