Skip to content
All library documents

Deriving the Markowitz Efficient Frontier with Lagrange Multipliers

Article Quant Q&A · Author: Joanna

Summary

The document sets up the mean-variance portfolio problem: minimize portfolio variance subject to a target expected return and weights summing to one. It forms a Lagrangian with two multipliers, differentiates with respect to the weights and multipliers, and expresses the first-order conditions as a block linear system. Solving that system for each target return produces the corresponding minimum-variance portfolio and traces out the efficient frontier.

This is a compact algebraic recipe rather than a full derivation of closed-form frontier equations. Its claim that the system matrix is invertible requires suitable conditions on the covariance matrix and the constraints, which are not established in the text. It also assumes unconstrained weights apart from the budget and target-return constraints; practical restrictions such as long-only holdings, transaction costs, and estimation error are outside its scope.

Key ideas

  • The Markowitz problem minimizes portfolio variance for a specified expected return and fully invested weights.
  • Lagrange multipliers encode the target-return and budget constraints.
  • The first-order conditions form a linear system in portfolio weights and multipliers.
  • Solving the system across target returns traces the minimum-variance frontier, subject to feasibility and regularity conditions.

Tags

Full text
# Derivation of the efficient frontier set (markowitz problem)


# Derivation of the efficient frontier set (markowitz problem)












I would like to find a Derivation of the efficient frontier set for the markowitz problem:

## Answer by Mh Aztec (score 6, accepted)

https://quant.stackexchange.com/a/33172

To solve this constraint minimization problem, first form the Lagrangian Function \begin{align} L(w,\lambda_1,\lambda_2)=w'\Sigma w + \lambda_1(w'\boldsymbol{\mu}-m) + \lambda_2 (w'\boldsymbol{1}-1). \end{align}

The first order conditions for a minimum are then given by \begin{align} \frac{\delta L(w,\lambda_1,\lambda_2)}{\delta w}&=2 \Sigma w + \lambda_1 \boldsymbol{\mu} + \lambda_2 \boldsymbol{1}=\boldsymbol{0} \\ \frac{\delta L(w,\lambda_1,\lambda_2)}{\lambda_1}&=w'\boldsymbol{\mu}-m=0 \\ \frac{\delta L(w,\lambda_1,\lambda_2)}{\lambda_2}&=w'\boldsymbol{1}-1=0. \end{align}

This system of linear equations using matrix algebra can be represented as \begin{align} \begin{bmatrix} 2\Sigma & \boldsymbol{\mu} & \boldsymbol{1} \\ \boldsymbol{\mu}' & 0 & 0 \\ \boldsymbol{1}' & 0 & 0 \end{bmatrix} \begin{bmatrix} w \\ \lambda_1 \\ \lambda_2 \end{bmatrix}= \begin{bmatrix} \boldsymbol{0} \\ m \\ 1 \end{bmatrix}, \end{align} or \begin{align} \boldsymbol{A}\boldsymbol{z}=\boldsymbol{b}, \end{align} where

\begin{align} \boldsymbol{A}:=\begin{bmatrix} 2\Sigma & \boldsymbol{\mu} & \boldsymbol{1} \\ \boldsymbol{\mu}' & 0 & 0 \\ \boldsymbol{1}' & 0 & 0 \end{bmatrix}, \boldsymbol{z}:= \begin{bmatrix} w \\ \lambda_1 \\ \lambda_2 \end{bmatrix} \boldsymbol{b}:= \begin{bmatrix} \boldsymbol{0} \\ m \\ 1 \end{bmatrix}. \end{align} The solution for $\boldsymbol{z}$ is then given by (A has full rank and is thus invertible)

\begin{align} \boldsymbol{z}=\boldsymbol{A}^{-1} \boldsymbol{b} \end{align}

The first element of $\boldsymbol{z}$ gives you the set of efficient portfolios varying m.

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.