public class SOCPSelfFinancing extends SOCPPortfolioConstraint
The self financing constraint is: \[ \sum_{j=1}^{n}x_{j}=0. \] By letting \(y=x+w^{0}\), the self financing constraint can be written as: \[ e^{\top}x=0, \] where \(e\in\mathbb{R}^{n}=(1,\cdots,1)^{\top}\). And it is equivalent to: \[ ||e^{\top}(y-w_0)||_{2}\leq 0.\\ ||e^{\top}y-e^{\top}w_0||_{2}\leq 0. \] As a result the standard SOCP form of the zero value constraint can be written as: \[ ||e^{\top}y||_{2}\leq 0\Longleftrightarrow ||A^{\top}z+C||_{2}\leq b^{\top}z+d\\ A^{\top}=e^{\top},\; C=-e^{\top}w_0,\; b=0_{n\times 1},\; d=0,\; z=y. \]
SOCPPortfolioConstraint.ConstraintViolationException, SOCPPortfolioConstraint.VariableFunction.EvaluationException| Constructor and Description |
|---|
SOCPSelfFinancing(Vector w_0)
Constructs a zero value constraint.
|
SOCPSelfFinancing(Vector w_0,
double epsilon)
Constructs a zero value constraint.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
areAllConstraintsSatisfied(Vector y)
Checks whether all SOCP constraints represented by this portfolio
constraint are satisfied.
|
double |
bias(Vector y)
Computes the amount of deviation from self financing, hence bias.
|
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.
|
getVariables, iterator, newSOCPGeneralConstraintsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic SOCPSelfFinancing(Vector w_0, double epsilon)
w_0 - the initial positionepsilon - a precision parameter: when a number |x| ≤ ε,
it is considered 0public SOCPSelfFinancing(Vector w_0)
w_0 - the initial positionpublic double bias(Vector y)
y - the positionspublic 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-2020 NM FinTech Ltd.. All Rights Reserved.