Obtain inequality constraint arrays from PortfolioCVaR object
[AInequality,bInequality] = getInequality(obj)
[AInequality,bInequality] = getInequality(obj) obtains the inequality constraint arrays from a PortfolioCVaR object.
You can also use dot notation to obtain the inequality constraint arrays from a PortfolioCVaR object.
[AInequality, bInequality] = obj.getInequality;
Matrix to form linear inequality constraints [matrix].
Vector to form linear inequality constraints [vector].
To learn about attributes of methods, see Method Attributes in the MATLAB® Object-Oriented Programming documentation.
Suppose you have a portfolio of five assets and you want to ensure that the first three assets constitute at most 50% of your portfolio. Given a PortfolioCVaR object p, set the linear inequality constraints and then obtain values for AInequality and bInequality.
A = [ 1 1 1 0 0 ]; b = 0.5; p = PortfolioCVaR; p = setInequality(p, A, b); [AInequality, bInequality] = getInequality(p)
AInequality = 1 1 1 0 0 bInequality = 0.5000