AlgoQuant, an integrated trading strategy research and backtesting system
com.numericalmethod.algoquant.model.portfoliooptimization.socp.constraints

## Class SOCPLowerLimit

• java.lang.Object
• com.numericalmethod.suanshu.optimization.multivariate.constrained.convex.sdp.socp.problem.portfoliooptimization.SOCPPortfolioConstraint
• com.numericalmethod.algoquant.model.portfoliooptimization.socp.constraints.SOCPLowerLimit
• All Implemented Interfaces:
com.numericalmethod.suanshu.analysis.function.Function<com.numericalmethod.suanshu.algebra.linear.vector.doubles.Vector,Double>, com.numericalmethod.suanshu.analysis.function.rn2r1.RealScalarFunction, Iterable<com.numericalmethod.suanshu.optimization.multivariate.constrained.convex.sdp.socp.problem.SOCPGeneralConstraints>

public class SOCPLowerLimit
extends com.numericalmethod.suanshu.optimization.multivariate.constrained.convex.sdp.socp.problem.portfoliooptimization.SOCPPortfolioConstraint
Transforms a lower position limit constraint into the compact SOCP form.

The lower position limit constraint is: $P_{l,j} \leq (w_j^0+x_j),\quad j=1,\ldots,n.$ That is, $P_{l,j} \leq y_{j},\quad j=1,\cdots,n.$ They are equivalent to $||0||_{2}\leq y_{j}-P_{l,j}, j=1,\cdots,n.$ As a result the standard SOCP form of the lower position limit constraints can be written as: $||0||_{2}\leq -\bar{y}_{j}+P_{l,j}\Longleftrightarrow ||A_{j}^{\top}z+C_{j}||_{2}\leq b^{\top}_{j}z+d_{j},\quad j=1,\cdots,n\\ A_{j}^{\top}=0_{1\times n},\; C_{j}=0,\; b_{j}=e_{j},\; d_{j}=-P_{l,j},\; z=y.$
"Reformulate the Portfolio Optimization Problem as a Second Order Cone Programming Problem, Version 7."

• ### Nested classes/interfaces inherited from class com.numericalmethod.suanshu.optimization.multivariate.constrained.convex.sdp.socp.problem.portfoliooptimization.SOCPPortfolioConstraint

com.numericalmethod.suanshu.optimization.multivariate.constrained.convex.sdp.socp.problem.portfoliooptimization.SOCPPortfolioConstraint.ConstraintViolationException, com.numericalmethod.suanshu.optimization.multivariate.constrained.convex.sdp.socp.problem.portfoliooptimization.SOCPPortfolioConstraint.Variable
• ### Nested classes/interfaces inherited from interface com.numericalmethod.suanshu.analysis.function.Function

com.numericalmethod.suanshu.analysis.function.Function.EvaluationException
• ### Constructor Summary

Constructors
Constructor and Description
SOCPLowerLimit(com.numericalmethod.suanshu.algebra.linear.vector.doubles.Vector w_0, com.numericalmethod.suanshu.algebra.linear.vector.doubles.Vector P_l)
Constructs a lower position limit constraint.
SOCPLowerLimit(com.numericalmethod.suanshu.algebra.linear.vector.doubles.Vector w_0, com.numericalmethod.suanshu.algebra.linear.vector.doubles.Vector P_l, double epsilon)
Constructs a lower position limit constraint.
• ### Method Summary

All Methods
Modifier and Type Method and Description
boolean areAllConstraintsSatisfied(com.numericalmethod.suanshu.algebra.linear.vector.doubles.Vector x)
int dimensionOfDomain()
int dimensionOfRange()
Double evaluate(com.numericalmethod.suanshu.algebra.linear.vector.doubles.Vector y)
• ### Methods inherited from class com.numericalmethod.suanshu.optimization.multivariate.constrained.convex.sdp.socp.problem.portfoliooptimization.SOCPPortfolioConstraint

getVariables, iterator, newSOCPGeneralConstraints
• ### Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
• ### Methods inherited from interface java.lang.Iterable

forEach, spliterator
• ### Constructor Detail

• #### SOCPLowerLimit

public SOCPLowerLimit(com.numericalmethod.suanshu.algebra.linear.vector.doubles.Vector w_0,
com.numericalmethod.suanshu.algebra.linear.vector.doubles.Vector P_l,
double epsilon)
Constructs a lower position limit constraint.
Parameters:
w_0 - the initial position
P_l - the lower position limit
epsilon - a precision parameter: when a number |x| ≤ ε, it is considered 0
• #### SOCPLowerLimit

public SOCPLowerLimit(com.numericalmethod.suanshu.algebra.linear.vector.doubles.Vector w_0,
com.numericalmethod.suanshu.algebra.linear.vector.doubles.Vector P_l)
Constructs a lower position limit constraint.
Parameters:
w_0 - the initial position
P_l - the lower position limit
• ### Method Detail

• #### areAllConstraintsSatisfied

public boolean areAllConstraintsSatisfied(com.numericalmethod.suanshu.algebra.linear.vector.doubles.Vector x)
throws com.numericalmethod.suanshu.optimization.multivariate.constrained.convex.sdp.socp.problem.portfoliooptimization.SOCPPortfolioConstraint.ConstraintViolationException
Specified by:
areAllConstraintsSatisfied in class com.numericalmethod.suanshu.optimization.multivariate.constrained.convex.sdp.socp.problem.portfoliooptimization.SOCPPortfolioConstraint
Throws:
com.numericalmethod.suanshu.optimization.multivariate.constrained.convex.sdp.socp.problem.portfoliooptimization.SOCPPortfolioConstraint.ConstraintViolationException
• #### evaluate

public Double evaluate(com.numericalmethod.suanshu.algebra.linear.vector.doubles.Vector y)
• #### dimensionOfDomain

public int dimensionOfDomain()
• #### dimensionOfRange

public int dimensionOfRange()