Skip to content
All library documents

Choosing Equality and Inequality Constraints in Portfolio Optimization

Article Quant Q&A · Author: Bozick

Summary

The document explains how equality and inequality constraints serve different purposes in mean-variance portfolio optimization. The budget condition that portfolio weights sum to one is naturally an equality. Other common constraints, such as long-only weights, position limits, or sector caps, are inequalities that bound feasible allocations and can encourage diversification. The answer also describes fixing selected weights when corporate actions or trading costs make some holdings temporarily difficult to change.

For ESG scores, it suggests excluding assets through screening, incorporating scores into the objective as a preference, or requiring a minimum portfolio score with an inequality. It questions the practical value of forcing an exact ESG score: that could exclude a portfolio with both lower variance and a higher score. The discussion is conceptual and gives no optimization example or empirical comparison; whether a constraint should be equal or one-sided depends on the investor's actual mandate.

Key ideas

  • The sum of portfolio weights is an equality constraint because it specifies a fixed budget condition.
  • Position limits, long-only requirements, and sector caps are typically expressed as inequalities.
  • Equality constraints can hold selected weights fixed when holdings cannot be readily changed.
  • ESG preferences can be applied through screening, the objective function, or a minimum-score inequality.
  • An exact ESG target can rule out portfolios that exceed the target while improving the optimization objective.

Tags

Full text
# Why not inequality constraint in mean-variance portfolio optimization?


# Why not inequality constraint in mean-variance portfolio optimization?












Question 1:

In Modern Portfolio Theory, the case where we minimize variance given a set return and that the weights sum to 1, why is the return set as an equality constraint, not an inequality?

Question 2:

If we were to add an constraint, let us say an ESG constraint (we assign each asset an ESG score and force the weights multiplied with the ESG scores to be a certain scalar), should this be an equality constraint or an inequality constraint?

I understand that equality constraints are easier in both cases, but I fail to understand why they would also be correct.

## Answer by Dimitri Vulis (score 1, accepted)

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

I'm not sure if I understand your question correctly. I'll try to answer, but you ay want to clarify what you're asking.

I'll review portfolio optimization and constraints.

Typically, you have a universe of assets to possibly invest in, and a matrix of pairwise covariances between the assets (variances on the diagonal), and an optimizer such as HiGHS or cvxopt.

When Markowitz got an economics Nobel Prize in 1990, lots of quant shops reacted to the media buzz by offering pretty much the same thing:

1 pick a universe of a few hundred stocks using some criteria, hoping that this universe would outperform the market

2 use a quadratic optimizer to find a minimum-covariance portfolio. For the vast majority, the objective function being minimized was just the portfolio covariance. Some people included some kind on "alpha" in the objective function, such as a "buy" or "sell" from their favorite research, signifying that some assets are more or less desirable; included some kind of transaction cost of moving from the current portfolio weights to the new optimal weights; and tweaked the covariance matrix in some ways supposed to produce a better optimal portfolio.

Without constraints, the optimization would invest all the money in a small number of low-variance assets. To avoid this, and to force more diversification, you need linear constraints. For example, for each asset, you'll probably need a constraint forcing the weight of this asset to be no more than 1% (or 5%, or whatever you think is OK in one asset). For a long-only portfolio, you need the weight of each asset to be >=0. You might also have an upper bound on some industrial sectors, or on some screens used to construct the universe.

As KaiSqDist mentioned, having all the weights add up to 100% is one obvious equality constraint. I can think of a few more practical use cases for equality constraints. For example, suppose that two corporations in your portfolio have merged, resulting in a combined weight exceeding your single-name upper bound. Or suppose that a corporation got taken private, requiring you to tender the stock and to receive cash that you need to put to work. In order to reduce transaction costs, you may want to run an optimization where the assets that you won't want to change for now would have an equality constraint forcing the weight to remain the same, and letting the optimizer find substitutions for the deleted assets that would minimize the objective function.

If you have some ESG score for each asset, I see several ways to use it, for example:

1 you can identify all the assets with the ESG score below a certain thresholds, or are into fossil fuels, or otherwise undesirable, and have an equality constraint forcing them all to 0. But the same result be accomplished more efficiently by not having the excluded assets in the universe and the covariance matrix.

2 you can include the ESG score in your objective function, like the alpha mentioned above.

3 you can have an inequality constraint requiring the weighted ESG score of your portfolio to be above some minimal threshold.

However I can't think of a realistic use case with ESG scores in an equality constraint. Suppose you have ESG scores between 0 and $n$, and you force the optimized portfolio ESG score to be exactly $k<n$, rather than $\gt k$. In other words, you instruct your optimizer to reject a portfolio that might have both better objective function (lower covariance) and better ESG score. Why would anyone want that?

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.