Set up bounds for portfolio weights in PortfolioCVaR object
obj = setBounds(obj,LowerBound)
obj = setBounds(obj,LowerBound,UpperBound,NumAssets)
obj = setBounds(obj,LowerBound) sets up the lower bound for portfolio weights.
obj = setBounds(obj,LowerBound,UpperBound,NumAssets) sets up bounds for portfolio weights with additional options for UpperBound, and NumAssets.
Given bound constraints LowerBound and UpperBound, every weight in a portfolio Port must satisfy the following:
LowerBound <= Port <= UpperBound
Use dot notation to set up the bounds for portfolio weights.
obj = obj.setBounds(LowerBound, UpperBound, NumAssets);
CVaR portfolio object [PortfolioCVaR].
Lower-bound weight for each asset [vector].
(Optional) Upper-bound weight for each asset [vector].
(Optional) Number of assets in CVaR portfolio object [scalar]. NumAssets cannot be used to change the dimension of a CVaR portfolio object.
Note: If LowerBound or UpperBound is input as empty with , the corresponding attributes in the CVaR portfolio object are cleared and set to .
If LowerBound or UpperBound is specified as scalars and NumAssets exists or can be imputed, then they undergo scalar expansion. The default value for NumAssets is 1.
If both LowerBound and UpperBound exist and they are not ordered correctly, this method switches bounds if necessary.
To learn about attributes of methods, see Method Attributes in the MATLAB® Object-Oriented Programming documentation.
Suppose you have a balanced fund with stocks that can range from 50% to 75% of your portfolio and bonds that can range from 25% to 50% of your portfolio. To set the bound constraints for a balanced fund.
lb = [ 0.5; 0.25 ]; ub = [ 0.75; 0.5 ]; p = PortfolioCVaR; p = p.setBounds(lb, ub); disp(p.NumAssets); disp(p.LowerBound); disp(p.UpperBound);
2 0.5000 0.2500 0.7500 0.5000