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  ) has been studied from many different perspectives. The problem is essential to minimize the variance of a linearly combined set of correlated random variables (returns), conditioned on the mean of these variables, with a constraint on the scalers or weights. The set of all such points is called the efficient frontier, i.e. the minimum variance envelope. The modern expression of the optimization problem outlined by Markowitz is due to Merton  who derives the solutions analytically using linear algebra. His solution considers the problem as a quadratic programming problem with two predefined linear constraints, the weight constraint (scalar constraint) and the expected return constraint (the mean). The statement of the problem is as follows. Matrices and vectors are in boldface.
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.
However, the problem can also be solved with a general linear constraint as demonstrated by Best and Grauer  . The general linear constraint opens up possibilities to make considerations for and constraints on portfolio beta, sector or industry weights, multi-stage optimization, etc. I derive the solution to the general linear constraint problem in part 2 of this essay to familiarize the reader with my notation and so I can use it in my derivation of the maximum Sharpe Ratio problem.
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  revisit the problem of multiple external agents relaxing the assumption about the certainty of the agents’ risk appetites and conclude that serious inefficiency exists without this assumption. Blake et al.  use the BBK framework and apply it to the delegated relationships in the pension industry and, among many other things, show that the delegated incentive is pervasive in professional investment management. Cuoco and Kaniel  analyze the linkage between compensation contracts and excess performance in delegated portfolio management. However, the delegated contracting problem can probably best be summed up by analyzing the tracking error constraint.
The first to analyze a constraint to tracking error in the context of a Markowitz portfolio choice model was Roll  . In this paper, Roll demonstrates the differences in portfolio choice for a decision-maker optimizing over variance versus one optimizing over tracking error. In a further refinement, Jorion  , applies a tracking error constraint to a mean/variance optimization problem, thus introducing a quadratic constraint into the problem. Whereas the Markowitz problem, under linear constraints, forms a minimum variance set shaped like a parabola in mean and variance, the tracking error constraint causes the efficient set to be shaped like an ellipse, with the feasible portfolios inside. See Figure 1 for a visual example of these curves.
The closest application of a utility problem directly to Roll’s TEV frontier by Bertrand  . In this paper, he considers the problem of a fixed risk aversion constraint in mean/variance and its ability to generate preferred portfolios.
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, , and decreases in the expected risk or variance, . And, the parameter, a, measures the sensitivity or the tradeoff: the level of risk aversion. The relationship is expressed as follows:
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.  optimize over semivariance but the model is adjusted to account for uncertainty in variable estimation based on historical data. Or authors may use modern techniques to analyze traditional problems like Kar et al.  that optimizes over the Sharpe Ratio and the Value at Risk simultaneously. These papers are very interesting and practical considerations for real world applications of this theory.
The primary contribution of this essay is in solving the problem proposed by Jorion  , optimizing with a tracking error constraint, under the conditions of the general linear constraint of Best and Grauer  . This expands and unifies two important developments in the mathematical analysis of the original Markowitz portfolio optimization model. I solve this problem with both a variance optimization approach and a utility maximization approach. The remainder of this paper precedes as follows. In section 2, I revisit the Best and Grauer  analysis with only a general linear constraint. In section 3, I derive the solution to the problem with the addition of a quadratic constraint (the tracking error constraint). This section contains this paper’s primary contribution and is a significant development in the ability to apply the general linear constraint to analyze modern delegated contracting with constraints and considerations to relative risk. In section 4, I consider an alternative utility function, the maximization of the Sharpe Ratio, Sharpe  , given these constraints. Lastly, section 5 concludes and suggests potential paths of future research.
Figure 1. Optimal sets in mean/standard deviation space given differing constraints. This figure depicts mean/standard deviation space. The three curves open to the right are hyperbolas. They are solutions to quadratic programming problems with linear constraints. Notably, if the horizontal axis were in variance, these would be parabolas, and the circular shape would be an ellipse. The furthest curve to the left is the minimum variance envelope derived my Markowitz  . The next curve is a Markowitz minimization problem with additional linear constraints (a beta constraint in this case). The point labeled Benchmark is a portfolio that an arbitrary delegated investment manager would be given. The curve passing through the benchmark is the minimum tracking error curve, the TEV Frontier, derived by Roll  . The ellipse is the optimization of the Markowitz problem subject to tracking error constraint (a quadratic constraint) as proposed in Jorion  .
Figure 2. Optimal sets in mean/standard deviation space given differing constraints. This figure depicts mean/standard deviation space. The dotted lines represent the iso-utility curves associated with maximizing a utility function in this space when subject to a few of the constraints discussed in this paper. The leftmost curve and the highest iso-utility curve is the standard Markowitz  optimization. The next highest is the optimization when subject to a tracking error volatility constraint as discussed in Jorion  , and the lowest is subject to tracking error optimization (rather than standard deviation optimization) as in Roll  . Depending on the level of risk aversion, i.e. the “slope” of the iso-utility relationships, the choice along the TEV Frontier and the TEV Ellipse can result in situations where the utility curves flip-flop, making one higher than the other. The Markowitz optimization, however, is always the highest.
2. Mean/Variance Optimization with a General Linear Constraint
The general linear constraint problem analyzed in Best and Grauer  comes in two forms, variance minimization given linear constraints and utility maximization given linear constraints. Although these problems are already solved, I repeat this calculation to familiarize the reader with my notation and so I can refer to my solutions throughout the paper. Additionally, I leave the expressions in the purest form possible, without making extraneous substitution. As before, the notation used throughout this paper is as follows:
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.
2.1. Minimize Variance with a General Linear Constraint
The variance function with a weight vector and a covariance matrix is . We want to minimize this function given a general linear constraint on the weights as follows:
We introduce a new vector, , to use as Lagrange multipliers:
- k × 1 vector of Lagrange multipliers.
The Lagrangian is:
We differentiate the Lagrangian and set it equal to zero to find the critical values:
Solving for the weight vector yields:
Next, we plug this weight vector into the condition to solve for the Lagrange multipliers:
Plugging this value into the expression for the weight vector above reveals the optimal weight vector given the general linear constraint:
This is a beautiful expression without substitution. We can apply this to the variance function to calculate the variance given the constraints:
This is an equally beautiful expression. To solve this with the Markowitz constraints from Equation (1.1), we would make:
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:
2.2. Maximize Utility with a General Linear Constraint
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:
We set up the Lagrangian:
Table 1. Numerical values used to build the figures.
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:
Solve for the weight vector:
Reapply the constraint condition to calculate :
And lastly, plug into the weight vector, do some rearranging, and this yields the optimal weights:
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.
2.3. Optimize in Excess Return/Tracking Error
The problem proposed by Roll  suggests that delegated managers optimize in excess return/tracking error volatility (TEV) rather than mean/variance. The solutions to these problems are identical to the solutions derived in sections 2.1 and 2.2 albeit with a different weight vector and different constraints. We need to introduce another weight vector into the process:
b - n × 1 constant vector of weights (for a benchmark).
Tracking error variance and excess return are then defined as follows:
- Tracking error variance (TEV).
- 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:
And, the weight vector that solves a utility maximization problem:
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:
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, , in order to draw the curves appropriately. See Figure 3 for a representation of these curves drawn in tracking error space.
3. Optimize with an Additional Tracking Error Constraint
The variance optimization problem given a tracking error constraint was originally solved in the context of portfolio choice in Jorion  . In this framework, he used the standard Markowitz constraints, the length of the weight vector and the weighted average expected return, to derive an ellipse in mean/variance space inside of which contains all portfolios with tracking error less than the constraint. In this section, which is the primary contribution of this essay, I derive “Jorion’s ellipse” with the general linear constraint of Best and Grauer  . This contribution unifies the analysis of linear constraints on the portfolio optimization model and the significance of relative portfolio optimization to modern delegated contracting. The closed-form nature of these solutions gives analysts a conceptual, theoretical framework to perform comparative analysis without having to rely on numerical simulation.
Figure 3. Optimal sets in excess return and tracking error given differing constraints. This figure depicts tracking error volatility/expected excess return space. The dotted lines represent iso-utility curves associated with maximizing a utility function subject to the constraints discussed in this paper. The TEV frontier from Roll  is the left-most curve and is touches the axis at the origin, where the benchmark plots. This is a degenerate hyperbola in this space. The rightmost curve is where the Markowitz efficient frontier plots in this space. The ellipse from previous figures is now a vertical line at the location of the tracking error constraint. This example shows how the tracking error constraint affects utility optimization when compared to the unconstrained choice.
3.1. Optimize Var with General Linear and Tracking Error Constraints
As with before, we will need a couple new variable definitions:
- Tracking error variance constraint.
- Lagrange multiplier for the tracking error constraint.
We, once again, begin by stating the problem:
The Lagrangian then follows:
Next we differentiate by w as set the resulting equations equal to zero:
Solving for w yields the following vector:
Applying the first constraint allows us to calculate one of the Lagrangian terms, :
Substituting back into the vector for w yields:
Because the second condition is easier to calculate if we consider the vector (w – b), we can subtract b from the vector above:
Applying the condition yields the following equation, after some minor simplification:
where , 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:
And the optimal solution for w is obtained by plugging in the constant:
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.
3.2. Optimize Utility Given General Linear & Tracking Error Constraints
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:
The Lagrangian is then set up:
Then it is differentiated and set to zero:
Before moving to the next step, it is convenient to add to both sides:
Then we should solve for w:
Applying the first constraint yields:
And solving for gives the following:
Next we plug back into the equation for w:
Applying the final constraint yields the following after some algebra and cancellation:
Solving for the constant is a simple process:
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:
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.
4. Maximize the Sharpe Ratio with General Linear Constraints
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  and defined below:
is popular even today and assumes a risk free asset, which has expected return, . This ratio is simply the slope of a line connecting the risk free asset to any risky point in the Markowitz feasible set. See Figure 4 for representations of this line.
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.
Figure 4. Maximizing sharpe ratio and the associated iso-utility. This figure depicts mean/standard deviation space. The dotted lines represent the iso-utility curves associated with a linear “Sharpe Ratio” maximization utility function. As one can see, the lines pivot around the risk free asset and depending on the goal, the Sharpe Ratio is the slope of the line. The maximum unconstrained iso-utility curve is the Capital Market Line (CML) and the point where it is tangent to the minimum variance envelope is the Market Portfolio. Also shown is the Sharpe Ratio utility optimized with a constraint to tracking error. It is maximized relative to the Jorion Ellipse. Lastly, the Sharpe Ratio utility associated with the benchmark is depicted.
Maximizing the Sharpe Ratio with a General Linear Constraint
Below 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:
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  , or the two fund theorem. Essentially, a linear combination of any two portfolios on the efficient envelope also resides on the efficient envelope. Thus, the solution to the maximization problem above is a linear combination of any other two portfolios on the efficient set. Therefore, I will use two of the results I already derived, the variance minimization solution, Equation (2.1.1), and the utility maximization solution, Equation (2.2.1).
And, their linear combination is below with weight x:
For simplicity, I define a new weight vector ,
And, the weight vector, w, becomes:
Plugging this vector into our function for S yields:
is particularly convenient because it can be shown that
Thus, S becomes:
Now basic calculus can be applied to find the maximum with respect to x.
And the solution follows easily:
Next, we need to calculate the expected returns and variances to reparametrize the expression into the proper variables and find the constant:
And lastly, plug this constant back into the function for :
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  . I set up the objective function in both variance minimization and utility maximization. Although Jorion solves the variance minimization problem for specific constraints, my method solves the problem with a general constraint. Moreover, Jorion does not derive the utility maximization problem with a tracking error constraint, which I have done in the essay with a general linear constraint.
Additionally, I have revisited the problems of Best and Grauer  and reformulated them so the similarity is more apparent between their solutions and mine. I have discussed how the general constraint matrices need to be set in order to replicate the problems of Markowitz  and Roll  . I use my derivations of the general linear constrained problems to tackle the problem of maximizing the Sharpe Ratio and derive the optimal solution to this problem. Maximizing the Sharpe ratio can be considered an alternative form of utility and is a very important concept in the foundation of linear asset pricing, particularly when a risk free rate is assumed to exist.
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.
 Best, M.J. and Grauer, R.R. (1990) The Efficient Set Mathematics When Mean-Variance Problems Are Subject to General Linear Constraints. Journal of Economics and Business, 42, 105-120.
 Blake, D.A., Rossi, G., Timmermann, A., Tonks, I. and Wermers, R. (2013) Decentralized Investment Management: Evidence from the Pension Fund Industry. The Journal of Finance, 68, 1133-1178.
 Chen, L., Peng, J., Zhang, B. and Rosyida, I. (2017) Diversified Models for Portfolio Selection Based on Uncertain Semivariance. International Journal of Systems Science, 48, 637-648.
 Kar, M.B., Kar, S., Guo, S., Li, X. and Majumder, S. (2019) A New Bi-Objective Fuzzy Portfolio Selection Model and Its Solution through Evolutionary Algorithms. Soft Computing, 23, 4367-4381.