Main Content

pcpval

Linear inequalities for fixing total portfolio value

Description

example

[A,b] = pcpval(PortValue,NumAssets) scales the total value of a portfolio of NumAssets assets to PortValue. All portfolio weights, bounds, return, and risk values except ExpReturn and ExpCovariance (see portopt) are in terms of PortValue.

Note

As an alternative to pcpval, use the Portfolio object (Portfolio) for mean-variance portfolio optimization. The Portfolio object supports gross or net portfolio returns as the return proxy, the variance of portfolio returns as the risk proxy, and a portfolio set that is any combination of the specified constraints to form a portfolio set. For information on the workflow when using Portfolio objects, see Portfolio Object Workflow.

Examples

collapse all

Scale the value of a portfolio of three assets that are equal to 1, so all return values are rates and all weight values are in fractions of the portfolio.

PortValue = 1;
NumAssets = 3;

[A,b] = pcpval(PortValue, NumAssets)
A = 2×3

     1     1     1
    -1    -1    -1

b = 2×1

     1
    -1

Portfolio weights of 40%, 10%, and 50% in the three assets satisfy the constraints.

Input Arguments

collapse all

Total value of asset portfolio, specified as a scalar numeric representing the sum of the allocations in all assets. PortValue = 1 specifies weights as fractions of the portfolio and return and risk numbers as rates instead of value.

Data Types: double

Number of available asset investments, specified as a scalar numeric.

Data Types: double

Output Arguments

collapse all

Asset allocations, returned as a matrix such that A*PortWts' <= b, where PortWts is a 1-by-NASSETS vector of asset allocations.

Asset allocations, returned as a vector such that A*PortWts' <= b, where PortWts is a 1-by-NASSETS vector of asset allocations.

Note

If pcpcval is called with fewer than two output arguments, returns A and b are concatenated together:

Cons = [A, b];
Cons = pcpval(PortValue, NumAssets)

Introduced before R2006a