Class NoShortSelling
java.lang.Object
tech.nmfin.portfoliooptimization.corvalan2005.constraint.NoShortSelling
- All Implemented Interfaces:
Corvalan2005.WeightsConstraint
Weights cannot be negative.
-
Constructor Summary
ConstructorsConstructorDescriptionNoShortSelling
(int nAssets) Constructs the constraint with the number of assets in the portfolio. -
Method Summary
Modifier and TypeMethodDescriptionGets the less-than constraints on weights.
-
Constructor Details
-
NoShortSelling
public NoShortSelling(int nAssets) Constructs the constraint with the number of assets in the portfolio.- Parameters:
nAssets
- the number of assets in the portfolio
-
-
Method Details
-
constraints
Description copied from interface:Corvalan2005.WeightsConstraint
Gets the less-than constraints on weights.- Specified by:
constraints
in interfaceCorvalan2005.WeightsConstraint
- Returns:
- the less-than constraints
-