Polish your portfolio
Your weights are race probabilities. Clipping them to meet a concentration cap and renormalizing breaks the model they came from; the right object is the nearest race that satisfies the caps. Drag the caps and watch the polish — computed live in your browser by the same parity-locked engine the Python, R and Rust packages share.
Bars: portfolio weights before (hollow) and after (filled) polishing; colors are the dendrogram's sectors; red line = name cap. Where a capped name gives up weight, its cluster siblings absorb most of it — the race redistributes along the correlation structure, not pro rata.
The engine: invert the weights to abilities under the clustered race
(structure=Blocks from the dendrogram), then solve for the
nearest abilities whose race probabilities satisfy the caps, using the
analytic fixed-grid race Jacobian. Everything here — the field pass, the Newton
inversion, the constrained polish — is
the
JavaScript port, pinned to the reference implementation by the shared
parity vectors.