Quantcast

Documentation Center

  • Trial Software
  • Product Updates

getBounds

Class: Portfolio

Obtain bounds for portfolio weights from Portfolio object

Syntax

[LowerBound,UpperBound] = getBounds(obj)

Description

[LowerBound,UpperBound] = getBounds(obj) obtains bounds for portfolio weights from a Portfolio object.

Tips

Use dot notation to obtain bounds for portfolio weights from the Portfolio object.

[LowerBound, UpperBound] = obj.getBounds;

Input Arguments

obj

Portfolio object [Portfolio].

Output Arguments

LowerBound

Lower-bound weight for each asset [vector].

UpperBound

Upper-bound weight for each asset [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 Values for Lower and Upper Bounds

Given portfolio p with the default constraints set, obtain the values for LowerBound and UpperBound.

p = Portfolio;
p = p.setDefaultConstraints(5);
[LowerBound, UpperBound] = p.getBounds
LowerBound =

     0
     0
     0
     0
     0


UpperBound =

     []

See Also

More About

Was this topic helpful?