public class SOCPNoTradingList2 extends SOCPPortfolioConstraint
The black list constraint is: \[ x_{j}=0, \] for j in the black list. By letting \(y=x+w^{0}\),\(\bar{y}=|x+w^{0}|\) and \(\bar{x}=|x|\), the black list constraints are changed to: \[ y_{j}=w^{0}_{j},\;\bar{y}_{j}=|w^{0}_{j}|,\;\bar{x}_{j}=0, \] for j in the black list. Denote the black list index set as \(BL\), i.e. \(BL=\{j|x_{j}=0\}\). As \(y_{j}=x_{j}+w_{j}^{0}\), the set \(BL\) can be written as \(BL=\{j|y_{j}=w_{j}^{0}\}\). The black list constraints can be written in the following form: \[ ||D_{BL}(y-w^{0})||_{2}\leq0,\;||D_{BL}(\bar{y}-|w^{0}|)||_{2}\leq0,\;||D_{BL}\bar{x}||_{2}\leq0, \] where \(D_{BL}\) is a diagonal matrix. The \(k\)th diagonal entry of \(D_{BL}\), \(D_{BL}(k,k)\), is \(1\) if \(k\in BL\), otherwise it is \(0\). These constraints can be transformed into the standard SOCP form: \[ ||D_{BL}(y-w^{0})||_{2}\leq0\Longleftrightarrow ||A_{1}^{\top}z+C_{1}||_{2}\leq b^{\top}_{1}z+d_{1}\\ A_{1}^{\top}=D_{BL},\; C_{1}=-D_{BL}\times w^{0},\; b_{1}=0_{n\times 1},\; d_{1}=0,\; z=y. \] \[ ||D_{BL}(\bar{y}-|w^{0}|)||_{2}\leq0\Longleftrightarrow ||A_{2}^{\top}z+C_{2}||_{2}\leq b^{\top}_{2}z+d_{2}\\ A_{2}^{\top}=D_{BL},\; C_{2}=-D_{BL}\times |w^{0}|,\; b_{2}=0_{n\times 1},\; d_{2}=0,\; z=\bar{y}. \] \[ ||D_{BL}\bar{x}||_{2}\leq0\Longleftrightarrow ||A_{3}^{\top}z+C_{3}||_{2}\leq b^{\top}_{3}z+d_{3}\\ A_{3}^{\top}=D_{BL},\; C_{3}=0,\; b_{3}=0_{n\times 1},\; d_{3}=0,\; z=\bar{x}. \]
SOCPPortfolioConstraint.ConstraintViolationException, SOCPPortfolioConstraint.Variable
Function.EvaluationException
Constructor and Description |
---|
SOCPNoTradingList2(Vector w_0,
Matrix D_BL0)
Constructs a black list constraint.
|
SOCPNoTradingList2(Vector w_0,
Matrix D_BL0,
double epsilon)
Constructs a black list 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 x)
Note:
x here is the trading size, not the position.
Evaluate the function f at x, where x is from the domain. |
getVariables, iterator, newSOCPGeneralConstraints
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public SOCPNoTradingList2(Vector w_0, Matrix D_BL0, double epsilon)
w_0
- the initial positionD_BL0
- the black list matrixepsilon
- a precision parameter: when a number |x| ≤ ε,
it is considered 0public boolean areAllConstraintsSatisfied(Vector y) throws SOCPPortfolioConstraint.ConstraintViolationException
SOCPPortfolioConstraint
areAllConstraintsSatisfied
in class SOCPPortfolioConstraint
y
- a portfolio solution or allocation; the asset weightstrue
if and only if all SOCP constraints are satisfiedSOCPPortfolioConstraint.ConstraintViolationException
public Double evaluate(Vector x)
x
here is the trading size, not the position.
Evaluate the function f at x, where x is from the domain.x
- trading sizepublic int dimensionOfDomain()
Function
public int dimensionOfRange()
Function
Copyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.