
Portfolio constraints in optimisation: how concentration limits and sector caps shape outcomes
In theory, mean-variance optimisation produces the portfolio with the highest expected return for a given level of risk. In practice, unconstrained mean-variance optimisation frequently produces portfolios that are implausible to implement: 100% allocations to a single asset, large short positions, extreme leverage, or near-zero weights in a majority of assets. Portfolio constraints translate the mathematical optimum into a practically implementable portfolio by restricting the weight space. Understanding how constraints work—and what they cost in theoretical efficiency terms—helps investors design construction rules that reflect their actual circumstances.
What portfolio constraints are
Portfolio constraints are rules that restrict the feasible set of portfolio weights during optimisation. They are expressed as inequalities that the solution must satisfy. Common constraint types:
- Budget constraint: weights must sum to 1 (fully invested portfolio). This is standard in most formulations.
- Long-only constraint: w_i ≥ 0 for all assets. Prohibits short selling. This is the most commonly imposed constraint and has a large effect on optimal portfolios; unconstrained mean-variance optimisation regularly produces large negative weights.
- Weight bounds: w_i ≤ w_max or w_i ≥ w_min. Sets a maximum and/or minimum allocation to each asset. A typical maximum might be 25–40% per asset for diversification purposes.
- Sector or factor caps: the combined weight of assets in a given sector, geography, or factor exposure cannot exceed a threshold—for example, no more than 30% in technology or 40% in US equities.
- Turnover constraints: the sum of weight changes from the current portfolio to the new portfolio cannot exceed a threshold. This reduces transaction costs and tax drag from rebalancing.
The efficiency cost of constraints
Every binding constraint moves the portfolio away from the unconstrained optimum, reducing the theoretical Sharpe ratio. The magnitude of this cost depends on how tight the constraint is and how far the unconstrained optimal portfolio violates it.
However, this theoretical cost is typically smaller than the practical benefit in real portfolios:
- Long-only constraints eliminate the substantial estimation-error noise that causes unconstrained optimisers to produce implausibly large short positions based on minor differences in estimated expected returns
- Weight caps prevent the algorithm from concentrating in assets whose expected return is over-estimated due to statistical noise in the input data
- Turnover constraints reduce costs that would otherwise erode the theoretical return improvement from frequent rebalancing
Empirical tests consistently show that constrained mean-variance portfolios outperform unconstrained portfolios out-of-sample, because constraints act as a regulariser that limits overfitting to noisy input estimates.
Constraints as investment policy
Beyond their technical function, constraints often represent investment policy decisions:
- Long-only constraints reflect the practical inability or unwillingness to short assets
- Geographic or sector caps reflect concentration risk policies—regulatory or internal
- ESG exclusions are constraints: zero weight on excluded assets or asset classes
- Liquidity constraints ensure every position can be liquidated within a given time horizon, important for investors who may need to access capital
When constraints are imposed for policy reasons rather than optimisation reasons, their efficiency cost is a known and accepted trade-off against the policy objective.
Limitations
- Constraints must be calibrated appropriately; overly tight constraints—for example, a maximum weight of 5% across 30 assets—force near-equal weighting and negate the benefit of optimisation entirely
- Constraint selection requires judgement; there is no algorithm that automatically determines the right constraint set for a given investor
- Constraints interact: a tight weight cap combined with a turnover constraint may produce infeasible optimisation problems in some market conditions
- Static constraints may not be appropriate across all market regimes; a maximum weight on equities appropriate in normal conditions may not bind usefully during a severe crisis
Portfolio constraints in pfolio
pfolio's portfolio construction module allows users to specify weight bounds, sector caps, and turnover constraints. The platform's optimiser applies these constraints using a quadratic programming solver and reports the shadow cost of binding constraints—showing users which constraints are actively reducing the theoretical Sharpe ratio and by how much. This helps users assess whether their constraints are appropriately calibrated or overly restrictive relative to their portfolio objectives.
Related articles
- Mean-variance optimisation: constructing the most efficient portfolio
- Covariance estimation in portfolio optimisation: look-back periods, shrinkage, and stability
- The minimum variance portfolio: construction, trade-offs, and when it outperforms
- Backtesting investment strategies: methodology, limitations, and how to avoid overfitting
Disclaimer
Get started now

