apaMeanVariance.Restricted.Bounded.Frontier.Axb.xQxc(nPortfolios, ExpectedReturns, Covariances, LowerBounds, UpperBounds, PortfolioExposure, A, b, LowerPickMatrix, LowerValues, UpperPickMatrix, UpperValues, Q, c)
=apaMeanVariance.Restricted.Bounded.Frontier.Axb.xQxc(nPortfolios, ExpectedReturns, Covariances, LowerBounds, UpperBounds, PortfolioExposure, A, b, LowerPickMatrix, LowerValues, UpperPickMatrix, UpperValues, Q, c)Result
Calculates the bounded mean-variance efficient frontier with a quadratic constraint w'Q*w <= c and optional linear equality and inequality constraints, using the quadratic critical line algorithm. Columns: volatility, return and constituent weights of nPortfolios frontier portfolios, from the minimum variance to the maximum return portfolio.
Syntax
nPortfolios: number of frontier portfolios to calculate, equally spaced in expected return from the minimum variance to the maximum return portfolio (at least 2)
ExpectedReturns: 1 x n vector with expected constituent returns
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: 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
c: 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
Algorithm
The quadratic constraint is handled by an exact homotopy: for θ in [0, 1], the critical line algorithm is applied to the trace-normalized matrix (1 - θ)Σ + θQ, subject to the bounds, the exposure constraint and the optional linear constraints. For each of the nPortfolios expected returns, equally spaced between the minimum variance return rMin and the maximum return rMax, the frontier portfolio of θ = 0 (no quadratic constraint) is used where the quadratic constraint is slack. Otherwise θ is bracketed and found by a safeguarded secant search such that w'Q*w = c at the target return, which gives the exact optimum of the constrained problem; θ/(1 - θ) is the multiplier of the quadratic constraint. The minimum variance and maximum return portfolios are determined taking the quadratic constraint into account. The variance V(r) of the constrained frontier portfolio with expected return r is convex and non-decreasing between rMin and rMax.
Remarks
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.
If the minimum variance and the maximum return portfolio have the same expected return, a single row is returned. Without a quadratic constraint, use apaMeanVariance.Restricted.Bounded.Frontier.Axb, which returns the corner portfolios and nPointsInbetween portfolios between adjacent corner portfolios.
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.
The function is non-volatile.
Pressing Esc aborts the calculation; the function then returns "Calculation aborted by user."
