Read slack first
For g(x) <= h, slack is h - g(x*). Positive slack means the constraint is loose.
A compact checklist for interpreting inequality dual values in portfolio optimizers.
For g(x) <= h, slack is h - g(x*). Positive slack means the constraint is loose.
For standard convex inequality constraints, a loose constraint should have a zero multiplier.
A near-zero slack and positive dual means this constraint is actively shaping the optimum.
A constraint can be tight without having local value. It touches the solution but is not scarce at the margin.
slack > 0, dual = 0 -> inactive; relaxing it should not help locally slack = 0, dual > 0 -> active and scarce; relaxing it may help locally slack = 0, dual = 0 -> active but not scarce; inspect degeneracy or redundancy slack > 0, dual > 0 -> suspicious; check tolerance, sign convention, or formulation
asset cap dual -> model wants more of that asset sector cap dual -> model wants more of that sector turnover dual -> trading budget is scarce leverage dual -> gross exposure budget is scarce risk-limit dual -> risk budget is scarce
constraints = [
w >= 0,
w <= cap,
cp.sum(w) == 1,
]
prob = cp.Problem(objective, constraints)
prob.solve()
upper_cap_duals = constraints[1].dual_value
Dual signs depend on whether the problem is written as minimization or maximization and on the inequality direction. The stable workflow is: identify the convention, compute slack, then interpret the multiplier as marginal pressure on that constraint.
Use this page with Lesson 0006, Reference 0005, and the official CVXPY dual variables guide.