Documentation

checkFeasibility

Class: PortfolioCVaR

Check feasibility of input portfolios against PortfolioCVaR object

Syntax

status = checkFeasibility(obj,pwgt)

Description

status = checkFeasibility(obj,pwgt) checks the feasibility of input portfolios against a PortfolioCVaR object.

Tips

  • You can also use dot notation to check the feasibility of input portfolios against a PortfolioCVaR object.

    status = obj.checkFeasibility(pwgt);
  • The constraint tolerance to assess whether a constraint is satisfied is obtained from the hidden property obj.defaultTolCon.

Input Arguments

obj

CVaR portfolio object [PortfolioCVaR].

pwgt

Portfolios to be checked [NumAssets-by-NumPorts matrix].

Output Arguments

status

Row vector of NumPorts indicators that are true if the CVaR portfolio object is feasible and false otherwise.

    Note:   By definition, any portfolio set must be nonempty and bounded. If the set is empty, no portfolios can be feasible. Use estimateBounds to test for nonempty and bounded sets.

Attributes

Accesspublic
Staticfalse
Hiddenfalse

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

Examples

expand all

Determine if the Portfolio Is Feasible

Given portfolio p, determine if p is feasible.

m = [ 0.05; 0.1; 0.12; 0.18 ];
C = [ 0.0064 0.00408 0.00192 0;
    0.00408 0.0289 0.0204 0.0119;
    0.00192 0.0204 0.0576 0.0336;
    0 0.0119 0.0336 0.1225 ];
m = m/12;
C = C/12;

AssetScenarios = mvnrnd(m, C, 20000);

p = PortfolioCVaR;
p = setScenarios(p, AssetScenarios);
p = setDefaultConstraints(p);
p = setProbabilityLevel(p, 0.95);

pwgt = estimateFrontier(p);

checkFeasibility(p, pwgt)
ans =

     1     1     1     1     1     1     1     1     1     1

Was this topic helpful?