What does “at most K assets” count?

This playground computes a small exact final-holdings cardinality problem. It keeps the current vector beside the returned holdings and signed trades, so a sparse final portfolio cannot be mistaken for a sparse rebalance.

Controls

The optimizer counts positive returned holdings. The contrast scenario counts nonzero changes instead.

Step advances the explanation stage; it does not pretend that labels are solver iterations.

1 Validate2 Enumerate3 Compare4 Certify
—utility
—realized final support
—nonzero trade support
—supports visited
Current and returned holdingsGrouped horizontal bars compare current holdings and returned final holdings for four assets.
AssetCurrentReturned xyTrade