public class QPWeightsLimit extends Object implements QPConstraint
minW and maxW must have the same asset order and dimension as the optimizer's
return vector. They encode componentwise lower and upper bounds; a negative
lower bound allows short selling. This object supplies no budget equality.
MarkowitzByQP adds the sum-to-one constraint itself.
For a fully invested portfolio, each lower bound must be no greater than its upper bound, the sum of lower bounds must be at most one, and the sum of upper bounds must be at least one. These checks are necessary; additional constraints can still make the problem infeasible. Check bounds before solving rather than relying on late solver failures to validate input data.
| Constructor and Description |
|---|
QPWeightsLimit(Vector minW,
Vector maxW) |
| Modifier and Type | Method and Description |
|---|---|
LinearEqualityConstraints |
linearEqualityConstraints() |
LinearGreaterThanConstraints |
linearGreaterThanConstraints() |
LinearLessThanConstraints |
linearLessThanConstraints() |
public LinearGreaterThanConstraints linearGreaterThanConstraints()
linearGreaterThanConstraints in interface QPConstraintpublic LinearLessThanConstraints linearLessThanConstraints()
linearLessThanConstraints in interface QPConstraintpublic LinearEqualityConstraints linearEqualityConstraints()
linearEqualityConstraints in interface QPConstraintCopyright © 2010-2026 NM Group. All Rights Reserved.