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.

setBudget

Set up budget constraints

Use the setBudget function with a Portfolio, PortfolioCVaR, or PortfolioMAD object to set up budget constraints for 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

obj = setBudget(obj,LowerBudget)
obj = setBudget(obj,LowerBudget,UpperBudget)

Description

example

obj = setBudget(obj,LowerBudget) sets up budget constraints for portfolio objects.

example

obj = setBudget(obj,LowerBudget,UpperBudget) sets up budget constraints for portfolio objects with an additional option for UpperBudget.

Examples

collapse all

Assume you have a fund that permits up to 10% leverage, which means that your portfolio can be from 100% to 110% invested in risky assets. Given a Portfolio object p, set the budget constraint.

p = Portfolio;
p = setBudget(p, 1, 1.1);
disp(p.LowerBudget);
     1
disp(p.UpperBudget);
    1.1000

Assume you have a fund that permits up to 10% leverage, which means that your portfolio can be from 100% to 110% invested in risky assets. Given a CVaR portfolio object p, set the budget constraint.

p = PortfolioCVaR;
p = setBudget(p, 1, 1.1);
disp(p.LowerBudget);
     1
disp(p.UpperBudget);
    1.1000

Assume you have a fund that permits up to 10% leverage, which means that your portfolio can be from 100% to 110% invested in risky assets. Given PortfolioMAD object p, set the budget constraint.

p = PortfolioMAD;
p = setBudget(p, 1, 1.1);
disp(p.LowerBudget);
     1
disp(p.UpperBudget);
    1.1000

Input Arguments

collapse all

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

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

Note

Given bounds for a budget constraint in either LowerBudget or UpperBudget, budget constraints require any portfolio in Port to satisfy:

LowerBudget <= sum(Port) <= UpperBudget

One or both constraints may be specified. The usual budget constraint for a fully invested portfolio is to have LowerBudget = UpperBudget = 1. However, if the portfolio has allocations in cash, the budget constraints can be used to specify the cash constraints. For example, if the portfolio can hold between 0% and 10% in cash, the budget constraint would be set up with

obj = setBudget(obj, 0.9, 1)

Data Types: double

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

Note

Given bounds for a budget constraint in either LowerBudget or UpperBudget, budget constraints require any portfolio in Port to satisfy:

LowerBudget <= sum(Port) <= UpperBudget

One or both constraints may be specified. The usual budget constraint for a fully invested portfolio is to have LowerBudget = UpperBudget = 1. However, if the portfolio has allocations in cash, the budget constraints can be used to specify the cash constraints. For example, if the portfolio can hold between 0% and 10% in cash, the budget constraint would be set up with

obj = setBudget(obj, 0.9, 1)

Data Types: double

Output Arguments

collapse all

Updated portfolio object, returned as a Portfolio, PortfolioCVaR, or PortfolioMAD object. For more information on creating a portfolio object, see

Tips

You can also use dot notation to set up the budget constraints.

obj = obj.setBudget(LowerBudget, UpperBudget);

Introduced in R2011a

Was this topic helpful?