Main Content

pcalims

Linear inequalities for individual asset allocation

Description

As an alternative topcalims, use the Portfolio object (Portfolio) for mean-variance portfolio optimization. This 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, seePortfolio Object Workflow.

example

[A,b]=P校准(AssetMin,资产最大值)specifies the lower and upper bounds of portfolio allocations in each ofNumAssetsavailable asset investments.pcalimsspecifies the lower and upper bounds of portfolio allocations in each ofNASSETSavailable asset investments.

Note

Ifpcalimsis called with fewer than two output arguments, the function returnsAconcatenated withb[A,b].

example

[A,b]=P校准(___,NumAssets)除了前面语法中的输入参数外,还使用可选参数指定选项。

Examples

collapse all

Set the minimum weight in every asset to0(no short-selling), and set the maximum weight of IBM stock to0.5and CSCO to0.8, while letting the maximum weight in INTC float.

Minimum weight:

  • IBM — 0

  • INTC — 0

  • CSCO — 0

Maximum weight:

  • IBM — 0.5

  • INTC —

  • CSCO — 0.8

AssetMin = 0
AssetMin = 0
资产最大值= [0.5 NaN 0.8]
资产最大值=1×30.5000 NaN 0.8000
[A,b] = pcalims(AssetMin, AssetMax)
A =5×31 0 0 0 0 1 -1 0 0 0 -1 0 0 0 -1
b类=5×10.5000 0.8000 0 0 0

Portfolio weights of 50% in IBM and 50% in INTC satisfy the constraints

Set the minimum weight in every asset to0最大重量1.

Minimum weight:

  • IBM — 0

  • INTC — 0

  • CSCO — 0

Maximum weight:

  • IBM — 1

  • INTC — 1

  • CSCO — 1

AssetMin = 0
AssetMin = 0
资产最大值= 1
资产最大值= 1
NumAssets = 3
NumAssets = 3
[A,b] = pcalims(AssetMin, AssetMax, NumAssets)
A =6×31 0 0 0 1 0 0 0 1 -1 0 0 0 -1 0 0 0 -1
b类=6×11 1 1 0 0 0

Portfolio weights of 50% in IBM and 50% in INTC satisfy the constraints.

Input Arguments

collapse all

Minimum allocations in each asset, specified as a scalar numeric orNASSETSvector.NaNindicates no constraint.

Data Types:double

Maximum allocations in each asset, specified as a scalar numeric orNASSETSvector.NaNindicates no constraint.

Data Types:double

(Optional) Number of assets, specified as a scalar numeric.

Data Types:double

Output Arguments

collapse all

Lower bound, returned as a matrix such thatA*PortWts' <= b, wherePortWtsis a1-by-NASSETSvector of asset allocations.

Upper bound, returned as a vector such thatA*PortWts' <= b, wherePortWtsis a1-by-NASSETSvector of asset allocations.

Introduced before R2006a