Constraint projection

Least-distance projection of portfolio weights onto a feasible set — per-asset box, gross-leverage cap, net-exposure range and named group bounds (project_weights).

project_weights(w[, box, gross_max, ...])

Project weights onto a feasible set: box, gross, net and group bounds.