| Contents | Index |
Add group ratio constraints for portfolio weights to existing group ratio constraints
obj = addGroupRatio(obj, GroupA, GroupB, LowerRatio)
obj = addGroupRatio(obj, GroupA, GroupB, LowerRatio,
UpperRatio)
obj = addGroupRatio(obj, GroupA, GroupB, LowerRatio) to add group ratio constraints for the portfolio weights to existing group ratio constraints with just a lower bound on the ratio between groups.
obj = addGroupRatio(obj, GroupA, GroupB, LowerRatio, UpperRatio) to add group ratio constraints for the portfolio weights to existing group ratio constraints with an additional option for UpperRatio.
Given base and comparison group matrices GroupA and GroupB and, either LowerRatio, or UpperRatio bounds, group ratio constraints require any portfolio in Port to satisfy:
(GroupB * Port) .* LowerRatio <= GroupA * Port <= (GroupB * Port) .* UpperRatio
Caution This collection of constraints usually require 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. |
Use dot notation to add group ratio constraints for the portfolio weights to existing group ratio constraints:
obj = obj.addGroupRatio(GroupA, GroupB, LowerRatio, UpperRatio)
To remove group ratio constraints from a portfolio object, enter empty arrays for the corresponding arrays.
obj |
Updated portfolio object [Portfolio]. |
| Access | public |
| Static | false |
| Hidden | false |
To learn about attributes of methods, see Method Attributes in the MATLAB Object-Oriented Programming documentation.
To add another group ratio constraint to ensure that the weight in odd-numbered assets constitute at least 20% of the weight in nonfinancial assets of a portfolio, use addGroupRatio to build up group ratio constraints by creating another group matrix for the second group constraint:
p = Portfolio; GA = [ true true true false false false ]; % financial companies GB = [ false false false true true true ]; % non-financial companies p = p.setGroupRatio(GA, GB, [], 0.5); GA = [ true false true false true false ]; % odd-numbered companies GB = [ false false false true true true ]; % non-financial companies p = p.addGroupRatio(GA, GB, 0.2); disp(p.NumAssets); disp(p.GroupA); disp(p.GroupB); disp(p.LowerRatio); disp(p.UpperRatio); 6 1 1 1 0 0 0 1 0 1 0 1 0 0 0 0 1 1 1 0 0 0 1 1 1 -Inf 0.2000 0.5000 Inf
View demos and recorded presentations led by industry experts.
Now On Demand
Network with industry peers and learn the latest applications of the leading software product for computational finance.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |