public class PortfolioRiskExactSigma extends SOCPRiskConstraint
The portfolio risk in the objective function is transformed into the following constraints: \[ (x+w^{0})^{\top}\Sigma(x+w^{0})\leq t_1. \] By letting \(y=x+w^{0}\), it can be written as: \[ y^{\top}\Sigma\;y\leq t_1 \] When the exact covariance matrix \(\Sigma\) is used, then the portfolio risk constraint is equivalent to: \[ y^{\top}\Sigma\;y\leq t_1 \Longleftrightarrow y^{\top}\Sigma\;y+(\frac{t_{1}-1}{2})^{2}\leq(\frac{t_{1}+1}{2})^{2}\Longleftrightarrow ||\left(\begin{array}{c}\Sigma^{\frac{1}{2}}y\\\frac{t_{1}-1}{2}\end{array}\right)||_{2}\leq \frac{t_{1}+1}{2}. \] And the standard SOCP form of the portfolio risk constraint in this case are: \[ ||\left(\begin{array}{c}\Sigma^{\frac{1}{2}}y\\\frac{t_{1}-1}{2}\end{array}\right)||_{2}\leq \frac{t_{1}+1}{2}\Longleftrightarrow ||A_{1}^{\top}z+C_{1}||_{2}\leq b^{\top}_{1}z+d_{1}\\ A_{1}^{\top}=\left(\begin{array}{cc}\Sigma^{\frac{1}{2}} & 0_{n\times 1}\\0_{1\times n} & 1/2\end{array}\right)\nonumber,\; C_{1}=\left(\begin{array}{c}0_{n\times 1}\\-1/2\end{array}\right),\; b_{1}=\left(\begin{array}{c}0_{n\times 1}\\1/2\end{array}\right)\; d_{1}=\frac{1}{2},\; z=\left(\begin{array}{c}y\\t_{1}\end{array}\right). \]
Modifier and Type | Class and Description |
---|---|
static class |
PortfolioRiskExactSigma.DefaultRoot
Computes the matrix root by Cholesky and on failure
by MatrixRootByDiagonalization.
|
static class |
PortfolioRiskExactSigma.Diagonalization
Computes the matrix root by MatrixRootByDiagonalization.
|
static interface |
PortfolioRiskExactSigma.MatrixRoot
Specifies the method to compute the root of a matrix.
|
SOCPPortfolioConstraint.ConstraintViolationException, SOCPPortfolioConstraint.Variable
Function.EvaluationException
Constructor and Description |
---|
PortfolioRiskExactSigma(Matrix Sigma)
Transforms the portfolio risk term, \(y^{\top}\Sigma\;y\leq t_1\), into
the standard SOCP form when the exact covariance matrix is used.
|
PortfolioRiskExactSigma(Matrix Sigma,
Matrix sigmaRoot)
Transforms the portfolio risk term, \(y^{\top}\Sigma\;y\leq t_1\), into
the standard SOCP form when the exact covariance matrix is used.
|
PortfolioRiskExactSigma(Matrix Sigma,
PortfolioRiskExactSigma.MatrixRoot root)
Transforms the portfolio risk term, \(y^{\top}\Sigma\;y\leq t_1\), into
the standard SOCP form when the exact covariance matrix is used.
|
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.
|
Matrix |
root() |
Matrix |
Sigma() |
getVariables, iterator, newSOCPGeneralConstraints
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public PortfolioRiskExactSigma(Matrix Sigma, PortfolioRiskExactSigma.MatrixRoot root)
Sigma
- the covariance matrixroot
- the method to compute the root of a matrixpublic PortfolioRiskExactSigma(Matrix Sigma, Matrix sigmaRoot)
Sigma
- the covariance matrixsigmaRoot
- the root of a matrixpublic PortfolioRiskExactSigma(Matrix Sigma)
Sigma
- the covariance matrixpublic Matrix Sigma()
Sigma
in class SOCPRiskConstraint
public Matrix root()
public boolean areAllConstraintsSatisfied(Vector y)
areAllConstraintsSatisfied
in class SOCPPortfolioConstraint
y
- a portfolio solution or allocation; the asset weightstrue
public Double evaluate(Vector y)
Function
y
- xpublic int dimensionOfDomain()
Function
public int dimensionOfRange()
Function
Copyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.