Home   >   User Resources   >   Online Help   >   apaMeanVariance.Restricted.Bounded.Weights.MRP
 

 

Function index Version 3.0.0

apaMeanVariance.Restricted.Bounded.Weights.MRP(ExpectedReturns, Covariances, LowerBounds, UpperBounds, PortfolioExposure, A, b, LowerPickMatrix, LowerValues, UpperPickMatrix, UpperValues, Q, c, DoShowVolRetOtherwiseWeightsOnly)

Excel=apaMeanVariance.Restricted.Bounded.Weights.MRP(ExpectedReturns, Covariances, LowerBounds, UpperBounds, PortfolioExposure, A, b, LowerPickMatrix, LowerValues, UpperPickMatrix, UpperValues, Q, c, DoShowVolRetOtherwiseWeightsOnly)

Result

Returns the 1 x n weights (optionally preceded by the portfolio volatility and expected return) of the restricted and bounded maximum return portfolio with optional linear equality and inequality constraints and an optional quadratic constraint w'Q*w <= c.

Syntax

ExpectedReturns: 1 x n vector with expected constituent returns

Covariances: n x n covariance matrix. With optional constraints, if several portfolios have the maximum expected return, the one with the lowest variance is returned

LowerBounds: 1 x n vector with lower constituent exposure bounds

UpperBounds: 1 x n vector with upper constituent exposure bounds

PortfolioExposure: value of the equality constraint on total portfolio exposure, i.e. the sum of constituent exposures

A: optional; m x n matrix of the linear equality constraints A*w = b, with m the number of equality constraints; supplied together with b; default: no equality constraints

b: optional; vector of the m values of the equality constraints A*w = b, supplied together with A; default: no equality constraints

LowerPickMatrix: optional; mL x n matrix of the inequality constraints LowerPickMatrix*w >= LowerValues, e.g. minimum group weights; supplied together with LowerValues; default: no lower inequality constraints

LowerValues: optional; vector of the mL lower constraint values, supplied together with LowerPickMatrix; default: no lower inequality constraints

UpperPickMatrix: optional; mU x n matrix of the inequality constraints UpperPickMatrix*w <= UpperValues, e.g. maximum group weights or a limit on the short book; supplied together with UpperValues; default: no upper inequality constraints

UpperValues: optional; vector of the mU upper constraint values, supplied together with UpperPickMatrix; default: no upper inequality constraints

Q: optional; n x n symmetric positive semidefinite matrix of the quadratic constraint w'Q*w <= c, e.g. a tracking error covariance matrix, or the identity matrix for a concentration limit; supplied together with c; default: no quadratic constraint

c: optional; upper limit of the quadratic constraint w'Q*w <= c, e.g. the squared tracking error, or 1/(effective number of assets) for Q = identity matrix; supplied together with Q; default: no quadratic constraint

DoShowVolRetOtherwiseWeightsOnly: optional; TRUE returns a 1 x (n + 2) row with the portfolio volatility sqrt(w'Σw), calculated from Covariances and therefore a sample or population volatility as Covariances is, the portfolio expected return e'w, and the n constituent weights; FALSE returns the 1 x n weights only; default: FALSE

Algorithm

Without any optional constraint, the maximum return portfolio is calculated by filling the constituents with the highest expected returns first; Covariances is not used. With linear constraints only, the maximum return portfolio is the last corner portfolio of the critical line algorithm generalized to linear equality and inequality constraints, following Niedermayer and Niedermayer, as in apaMeanVariance.Restricted.Bounded.Frontier.Axb.

With Q and c, the maximum return portfolio of the linear problem is returned if it satisfies the quadratic constraint. Otherwise, the critical line path that minimizes w'Q*w subject to the linear constraints is calculated. If its maximum return portfolio satisfies the quadratic constraint, the result is the maximum return end point of the homotopy described for apaMeanVariance.Restricted.Bounded.Frontier.Axb.xQxc; otherwise it is the point on that path with w'Q*w = c, which is the highest expected return compatible with the quadratic constraint.

Remarks

The results do not depend on the solver: a non-binding quadratic constraint gives the same portfolio as no quadratic constraint, up to round-off.

Each row of a pick matrix defines one constraint, e.g. a row with ones for the equity constituents and zeros elsewhere limits the total equity weight. Leave A and b empty if only inequality constraints are needed. The equality constraints must be linearly independent, and all constraints must be jointly feasible.

With Q equal to the identity matrix, the quadratic constraint limits the Herfindahl concentration index of the weights, i.e. c = 1/N enforces at least N effective assets.

Pressing Esc aborts the calculation; the function then returns "Calculation aborted by user."