Why Portfolio Constraints Must Be Included in Optimization
Summary
The document compares two ways to impose a portfolio weight constraint: optimize an unconstrained objective and adjust the resulting weights afterward, or include the constraint directly in the optimization. It sets out a mean-variance objective using expected returns and a covariance matrix, then considers a fully invested portfolio whose weights sum to one.
The response explains why post hoc adjustment generally does not solve the constrained problem. Its simple two-variable example minimizes a quadratic objective: the unconstrained minimum is at zero weights, while the minimum subject to weights summing to one is at equal weights. Selecting or rescaling an unconstrained solution therefore need not produce the constrained optimum; in the stated portfolio setup, normalization can also fail when the unconstrained weights sum to zero. The example clarifies the general distinction, but the document does not address additional constraints such as bounds, short-sale limits, or transaction costs, nor does it assess portfolio performance.
Key ideas
- An unconstrained optimum and a constrained optimum solve different optimization problems.
- Rescaling unconstrained weights to meet a budget constraint does not generally recover the constrained optimum.
- A Lagrange multiplier incorporates the fully invested condition into the optimization.
- A simple quadratic example shows that the constrained minimum can differ from the unconstrained one.
- The discussion does not cover practical constraints beyond the weight-sum condition.
Tags
Full text
# Difference between constraining pre and post optimization
# Difference between constraining pre and post optimization
What's the implication of constraining the optimized portfolio weights obtained using no constraints vs obtaining the weights with the constraints in the objective?
Let the asset returns be distributed with mean $\mu$ and covariance $C$.
$$r\sim(\mu,C)$$
Unconstrained portfolio optimization:
$$\min_w\frac{\gamma}{2}w^TCw-w^T\mu$$
Optimal weights-
$$w^*=\frac{1}{\gamma}C^{-1}\mu$$
Constraining post optimization-
Define $e$ as a vector of 1s.
$$e^Tw^*=1\implies\gamma=e^TC^{-1}\mu$$
$$w^*=\frac{C^{-1}\mu}{e^TC^{-1}\mu}$$
Constrained portfolio optimization:
$$\min_w\frac{\gamma}{2}w^TCw-w^T\mu-\lambda(e^Tw-1)$$
Optimal weights-
$$w^*=\frac{C^{-1}(\mu+\lambda e)}{e^TC^{-1}(\mu+\lambda e)}$$
## Answer by Attack68 (score 2, accepted)
https://quant.stackexchange.com/a/41425
Consider the equation of two variables (basically your obj func):
$$f(x,y) = x^2 + y^2$$
The unconstrained minimisation is $x=y=0$. If you now constrain this sum to be equal to one, post optimisation, well it doesn't quite work since you multiply by infinity. But, even if the obj func was slightly different and it was finite it wouldn't return the minimum of the actual constrained minimisation which in this case is $x=y=0.5$, because they are two different calculations.
Analagously its like saying: from a class of twenty students find the 3 who are the tallest, and then (post) select those who are girls, versus (pre) constrained to the girls in the class find 3 who are the tallest.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.