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

 

Function index Version 3.0.0

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

Excel=apaMeanVariance.Restricted.Bounded.Weights.MVP(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 minimum variance portfolio with optional linear equality and inequality constraints and an optional quadratic constraint w'Q*w <= c.

Syntax

Covariances: n x n covariance matrix. Singular matrices are allowed if the efficient portfolios are unique, e.g. zero-variance cash assets

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, which is #N/A because the function has no expected returns argument, and the n constituent weights; FALSE returns the 1 x n weights only; default: FALSE

Algorithm

Without a quadratic constraint, the minimum variance portfolio is calculated with the critical line algorithm (generalized to linear equality and inequality constraints if supplied, following Niedermayer and Niedermayer) using zero expected returns, so that the frontier collapses to the minimum variance portfolio.

With Q and c, the minimum variance portfolio of the linear problem is returned if it satisfies the quadratic constraint. Otherwise, the trace-normalized matrix (1 - θ)Σ + θQ is minimized subject to the bounds, the exposure constraint and the optional linear constraints, with θ found by a safeguarded secant search such that w'Q*w = c, which gives the exact constrained minimum variance portfolio.

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."