Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

getBudget

Obtain budget constraint bounds from portfolio object

Use the getBudget function with a Portfolio, PortfolioCVaR, or PortfolioMAD object to obtain budget constraint bounds from portfolio objects.

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

Syntax

[LowerBudget,UpperBudget] = getBudget(obj)

Description

example

[LowerBudget,UpperBudget] = getBudget(obj) obtains budget constraint bounds from portfolio objects.

Examples

collapse all

Given portfolio p with the default constraints set, obtain the values for LowerBudget and UpperBudget.

p = Portfolio;
p = setDefaultConstraints(p, 5);
[LowerBudget, UpperBudget] = getBudget(p)
LowerBudget = 1
UpperBudget = 1

Given a PortfolioCVaR object p with the default constraints set, obtain the values for LowerBudget and UpperBudget.

p = PortfolioCVaR;
p = setDefaultConstraints(p, 5);
[LowerBudget, UpperBudget] = getBudget(p)
LowerBudget = 1
UpperBudget = 1

Given a PortfolioMAD object p with the default constraints set, obtain the values for LowerBudget and UpperBudget.

p = PortfolioMAD;
p = setDefaultConstraints(p, 5);
[LowerBudget, UpperBudget] = getBudget(p)
LowerBudget = 1
UpperBudget = 1

Input Arguments

collapse all

Object for portfolio, specified using Portfolio, PortfolioCVaR, or PortfolioMAD object. For more information on creating a portfolio object, see

Output Arguments

collapse all

Lower bound for budget constraint, returned as a scalar for a Portfolio, PortfolioCVaR, or PortfolioMAD input object (obj).

Upper bound for budget constraint, returned as a scalar for a Portfolio, PortfolioCVaR, or PortfolioMAD input object (obj).

Tips

You can also use dot notation to obtain the budget constraint bounds from portfolio objects.

[LowerBudget, UpperBudget] = obj.getBudget;

Introduced in R2011a

Was this topic helpful?