Documentation Center

  • Trial Software
  • Product Updates

getEquality

Class: PortfolioCVaR

Obtain equality constraint arrays from PortfolioCVaR object

Syntax

[AEquality,bEquality] = getEquality(obj)

Description

[AEquality,bEquality] = getEquality(obj) obtains the equality constraint arrays from a PortfolioCVaR object.

Tips

Use dot notation to obtain the equality constraint arrays from a PortfolioCVaR object.

[AEquality, bEquality] = obj.getEquality;

Input Arguments

obj

CVaR portfolio object [PortfolioCVaR].

Output Arguments

AEquality

Matrix to form linear equality constraints [matrix].

bEquality

Vector to form linear equality constraints [vector].

Attributes

Accesspublic
Staticfalse
Hiddenfalse

To learn about attributes of methods, see Method Attributes in the MATLAB® Object-Oriented Programming documentation.

Examples

expand all

Obtain Equality Constraints

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

See Also

More About

Was this topic helpful?