Accelerating the pace of engineering and science

# estimateBounds

Class: Portfolio

Estimate global lower and upper bounds for set of portfolios

## Syntax

[glb,gub,isbounded] = estimateBounds(obj)
[glb,gub,isbounded] = estimateBounds(obj,
obtainExactBounds)

## Description

[glb,gub,isbounded] = estimateBounds(obj) estimates the global lower and upper bounds for a given set of portfolios.

[glb,gub,isbounded] = estimateBounds(obj,
obtainExactBounds)
estimates the global lower and upper bounds for a given set of portfolios with an additional option specified for obtainExactBounds.

## Tips

• You can also use dot notation to estimate the global lower and upper bounds for a given set of portfolios.

`[glb, gub, isbounded] = obj.estimateBounds;`
• Estimated bounds are accurate in most cases to within 1.0e-8. If you intend to use these bounds directly in a Portfolio object, ensure that if you impose such bound constraints, a lower bound of 0 is probably preferable to a lower bound of, for example, 1.0e-10 for portfolio weights.

## Input Arguments

 obj Portfolio object [Portfolio]. obtainExactBounds (Optional) Boolean flag to specify whether to solve for all bounds or to accept specified bounds whenever available [logical]. If bounds are known, set obtainExactBounds to false to accept known bounds.Default: True

## Output Arguments

 glb Global lower bounds for portfolio set [vector].
 gub Global upper bounds for portfolio set [vector].

isbounded

Indicates if set is empty ([ ]), bounded (true), or unbounded (false).

 Note:   By definition, any portfolio set must be nonempty and bounded:If the set is empty, isbounded = [ ].If the set is nonempty and unbounded, isbounded = false.If the set is nonempty and bounded, isbounded = true.If the set is empty, glb and gub are set to NaN vectors.

## Attributes

 Access public Static false Hidden false

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

## Examples

expand all

### Create an Unbounded Portfolio

Create an unbounded portfolio set.

```p = Portfolio('AInequality', [1 -1; 1 1 ], 'bInequality', 0);
[lb, ub, isbounded] = estimateBounds(p)
```
```lb =

-Inf
-Inf

ub =

1.0e-08 *

-0.3712
Inf

isbounded =

0

```

The estimateBounds method returns (possibly infinite) bounds and sets the isbounded flag to false. The result shows which assets are unbounded so that you can apply bound constraints as necessary.