| Financial Toolbox | ![]() |
Linear inequalities for asset group comparison constraints
Syntax
Arguments
Description
[A,b] = pcgcomp(GroupA, AtoBmin, AtoBmax, GroupB)
specifies that the ratio of allocations in one group to allocations in another group is at least AtoBmin to 1 and at most AtoBmax to 1. Comparisons can be made between an arbitrary number of group pairs NGROUPS comprising subsets of NASSETS available investments.
A is a matrix and b a vector such that A*PortWts' <= b, where PortWts is a 1-by-NASSETS vector of asset allocations.
If pcgcomp is called with fewer than two output arguments, the function returns A concatenated with b [A,b].
Examples
| Asset |
INTC |
XON |
RD |
| Region |
North America |
North America |
Europe |
| Sector |
Technology |
Energy |
Energy |
| Group |
Min. Exposure |
Max. Exposure |
| North America |
0.30 |
0.75 |
| Europe |
0.10 |
0.55 |
| Technology |
0.20 |
0.50 |
| Energy |
0.20 |
0.80 |
Make the North American energy sector compose exactly 20% of the North American investment.
% INTC XON RD GroupA = [ 0 1 0 ]; % North American Energy GroupB = [ 1 1 0 ]; % North America AtoBmin = 0.20; AtoBmax = 0.20; [A,b] = pcgcomp(GroupA, AtoBmin, AtoBmax, GroupB) A = 0.2000 -0.8000 0 -0.2000 0.8000 0 b = 0 0
Portfolio weights of 40% for INTC, 10% for XON, and 50% for RD satisfy the constraints.
See Also
pcalims, pcglims, pcpval, portcons, portopt
| pcalims | pcglims | ![]() |