Obtain equality constraint arrays from PortfolioCVaR object
[AEquality,bEquality] = getEquality(obj)
[AEquality,bEquality] = getEquality(obj) obtains the equality constraint arrays from a PortfolioCVaR object.
Use dot notation to obtain the equality constraint arrays from a PortfolioCVaR object.
[AEquality, bEquality] = obj.getEquality;
Matrix to form linear equality constraints [matrix].
Vector to form linear equality 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 are 50% of your portfolio. Given a PortfolioCVaR object p, set the linear equality constraints and obtain the values for AEquality and bEquality:
A = [ 1 1 1 0 0 ]; b = 0.5; p = PortfolioCVaR; p = p.setEquality(A, b); [AEquality, bEquality] = p.getEquality
AEquality = 1 1 1 0 0 bEquality = 0.5000