Main Content

Portfolio Optimization Functions

The portfolio optimization functions assist portfolio managers in constructing portfolios that optimize risk and return.

资本配置 Description

Portalloc

Computes the optimal risky portfolio on the efficient frontier, based on the risk-free rate, the borrowing rate, and the investor's degree of risk aversion. Also generates the capital allocation line, which provides the optimal allocation of funds between the risky portfolio and the risk-free asset.

Efficient Frontier Computation Description

frontcon

为给定的一组资产计算沿高效边界的投资组合。该计算基于代表每个资产的最大和最小权重的一组,以及指定资产组的最大和最小权重。

Warning

frontconhas been removed. UsePortfolioinstead. For more information on migratingfrontconcode toPortfolio, seefrontcon Migration to Portfolio Object.

边境

为给定的一组资产计算沿高效边界的投资组合。Generates a surface of efficient frontiers showing how asset allocation influences risk and return over time.

portopt

为给定的一组资产计算沿高效边界的投资组合。The computation is based on a set of user-specified linear constraints. Typically, these constraints are generated using the constraint specification functions described below.

Warning

portopthas been partially removed and will no longer acceptConSet或者vararginarguments.portoptwill only solve the portfolio problem for long-only fully invested portfolios. UsePortfolioinstead. For more information on migratingportoptcode toPortfolio, seeportopt Migration to Portfolio Object.

Constraint Specification Description

portcons

Generates the portfolio constraints matrix for a portfolio of asset investments using linear inequalities. The inequalities are of the typea*wts'<= b, whereWtsis a row vector of weights.

portvrisk

Portfolio value at risk (VaR) returns the maximum potential loss in the value of a portfolio over one period of time, given the loss probability levelRiskThreshold.

pcalims

Asset minimum and maximum allocation. Generates a constraint set to fix the minimum and maximum weight for each individual asset.

pcgcomp

Group-to-group ratio constraint. Generates a constraint set specifying the maximum and minimum ratios between pairs of groups.

pcglims

Asset group minimum and maximum allocation. Generates a constraint set to fix the minimum and maximum total weight for each defined group of assets.

PCPVAL

Total portfolio value. Generates a constraint set to fix the total value of the portfolio.

Constraint Conversion Description

abs2active

Transforms a constraint matrix expressed in absolute weight format to an equivalent matrix expressed in active weight format.

Active2ABS

Transforms a constraint matrix expressed in active weight format to an equivalent matrix expressed in absolute weight format.

Note

An alternative to using these portfolio optimization functions is to 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, see投资组合对象工作流程.

See Also

|||||||||||

Related Examples

More About