public class SOCPLinearSectorExposure extends SOCPPortfolioConstraint
SOCPPortfolioConstraint.ConstraintViolationException, SOCPPortfolioConstraint.VariableFunction.EvaluationException| Modifier and Type | Field and Description |
|---|---|
static double |
DEFAULT_EPSILON |
| Constructor and Description |
|---|
SOCPLinearSectorExposure(Vector[] S,
Vector u)
Creates a sector exposure constraint.
|
SOCPLinearSectorExposure(Vector[] S,
Vector u,
double epsilon)
Creates a sector exposure constraint.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
areAllConstraintsSatisfied(Vector y)
Checks whether all SOCP constraints represented by this portfolio
constraint are satisfied.
|
int |
dimensionOfDomain()
Get the number of variables the function has.
|
int |
dimensionOfRange()
Get the dimension of the range space of the function.
|
Double |
evaluate(Vector y)
Evaluate the function f at x, where x is from the domain.
|
generalConstraints, getVariables, linearEqualities, linearInequalities, newSOCPGeneralConstraints, newSOCPLinearEqualities, newSOCPLinearInequalitiespublic static final double DEFAULT_EPSILON
public SOCPLinearSectorExposure(Vector[] S, Vector u)
S - the sector indicators; S[i].get(j) == 1 if asset \(j\)
is in sector \(S_i\); 0 otherwiseu - the sector exposure limitspublic SOCPLinearSectorExposure(Vector[] S, Vector u, double epsilon)
S - the sector indicators; S[i].get(j) == 1 if asset
\(j\) is in sector \(S_i\); 0 otherwiseu - the sector exposure limitsepsilon - a precision parameter: when a number |x| ≤ ε,
it is considered 0public boolean areAllConstraintsSatisfied(Vector y) throws SOCPPortfolioConstraint.ConstraintViolationException
SOCPPortfolioConstraintareAllConstraintsSatisfied in class SOCPPortfolioConstrainty - a portfolio solution or allocation; the asset weightstrue if and only if all SOCP constraints are satisfiedSOCPPortfolioConstraint.ConstraintViolationExceptionpublic Double evaluate(Vector y)
Functiony - xpublic int dimensionOfDomain()
Functionpublic int dimensionOfRange()
FunctionCopyright © 2010-2026 NM Group. All Rights Reserved.