Note: This page has been translated by MathWorks. Click here to see

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Set up bounds for portfolio weights for a portfolio object

`obj = setBounds(obj,LowerBound)`

`obj = setBounds(___,Name,Value)`

`obj = setBounds(obj,LowerBound,UpperBound)`

`obj = setBounds(___,Name,Value)`

sets up bounds for portfolio weights for a `obj`

= setBounds(`obj`

,`LowerBound`

)`Portfolio`

,
`PortfolioCVaR`

, or `PortfolioMAD`

object.
For details on the respective workflows when using these different objects, see
Portfolio Object Workflow, PortfolioCVaR Object Workflow,
and PortfolioMAD Object Workflow.

specifies options using one or more name-value pair arguments in addition to the
input arguments in the previous syntax, including `obj`

= setBounds(___,`Name,Value`

)`BoundType`

as `'Simple'`

or `'Conditional'`

.

sets up bounds for portfolio weights for portfolio objects with an additional
option for `obj`

= setBounds(`obj`

,`LowerBound`

,`UpperBound`

)`UpperBound`

.

Given bound constraints `LowerBound`

and
`UpperBound`

and `'Simple'`

`BoundType`

, every weight in a portfolio
`Port`

must satisfy the following:

LowerBound <= Port <= UpperBound

Given bound constraints `LowerBound`

and
`UpperBound`

, and` 'Conditional'`

`BoundType`

, every weight in a portfolio
`Port`

must satisfy the following:

Port = 0 or LowerBound <= Port <= UpperBound

specifies options using one or more name-value pair arguments in addition to the
input arguments in the previous syntax, including `obj`

= setBounds(___,`Name,Value`

)`BoundType`

as `'Simple'`

or `'Conditional'`

.

You can also use dot notation to set up the bounds for portfolio weights.

obj = obj.setBounds(LowerBound, UpperBound, Name,Value);

If any of `LowerBound`

, `UpperBound`

, or
`BoundType`

are input as empties with `[ ]`

, the
corresponding attributes in the portfolio object are cleared and set to ```
[
]
```

. If `BoundType`

is cleared as `[ ]`

,
the bound type defaults to `'Simple'`

.

p = setBounds(p, LowerBound, [ ], 'BoundType',[ ]);

To reset a portfolio object to be a continuous problem, run the following:

p = setMinMaxNumAssets(p, [],[]); p = setBounds(p, p.LowerBound, p.UpperBound, 'BoundType', 'Simple');

`estimateAssetMoments`

| `estimateFrontier`

| `estimateFrontierByReturn`

| `estimateFrontierByRisk`

| `estimateFrontierLimits`

| `estimateMaxSharpeRatio`

| `estimatePortMoments`

| `estimatePortReturn`

| `estimatePortRisk`

| `estimatePortSharpeRatio`

| `getBounds`

| `setMinMaxNumAssets`

| `setSolverMINLP`

- Working with 'Simple' Bound Constraints Using Portfolio Object
- Working with 'Simple' Bound Constraints Using PortfolioCVaR Object
- Working with 'Simple' Bound Constraints Using PortfolioMAD Object
- Working with 'Conditional' BoundType, MinNumAssets, and MaxNumAssets Constraints Using Portfolio Objects
- Working with 'Conditional' BoundType, MinNumAssets, and MaxNumAssets Constraints Using PortfolioCVaR Objects
- Working with 'Conditional' BoundType, MinNumAssets, and MaxNumAssets Constraints Using PortfolioMAD Objects
- Troubleshooting for Setting 'Conditional' BoundType, MinNumAssets, and MaxNumAssets Constraints
- Portfolio Optimization Examples
- Portfolio Optimization with Semicontinuous and Cardinality Constraints
- Portfolio Set for Optimization Using Portfolio Object
- Portfolio Set for Optimization Using PortfolioCVaR Object
- Portfolio Set for Optimization Using PortfolioMAD Object