obj = setGroupRatio(obj,GroupA) sets up
the group ratio constraints for CVaR portfolio weights with lower
bound on the ratio between groups.

obj = setGroupRatio(obj,GroupA,GroupB,LowerRatio, UpperRatio) to set up group ratio constraints
for portfolio weights with an additional option specified for UpperRatio.

Given base and comparison group matrices GroupA and GroupB and LowerRatio or UpperRatio bounds,
group ratio constraints require any portfolio in Port to
satisfy the following:

Caution
This collection of constraints usually requires that portfolio
weights be nonnegative and that the products GroupA * Port and GroupB
* Port are always nonnegative. Although negative portfolio
weights and non-Boolean group ratio matrices are supported, use with
caution.

Tips

You can also use dot notation to set up group ratio
constraints for portfolio weight.

To remove group ratio constraints, enter empty arrays
for the corresponding arrays. To add to existing group ratio constraints,
use addGroupRatio.

Input Arguments

obj

CVaR portfolio object [PortfolioCVaR].

GroupA

Matrix that forms base groups for comparison [matrix].

GroupB

Matrix that forms comparison groups [matrix].

Note:
The group matrices GroupA and GroupB often
indicate membership in groups, which means that their elements are
usually either 0 or 1. Because
of this interpretation, GroupA and GroupB matrices
can be either logical or numerical arrays.

LowerRatio

Lower bound for ratio of GroupB groups to GroupA groups [vector].

Note:
If input is scalar, LowerRatio undergoes
scalar expansion to conform with the group matrices.

UpperRatio

(Optional) Upper bound for ratio of GroupB groups
to GroupA groups [vector].

Note:
If input is scalar, UpperRatio undergoes
scalar expansion to conform with the group matrices.

Output Arguments

obj

Updated CVaR portfolio object [PortfolioCVaR].

Attributes

Access

public

Static

false

Hidden

false

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

Suppose you want to ensure that the ratio of financial to nonfinancial companies in your portfolio never exceeds 50%. Assume you have six assets with three financial companies (assets 1-3) and three nonfinanical companies (assets 4-6). Group ratio constraints can be set with: