_{1}

This paper explores the mathematics behind optimal portfolio construction when relative utility and risk are considered together in a general sense. I derive the portfolio optimization problems when subject to both a general liner constraint and a constraint to tracking error (a quadratic constraint), the most pervasive constraint placed on delegated portfolio managers. This unifies three very influential papers from the evolution of optimal portfolio theory. In addition, I also analyze the general linear constraint when applied to Sharpe Ratio maximization. When applied together, these formulations can allow principals and agents to better analyze alternatives and negotiate contracting in order to ensure that the constraints generate proper utility maximization.

The purpose of this essay is to generalize the Markowitz portfolio choice problem and derive solutions to the variance minimization and utility maximization problems considering both general linear constraints and a single quadratic constraint. The Markowitz portfolio choice problem (introduced in [

w - n × 1 weight vector of the portfolio.

Ω - n × n covariance matrix (symmetric and positive definite).

r - n × 1 vector of expected returns.

1 - n × 1 vector of 1’s.

min w w ′ Ω w s .t . w ′ 1 = 1 and w ′ r = r . (1.1)

However, the problem can also be solved with a general linear constraint as demonstrated by Best and Grauer [

However, since the original introduction of the model, modern thinking on portfolio construction (and financial theory in general) has evolved to consider the differences in incentives between the individual making the portfolio choices, the agent, and the individual hiring the delegated manager, the principal. This spawned a theory of active portfolio management, or delegated portfolio management, which centers on a time series of excess returns, essentially the returns of a security or portfolio in excess of a benchmark. This is a space transformation that causes agents to optimize in excess return space rather than raw return space (or even another excess return space with a different benchmark). Principals are then potentially motivated to constrain agent behavior in this space by putting limits on the variance of the delegated manager’s excess return, i.e. their tracking error variance.

There are many modern examples of papers analyzing delegated or relative problems. Bisburgen, Brandt, and Koijen [

The first to analyze a constraint to tracking error in the context of a Markowitz portfolio choice model was Roll [

The closest application of a utility problem directly to Roll’s TEV frontier by Bertrand [

The variance minimization problem is one approach to analyzing portfolio choice. However, it is also reasonable to consider the problem of maximizing utility. The popular utility function considered in this problem is a “quadratic-style” utility where the investor’s utility increases in the expected return, w ′ r , and decreases in the expected risk or variance, w ′ Ω w . And, the parameter, a, measures the sensitivity or the tradeoff: the level of risk aversion. The relationship is expressed as follows:

max w w ′ r − a w ′ Ω w (1.2)

Modern extensions of the Markowitz portfolio choice problem tend to focus more on altering something fundamental about the model or analyzing a specific constraint. For example, Chen et al. [

The primary contribution of this essay is in solving the problem proposed by Jorion [

The general linear constraint problem analyzed in Best and Grauer [

w - n × 1 weight vector of the portfolio.

Ω - n × n covariance matrix (symmetric and positive definite).

E - n × k matrix of constraint conditions.

c - 1 × k vector of constraint constants.

The variance function with a weight vector and a covariance matrix is w ′ Ω w . We want to minimize this function given a general linear constraint on the weights as follows:

min w w ′ Ω w s .t . w ′ E = c .

We introduce a new vector, Λ , to use as Lagrange multipliers:

Λ - k × 1 vector of Lagrange multipliers.

The Lagrangian is:

L = w ′ Ω w − ( w ′ E − c ) Λ .

We differentiate the Lagrangian and set it equal to zero to find the critical values:

2 Ω w − E Λ = 0 .

Solving for the weight vector yields:

w = 1 2 Ω − 1 E Λ .

Next, we plug this weight vector into the condition to solve for the Lagrange multipliers:

w ′ E = 1 2 Λ ′ E ′ Ω − 1 E = c .

Λ = 2 ( E ′ Ω − 1 E ) − 1 c ′ .

Plugging this value into the expression for the weight vector above reveals the optimal weight vector given the general linear constraint:

w = Ω − 1 E ( E ′ Ω − 1 E ) − 1 c ′ . (2.1.1)

This is a beautiful expression without substitution. We can apply this to the variance function to calculate the variance given the constraints:

w ′ Ω w = c ( E ′ Ω − 1 E ) − 1 c ′ .

This is an equally beautiful expression. To solve this with the Markowitz constraints from Equation (1.1), we would make:

E = [ 1 r ] ,

and

c = [ 1 r ] .

E is essentially an augmented matrix with a column of 1s and a column of expected returns for each security. c is a 2 × 1 matrix where the constraint on the top represents the sum of all the weights equaling 1 and the bottom r representing the sum of all the weights times the expected returns equaling a target weight, the weighted average expected return. The expression of the Markowitz minimum variance envelope with these constraints is:

w ′ Ω w = [ 1 r ] ′ [ [ 1 r ] ′ Ω − 1 [ 1 r ] ] − 1 [ 1 r ] .

And, we can vary the constraint, r, to trace out the entire frontier as depicted in

The utility function in Equation (1.2) can also be computed with a general linear constraint. This form of utility is particularly convenient because it is expressed as a quadratic programming problem. We introduce a new constant into this utility, the risk aversion level, which is essentially the slope of the utility function (in variance) and reintroduce the return vector:

a - level of risk aversion.

r - n × 1 vector of expected returns.

The problem is as follows:

max w w ′ r − a w ′ Ω w s .t . w ′ E = c .

We set up the Lagrangian:

L = w ′ r − a w ′ Ω w − ( w ′ E − c ) Λ .

r | b | Ω | |||
---|---|---|---|---|---|

0.06 0.10 0.13 0.04 | 0 1 0 0 | 0.0111 0.0064 0.0052 0.0013 | 0.0064 0.0184 0.0095 0.0084 | 0.0052 0.0095 0.0178 0.0068 | 0.0013 0.0084 0.0068 0.0125 |

Every figure and calculation done in this paper were built with these three matrices. These values were chosen somewhat arbitrarily for ease of exposition. The final examples are mildly representative of a realistic scenario even though the values are not calculated from real world data.

Differentiate the function and set the conditions to zero:

r − 2 a Ω w − E Λ = 0 .

Solve for the weight vector:

w = 1 2 a Ω − 1 ( r − E Λ ) .

Reapply the constraint condition to calculate Λ :

w ′ E = 1 2 a ( r − E Λ ) ′ Ω − 1 E = c .

Λ = ( E ′ Ω − 1 E ) − 1 ( E ′ Ω − 1 r − 2 a c ′ ) .

And lastly, plug Λ into the weight vector, do some rearranging, and this yields the optimal weights:

w = Ω − 1 E ( E ′ Ω − 1 E ) − 1 c ′ + 1 2 a Ω − 1 ( r − E ( E ′ Ω − 1 E ) − 1 E ′ Ω − 1 r ) . (2.2.1)

This expression is messier than above but after the rearranging, one can see that the final solution in Equation (2.2.1) is simply the minimum variance solution from Equation (2.1.1) shifted by an additional term.

The problem proposed by Roll [

b - n × 1 constant vector of weights (for a benchmark).

Tracking error variance and excess return are then defined as follows:

( w − b ) ′ Ω ( w − b ) - Tracking error variance (TEV).

( w − b ) ′ r - Excess return.

Since b is a constant vector, we could substitute it into any of the expressions in 2.1 and 2.2 and still have a valid derivation. Thus, similar to Equation (2.1.1), the weight vector that solves the TEV minimization problem:

min w ( w − b ) ′ Ω ( w − b ) s .t . ( w − b ) ′ E = c .

is:

( w − b ) = Ω − 1 E ( E ′ Ω − 1 E ) − 1 c ′ . (2.3.1)

And, the weight vector that solves a utility maximization problem:

max w ( w − b ) ′ r − a ( w − b ) ′ Ω ( w − b ) s .t . ( w − b ) ′ E = c .

is:

( w − b ) = Ω − 1 E ( E ′ Ω − 1 E ) − 1 c ′ + 1 2 a Ω − 1 ( r − E ( E ′ Ω − 1 E ) − 1 E ′ Ω − 1 r ) . (2.3.2)

Because we are in excess return space, the constraints on this problem need to change slightly. To replicate the solutions in Roll (1992), the constraint vector needs to be set as follows:

c = [ 0 r w − r b ] .

Taken the two vectors, w and b, which should each normalize to 1, their difference is 0. Also the second constraint is now the excess return constraint, r w − r b , in order to draw the curves appropriately. See

The variance optimization problem given a tracking error constraint was originally solved in the context of portfolio choice in Jorion [

As with before, we will need a couple new variable definitions:

T 2 - Tracking error variance constraint.

λ - Lagrange multiplier for the tracking error constraint.

We, once again, begin by stating the problem:

min w w ′ Ω w s .t . w ′ E = c , ( w − b ) ′ Ω ( w − b ) = T 2 .

The Lagrangian then follows:

L = w ′ Ω w − ( w ′ E − c ) Λ − λ ( ( w − b ) ′ Ω ( w − b ) − T 2 ) .

Next we differentiate by w as set the resulting equations equal to zero:

2 Ω w − E Λ − λ ( 2 Ω w − 2 Ω b ) = 0 .

Solving for w yields the following vector:

w = 1 2 ( 1 − λ ) Ω − 1 ( E Λ − 2 λ Ω b ) .

Applying the first constraint allows us to calculate one of the Lagrangian terms, Λ :

w ′ E = 1 2 ( 1 − λ ) ( Λ ′ E ′ − 2 λ b ′ Ω ) Ω − 1 E = c .

Λ = ( E ′ Ω − 1 E ) − 1 ( 2 ( 1 − λ ) c ′ + 2 λ E ′ b ) .

Substituting Λ back into the vector for w yields:

w = Ω − 1 E ( E ′ Ω − 1 E ) − 1 c ′ + λ 1 − λ ( Ω − 1 E ( E ′ Ω − 1 E ) − 1 E ′ b − b ) .

Because the second condition is easier to calculate if we consider the vector (w – b), we can subtract b from the vector above:

( w − b ) = ( Ω − 1 E ( E ′ Ω − 1 E ) − 1 c ′ − b ) + λ 1 − λ ( Ω − 1 E ( E ′ Ω − 1 E ) − 1 E ′ b − b ) .

Applying the condition yields the following equation, after some minor simplification:

( w − b ) ′ Ω ( w − b ) = ( λ 1 − λ ) 2 ( σ b 2 − b ′ E ( E ′ Ω − 1 E ) − 1 E ′ b ) + 2 ( λ 1 − λ ) ( σ b 2 − b ′ E ( E ′ Ω − 1 E ) − 1 E ′ b ) + c ( E ′ Ω − 1 E ) − 1 c ′ − 2 b ′ E ( E ′ Ω − 1 E ) − 1 c ′ + σ b 2 = T 2 .

where σ b 2 = b ′ Ω b , the variance of the benchmark.

Lastly, after some profuse and tedious elementary algebra, and an application of the quadratic equation, the constant can be solved for:

( λ 1 − λ ) = − 1 ± ( 1 − ( c + 2 b ′ E ) ( E ′ Ω − 1 E ) − 1 c ′ − σ b 2 + T 2 σ b 2 − b ′ E ( E ′ Ω − 1 E ) − 1 E ′ b ) 1 / 2 .

And the optimal solution for w is obtained by plugging in the constant:

w = Ω − 1 E ( E ′ Ω − 1 E ) − 1 c ′ − ( 1 ± ( 1 − ( c + 2 b ′ E ) ( E ′ Ω − 1 E ) − 1 c ′ − σ b 2 + T 2 σ b 2 − b ′ E ( E ′ Ω − 1 E ) − 1 E ′ b ) 1 / 2 ) ⋅ ( Ω − 1 E ( E ′ Ω − 1 E ) − 1 E ′ b − b ) . (3.1.1)

This weight vector is the solution to the problem of optimizing variance given a general linear and a tracking error constraint. Additionally, as before, this vector is a transformation of the general minimum variance solution shifted by a term in two directions. The ± draws out half of the curve in one direction and the other half in the other direction. The linear constraints in combination with the tracking error constraint can cause there to be an infinite number, two, one or no real solutions to the problem. It is certainly notable that the two constraints can work in conflict and generate imaginary vectors. Essentially, if the linear constraints generate a curve that doesn’t pass through the tracking error constrained ellipse, then there will be no real solutions to this problem.

The utility optimization problem can also be important to principals. Knowing the best possible outcome given a tracking error constraint could be a useful metric when deciding how strict to make this constraint. No new variables are needed. The statement of the problem is as follows:

max w w ′ r − a w ′ Ω w s .t . w ′ E = c , ( w − b ) ′ Ω ( w − b ) = T 2 .

The Lagrangian is then set up:

L = w ′ r − a w ′ Ω w − ( w ′ E − c ) Λ − λ ( ( w − b ) ′ Ω ( w − b ) − T 2 ) .

Then it is differentiated and set to zero:

r − 2 a Ω w − E Λ − 2 λ ( Ω w − Ω b ) = 0 .

Before moving to the next step, it is convenient to add 2 a Ω b to both sides:

r − 2 a ( Ω w − Ω b ) − E Λ − 2 λ ( Ω w − Ω b ) = 2 a Ω b .

Then we should solve for w:

w = 1 2 ( a + λ ) Ω − 1 ( r − 2 a Ω b − E Λ ) + b .

Applying the first constraint yields:

w ′ E = 1 2 ( a + λ ) ( r ′ − 2 a Ω b − E Λ ) ′ Ω − 1 E + b ′ E = c .

And solving for Λ gives the following:

Λ = ( E ′ Ω − 1 E ) − 1 ( E ′ Ω − 1 r − 2 a E ′ b − 2 ( a + λ ) ( c ′ − E ′ b ) ) .

Next we plug Λ back into the equation for w:

( w − b ) = ( 1 2 ( a + λ ) ) Ω − 1 ( ( r − 2 a Ω b ) − E ( E ′ Ω − 1 E ) − 1 E ′ Ω − 1 ( r − 2 a Ω b ) ) + Ω − 1 E ( E ′ Ω − 1 E ) − 1 ( c ′ − E ′ b ) .

Applying the final constraint yields the following after some algebra and cancellation:

( w − b ) ′ Ω ( w − b ) = ( 1 2 ( a + λ ) ) 2 ( r − 2 a Ω b ) ′ ( Ω − 1 − Ω − 1 E ( E ′ Ω − 1 E ) − 1 E ′ Ω − 1 ) ( r − 2 a Ω b ) + ( c − b ′ E ) ( E ′ Ω − 1 E ) − 1 ( c ′ − E ′ b ) = T 2 .

Solving for the constant is a simple process:

( 1 2 ( a + λ ) ) = ± ( T 2 − ( c − b ′ E ) ( E ′ Ω − 1 E ) − 1 ( c ′ − E ′ b ) ( r − 2 a Ω b ) ′ ( Ω − 1 − Ω − 1 E ( E ′ Ω − 1 E ) − 1 E ′ Ω − 1 ) ( r − 2 a Ω b ) ) 1 / 2 .

And plugging this back into the equation for w yields the optimal weight vectors for utility when it is constrained by a general linear constraint and a tracking error constraint:

w = Ω − 1 E ( E ′ Ω − 1 E ) − 1 c ′ − Ω − 1 E ( E ′ Ω − 1 E ) − 1 E ′ b + b ± ( T 2 − ( c − b ′ E ) ( E ′ Ω − 1 E ) − 1 ( c ′ − E ′ b ) ( r − 2 a Ω b ) ′ ( Ω − 1 − Ω − 1 E ( E ′ Ω − 1 E ) − 1 E ′ Ω − 1 ) ( r − 2 a Ω b ) ) 1 / 2 ⋅ Ω − 1 ( ( r − 2 a Ω b ) − E ( E ′ Ω − 1 E ) − 1 E ′ Ω − 1 ( r − 2 a Ω b ) ) . (3.2.1)

One can see that this solution is also a shift from the minimum variance portfolio. Also, because the utility function is a parabola and the feasible set is an ellipse, the ± gives two solutions, one for the utility minimization problem and one for the utility maximization problem. This problem suffers from the same concerns regarding conflicting constraints. It is possible for this problem to have no real solutions if the constraints are chosen carelessly.

With the introduction of the Capital Asset Pricing Model, finance theory went the direction of assuming a risk free asset when analyzing linear asset pricing problems. The Sharpe Ratio, introduced in Sharpe [

Sharpe Ratio = w ′ r − r f ( w ′ Ω w ) 1 / 2 ,

is popular even today and assumes a risk free asset, which has expected return, r f . This ratio is simply the slope of a line connecting the risk free asset to any risky point in the Markowitz feasible set. See

Maximizing the slope of this line in mean/variance space generates what is known as the Capital Market Line (CML) and its intersection with the minimum variance envelope is called the market portfolio.

The problem with the risk free asset in the context of a general solution to the variance minimization problem is that the covariance matrix, Ω , is no longer invertible because the risk free asset creates a row and column of zeros. Thus, Equation (2.1.1) is not a valid solution in this scenario. Finding the CML under the standard linear constraints of portfolio optimization is rather straight forward but with a general linear constraint, it becomes slightly more complicated.

Maximizing the Sharpe Ratio with a General Linear ConstraintBelow is the solution to the Sharpe Ratio maximization problem. It is important to note that the solution to the following problem gives the weight vector for what is called the Market Portfolio if the constraints are the standard weight and return constraints. The statement of the problem is below:

max w S = w ′ r − r f ( w ′ Ω w ) 1 / 2 s .t . w ′ E = c .

This formulation doesn’t lend itself well to quadratic programming, so in order to solve it we will use a well-known result called the mutual fund theorem, from Merton [

w ∗ = Ω − 1 E ( E ′ Ω − 1 E ) − 1 c ′ .

w U = Ω − 1 E ( E ′ Ω − 1 E ) − 1 c ′ + Ω − 1 ( r − E ( E ′ Ω − 1 E ) − 1 E ′ Ω − 1 r ) .

And, their linear combination is below with weight x:

w = ( 1 − x ) w ∗ + x w U .

For simplicity, I define a new weight vector w H ,

w H = w U − w ∗ = Ω − 1 ( r − E ( E ′ Ω − 1 E ) − 1 E ′ Ω − 1 r ) .

And, the weight vector, w, becomes:

w = w ∗ + x w H .

Plugging this vector into our function for S yields:

S = w ′ ∗ r + x w ′ H r − r f ( w ′ ∗ Ω w ∗ − 2 x w ′ ∗ Ω w H + x 2 w ′ H Ω w H ) 1 / 2 .

w H is particularly convenient because it can be shown that

w ′ ∗ Ω w H = c ( E ′ Ω − 1 E ) − 1 E ′ Ω − 1 r − c ( E ′ Ω − 1 E ) − 1 E ′ Ω − 1 r = 0.

Thus, S becomes:

S = w ′ ∗ r + x w ′ H r − r f ( w ′ ∗ Ω w ∗ + x 2 w ′ H Ω w H ) 1 / 2 .

Now basic calculus can be applied to find the maximum with respect to x.

d S d x = − x w ′ H Ω w H ⋅ ( w ′ ∗ r − r f ) − w ′ H r ⋅ w ′ ∗ Ω w ∗ ( w ′ ∗ Ω w ∗ + x 2 w ′ H Ω w H ) 3 / 2 = 0.

And the solution follows easily:

x = w ′ H r ⋅ w ′ ∗ Ω w ∗ w ′ H Ω w H ⋅ ( w ′ ∗ r − r f ) .

Next, we need to calculate the expected returns and variances to reparametrize the expression into the proper variables and find the constant:

x = r ′ Ω r − r ′ Ω E ( E ′ Ω − 1 E ) − 1 E ′ Ω − 1 r r ′ Ω r − r ′ Ω E ( E ′ Ω − 1 E ) − 1 E ′ Ω − 1 r ⋅ c ( E ′ Ω − 1 E ) − 1 c ′ c ( E ′ Ω − 1 E ) − 1 E ′ Ω − 1 r − r f = c ( E ′ Ω − 1 E ) − 1 c ′ c ( E ′ Ω − 1 E ) − 1 E ′ Ω − 1 r − r f .

And lastly, plug this constant back into the function for w = w ∗ + x w H :

w = Ω − 1 E ( E ′ Ω − 1 E ) − 1 c ′ + ( c ( E ′ Ω − 1 E ) − 1 c ′ c ( E ′ Ω − 1 E ) − 1 E ′ Ω − 1 r − r f ) ⋅ Ω − 1 ( r − E ( E ′ Ω − 1 E ) − 1 E ′ Ω − 1 r ) . (4.1.1)

Thus, this is the weight vector that maximizes the Sharpe Ratio given a general linear constraint, or equivalently, if the constraints are the standard Markowitz constraints, this is the weight vector of the market portfolio. It is expressed in the familiar and convenient form of a shift to the minimum variance weight vector.

In this paper, I derive the solutions to portfolio choice problems with a general linear constraint when they are also subject to a tracking error constraint. The primary method used to derive the solutions is quadratic programming. This essay connects the research of some of the most fundamental papers in the field of portfolio choice and generalizes a solution to the Tracking Error Volatility constraint problem of Jorion [

Additionally, I have revisited the problems of Best and Grauer [

There are limitations to empirical research given these derivations. Real world data is oftentimes too volatile to apply the methods of modern portfolio theory directly. These derivations are best used as a conceptual framework to make theoretical assertions about the behavior of investment managers. The implications from these theories can, however, be creatively tested and existing empirical data can be used to discover nuances of the decision-making or real world investment managers. One example in particular that this model exposes is that managers that are incentivized by relative risk and return metrics will usually build portfolios that are riskier than a principal would desire. Although these equations likely couldn’t test that. This result could be tested in numerous other ways.

There are many other examples of constrained portfolio choice problems that fall into the framework outlined in this paper. Although my final expressions are cumbersome, they are also left in their purist form so the reader can see the form unobstructed by substitution. The general linear constraint is very useful when considering real world constraints to asset management, and the tracking error constraint is a pervasive, explicit and implicit constraint to which almost all asset managers abide. This paper will hopefully allow researchers to compare the effects of differing constraints on portfolios in a more approachable manner, with the solutions readily available.

The author declares no conflicts of interest regarding the publication of this paper.

Stowe, D.L. (2019) Portfolio Mathematics with General Linear and Quadratic Constraints. Journal of Mathematical Finance, 9, 675-690. https://doi.org/10.4236/jmf.2019.94034