setBudget

Class: PortfolioMAD

Set up budget constraints for PortfolioMAD object

Syntax

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

Description

obj = setBudget(obj,LowerBudget) sets up the lower budget constraint.

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

Tips

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

obj = obj.setBudget(LowerBudget, UpperBudget);

Input Arguments

obj

MAD portfolio object [PortfolioMAD].

LowerBudget

Lower bound for budget constraint [scalar].

UpperBudget

(Optional) Upper bound for budget constraint [scalar].

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

    LowerBudget <= sum(Port) <= UpperBudget

    One or both constraints can 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 from 0% to 10% in cash, the budget constraint would be set up with

    obj = setBudget(obj, 0.9, 1)

Output Arguments

obj

Updated MAD portfolio object [PortfolioMAD].

Attributes

Accesspublic
Staticfalse
Hiddenfalse

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

Examples

expand all

Set Budget Constraint

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);
disp(p.UpperBudget);
     1

    1.1000

Was this topic helpful?