Primal feasibility
The portfolio obeys the original constraints: budget, bounds, turnover, exposure limits.
KKT conditions are the optimizer's way of saying: the best feasible point is where the objective's desire is exactly balanced by the constraints that block it.
Imagine the objective wants to put 80% of the portfolio in asset A. If the mandate caps asset A at 60%, the optimizer cannot go where the objective wants. The solution lands on the wall.
That wall is an active constraint. The force pushing against it is measured by a dual variable, also called a shadow price.
The curve is a simple objective score over the weight in asset A. The shaded area is forbidden by the max-weight constraint.
A constraint is active when it binds at the solution. A max-weight cap w_A <= 0.60 is active if the chosen weight is exactly 60%. It is inactive if the chosen weight is 45%.
Inactive constraints have no local pressure. Relaxing a cap from 60% to 61% changes nothing if the optimizer only wanted 45% anyway.
For convex problems, KKT conditions are often the certificate that a feasible solution is optimal. You do not need to memorize the full formal machinery yet; start with these four checks.
The portfolio obeys the original constraints: budget, bounds, turnover, exposure limits.
The shadow prices have legal signs. For upper-bound pressure, the price of relaxing the bound is nonnegative.
Inactive constraints have zero shadow price; nonzero shadow prices only appear on binding constraints.
At the solution, the objective gradient is balanced by active constraint gradients. There is no legal direction that improves the objective.
Suppose your optimizer puts asset A exactly at its 10% cap and reports a large dual variable on that cap. The model is saying: given your expected returns, risks, and other constraints, the optimizer would benefit from being allowed to hold more A.
That does not mean you should blindly raise the cap. It means the cap is economically important in this model. The next research question is whether the inputs are trustworthy enough to justify that pressure.
If dual is large: the constraint is shaping the solution check whether the input signal is real check whether the constraint encodes a real mandate decide whether to relax, keep, or redesign the model
Use Boyd and Vandenberghe's Convex Optimization for the formal KKT and duality treatment. Use the CVXPY quadratic-program example to see dual variables returned by a solver. Keep the KKT reference open while reading.