MTFRONTIER

Solve for the Mean-Tracking-Error efficient frontier. Optimize for multiple portfolios to evaluate return and risk trade-offs in relative return space (active management).

Description

Solve for multiple mean-tracking-error optimal portfolios on the efficient frontier. Evaluate the return and relative risk tradeoff. The function allows you to specify both linear and non-linear constraints and is able to account for friction penalties (transaction costs).

The convexity of the efficient frontier may not necessarily hold when transaction costs are present.

Syntax

The following describes the function signature for use in Microsoft Excel's formula bar.

=MTFRONTIER(P, mu, sigma, rho, wBenchmark, wInitial, tc, lb, ub, constraints)

Input(s)

ArgumentDescription

P

Required. Number of portfolios to solve for P5P \geq 5.

mu

Required. Vector of expected returns.

sigma

Required. Vector of expected risk.

rho

Required. Correlation matrix.

wBenchmark

Optional. Vector of benchmark weights. This is used to evaluate the utility function in excess return space. If not specified, the function assumes a vector of zeros.

wInitial

Optional. Vector of initial weights (or your current weights). This is used to measure the friction penalties or as a starting point should a numerical approach be necessary. If not specified, it defaults to a vector of zeros.

tc

Optional. Vector of transaction costs. If the argument is not specified, it defaults to a vector of zeros.

lb

Optional. Vector of lower bound limits. If the argument is not specified, it defaults to a vector of zeros.

ub

Optional. Vector of upper bound limits. If the argument is not specified, it defaults to a vector of ones.

constraints

Optional. Matrix of constraints, operator enumeration, and values: [Aopb]\begin{bmatrix}A & op &b\end{bmatrix}

The operator enumeration is represented by op{0:1:=2:op \in \begin{cases} 0: & \leq \\1: & = \\ 2: & \geq \end{cases}

If the argument is not specified, it will default to a fully-funded constraint. i.e. [1,1,,1N,1,1]\begin{bmatrix}1,1,…,1_N​,1,1\end{bmatrix}

Output(s)

The function returns optimal weights ww across NNassets for PPportfolios. The portfolios' expected return, tracking-error, and corresponding optimization's exit flag is appended at the end of the matrix.

output=[w1,1w1,2w1,Kμ1σte1exitFlag1w2,1w2,2w2,Kμ2σte2exitFlag2wN,1wN,2wN,KμNσteNexitFlagN]\text{output} = \begin{bmatrix} w_{1,1} & w_{1,2} & \ldots & w_{1,K} & \mu_1 & \sigma_{te_1} & \text{exitFlag}_1 \\ w_{2,1} & w_{2,2} & \ldots & w_{2,K} & \mu_2 & \sigma_{te_2} & \text{exitFlag}_2 \\ \\ \vdots & \vdots & \ddots & \vdots & \vdots & \vdots & \vdots \\ \\ w_{N,1} & w_{N,2} & \ldots & w_{N,K} & \mu_N & \sigma_{te_N} & \text{exitFlag}_N \end{bmatrix}

The output matrix follows the vector orientation of mu (column / row). If you have specified your inputs as column-vectors, the corresponding output matrix will be transpose of the above.

exitFlagDescription

-2

No feasible solution found. Check your constraints and problem definition.

-1

Unexpected interruption.

0

Number of iterations exceeded.

1

First-order optimality measure is less than tolerance threshold and the constraints were satisfied.

2

Delta in optimal weights is less than the configured numerical step size.

3

Change in the expected utility value is less than the tolerance threshold.

4

Magnitude of search direction was less than the configured threshold.

5

Magnitude of directional derivative in the search direction was less than the configured threshold.

Example

Last updated