getCosts

Class: PortfolioCVaR

Obtain buy and sell transaction costs from PortfolioCVaR object

Syntax

[BuyCost,SellCost] = getCosts(obj)

Description

[BuyCost,SellCost] = getCosts(obj) obtains buy and sell transaction costs from the PortfolioCVaR object.

Tips

You can also use dot notation to obtain the buy and sell transaction costs from the PortfolioCVaR object.

[BuyCost, SellCost] = obj.getCosts;

Input Arguments

obj

CVaR portfolio object [PortfolioCVaR].

Output Arguments

BuyCost

Proportional transaction cost to purchase each asset [vector].

SellCost

Proportional transaction cost to sell each asset [vector].

Attributes

Accesspublic
Staticfalse
Hiddenfalse

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

Examples

expand all

Obtain Buy and Sell Costs

Given a PortfolioCVaR object p with the costs set, obtain the values for BuyCost and SellCost.

p = PortfolioCVaR;
p = setCosts(p, 0.001, 0.001, 5);
[BuyCost, SellCost] = getCosts(p)
BuyCost =

   1.0000e-03


SellCost =

   1.0000e-03

See Also

Was this topic helpful?