Lesson 0003

Constraints Define the Feasible Set

A portfolio optimizer does not choose from every possible portfolio. It chooses the best portfolio from the portfolios you allow.

The Skill

After this lesson, you should be able to translate common portfolio rules into constraints and predict whether they keep the problem solver-friendly.

From Lesson 0001, a simple formulation was:

maximize     mu' w - gamma * w' Sigma w
subject to   1' w = 1
             w >= 0

The objective says what is best. The constraints say what is allowed. The set of all allowed portfolios is the feasible set.

Equality vs Inequality

Constraints come in two basic forms. Equalities must match exactly; inequalities define upper or lower limits.

Equality

1' w = 1

The weights must sum to one. This encodes full investment.

Inequality

0 <= w_i <= 0.10

Each asset weight must stay between zero and ten percent.

In convex portfolio optimization, affine equalities and affine inequalities are usually easy for solvers. Many useful constraints are just careful combinations of these.

Common Portfolio Constraints

These are not just mathematical decorations; they encode mandate, liquidity, risk, and implementation rules.

Long-only

w >= 0: no shorting.

Position bounds

l <= w <= u: no name gets too small or too large.

Leverage

||w||_1 <= L: gross exposure is capped.

Turnover

||w - w0||_1 <= tau: trading from current holdings is limited.

Factor exposure

l <= F' w <= u: sector, style, or risk exposure is controlled.

Cardinality

count(w_i != 0) <= k: useful, but usually nonconvex.

Feasibility Lab

In this two-asset example, the portfolio is always fully invested because asset B gets whatever asset A does not. The remaining question is whether bounds and turnover rules allow the chosen weight.

Two-Asset Feasible Set

Current portfolio is 60% A / 40% B. Rules: A between 20% and 70%; B no more than 65%; turnover below the selected cap.

Weights
Budget
Bounds
Turnover
Verdict

If the feasible set is empty, no optimizer can rescue the model. If the feasible set is too loose, the solution may be mathematically optimal but economically useless.

The Convexity Warning

Many portfolio constraints preserve convexity: budget, long-only, bounds, leverage caps, turnover caps, and linear factor exposure limits. Some constraints break convexity: exact cardinality limits, minimum trade sizes, and fixed transaction costs often require mixed-integer optimization or approximations.

Interview habit: when someone proposes a constraint, ask whether it is linear, convex, or nonconvex. That single question often tells you what solver class you are entering.

Retrieval Practice

What does 1' w = 1 usually mean in portfolio optimization?

Which constraint limits trading away from current holdings?

Which rule is most likely to make the problem nonconvex?

Primary Source

Use the MOSEK Portfolio Optimization Cookbook for concrete portfolio constraint variants, especially constraints, transaction costs, and cardinality-related modeling. Use Boyd and Vandenberghe's Convex Optimization for the general theory of affine constraints and convex feasible sets.

Keep the constraint reference open while reading. The local Optimization Bootcamp PDF is useful for the broader constrained-optimization vocabulary.