Minimum-Variance Portfolio Weights Under a Full-Investment Constraint
Summary
The document explains how to find the weights of a three-asset portfolio that minimize variance while requiring the weights to sum to one. It expresses portfolio variance using each asset’s variance and the pairwise covariances, then presents two solution approaches.
One approach searches numerically over feasible weights. The other gives a closed-form solution using the inverse covariance matrix and a vector of ones. A separate answer derives the first-order conditions by forming a Lagrangian, differentiating with respect to the weights and multiplier, and solving the resulting block linear system. The closed form assumes the covariance matrix is invertible. The discussion states only a full-investment constraint; it does not impose nonnegative weights, so short positions may be permitted, and it does not address estimation error or transaction costs.
Key ideas
- Portfolio variance combines asset variances with pairwise covariances.
- The minimum-variance weights are chosen to minimize that variance subject to weights summing to one.
- A numerical search can compare feasible weight vectors under the constraint.
- With an invertible covariance matrix, the unconstrained full-investment solution has a closed form.
- A Lagrangian yields first-order conditions that can be solved as a block linear system.
Tags
Full text
# Constrained Optimization Problem Applied to a Portfolio
# Constrained Optimization Problem Applied to a Portfolio
Can someone explain, how do i find the weights $ w_A, w_B, w_C $ that minimize the variance of the portfolio? And also what are the first-order conditions? (FOC)
$\sigma_{A}^{2}$ $\sigma_{B}^{2}$ and $\sigma_{C}^{2}$ denote the variances of assets A,B and C $\sigma_{AB}^{2}$ $\sigma_{AC}^{2}$ and $\sigma_{BC}^{2}$ represent the covariance between assets A and B, A and C, and B and C.
The variance of a three-asset portfolio is:
$ \sigma_{P}^{2} = w_{A}^{2}\sigma_{A}^{2} + w_{B}^{2}\sigma_{B}^{2} + w_{C}^{2}\sigma_{C}^{2} $ + $ 2w_{A}w_{B}\sigma_{AB} + 2w_{A}w_{C}\sigma_{AC} + 2w_{B}w_{C}\sigma_{BC} $
The weight vector that minimizes the portfolio variance solves:
$ \arg\min_{w_A, w_B, w_C} \ \sigma_{P}^{2} $
subject to $ w_A + w_B + w_C = 1 $
Hope it makes sense and someone is able to help. thx!
## Answer by KaiSqDist (score 3)
https://quant.stackexchange.com/a/85226
There are 2 ways:
I. Solving Numerically with an Objective Function
As you showed above, the numerical solution to weights of a minimum-variance portfolio is given by iterating through all possible combinations of the weight vector $w=(w_A,w_B,w_C)$
$$\underset{w}{argmin} \; \sigma_P = w' \Sigma w$$
subject to
$$w_A + w_B + w_C = 1$$
where $\Sigma$ is the covariance matrix of portfolio $P$.
II. Closed-Form Solution
$$w_{min} = \frac{\Sigma^{-1} \textbf{1}}{\textbf{1}' \Sigma^{-1} \textbf{1}}$$
where $\textbf{1}$ is a column vector of ones.
## Answer by Attack68 (score 3)
https://quant.stackexchange.com/a/85227
Just to add to @KaiSqDist when you state the Lagrangian of this objective function and constraint using Lagrange multipliers you obtain:
$$ L(\mathbf{w}, \lambda) = \frac{1}{2}\mathbf{w^T \Sigma w} - \lambda (\mathbf{1^T w} -1 ) $$ Taking the derivatives and setting equal to zero gives: $$ \frac{\partial L}{\partial \mathbf{w}} = \mathbf{\Sigma w} - \lambda \mathbf{1} = 0 $$ $$ \frac{\partial L}{\partial \lambda} = -(\mathbf{1^T w} -1) = 0$$ This is formulated in linear algebra as: $$ \begin{bmatrix} \mathbf{\Sigma} & -\mathbf{1} \\ -\mathbf{1} & 0 \\ \end{bmatrix} \begin{bmatrix} \mathbf{w} \\ \lambda \end{bmatrix} = \begin{bmatrix} \mathbf{0} \\ 1 \end{bmatrix} $$ Which leads to his closed form solution, via the inverse of a 2x2 block matrix (see https://math.stackexchange.com/questions/1946713/inverse-of-a-2-times-2-block-matrix)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.