Documentation Center

  • Trial Software
  • Product Updates

checkFeasibility

Class: PortfolioMAD

Check feasibility of input portfolios against PortfolioMAD object

Syntax

status = checkFeasibility(obj,pwgt)

Description

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

Tips

  • Use dot notation to check the feasibility of input portfolios against a PortfolioMAD 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

MAD portfolio object [PortfolioMAD].

pwgt

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

Output Arguments

status

Row vector of NumPorts indicators that are true if the MAD 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 = PortfolioMAD;
p = p.setScenarios(AssetScenarios);
p = p.setDefaultConstraints;

pwgt = p.estimateFrontier;

p.checkFeasibility(pwgt)
ans =

     1     1     1     1     1     1     1     1     1     1

See Also

More About

Was this topic helpful?