PORTFOLIO THEORY โ€“ LECTURE NOTES 1 Dr. Andrea Rigamonti MEAN-VARIANCE OPTIMIZATION From an economistโ€™s point of view, an investor that optimizes a portfolio is trying to maximize a utility function. An extremely simple utility function is the linear utility function: ๐‘ˆ(๐‘‰) = ๐‘Ž + ๐‘๐‘‰, ๐‘ > 0 where ๐‘ˆ(๐‘‰) is the utility that the investor gets depending on the value ๐‘‰ of the portfolio. This function simply says that the higher the wealth, the higher the utility of the investor. Its shape is a line, and the parameter ๐‘ determines how much the utility increases following a wealth increase. ๐‘ is assumed be positive, otherwise the investor would be indifferent (๐‘ = 0) or less satisfied (๐‘ < 0) when wealth increases. In other words, only the mean return of the portfolio matters. Markowitz (1952) revolutionized the field by adding risk to the equation. His standard approach assumes that an investor cares not only about the mean but also the variance of the portfolio returns, i.e. the investor has a mean-variance utility. Given a certain mean return, the utility increases as the variance (which quantifies risk) gets lower. Equivalently, given a certain level of variance, the utility increases with a higher mean return. The decision in the trade-off between return and risk is quantified by a risk aversion parameter ๐›พ. A higher ๐›พ means that the investor is more risk averse and will therefore require a higher compensation for an increased risk. A lower ๐›พ means the investor has a lower risk-aversion and will be willing to take more risks. In other words, given a set of assets with a certain mean and variance, the lower the ๐›พ of the investor, the more he will create an optimal portfolio with a higher mean return but also a higher variance. To model such preferences, a quadratic utility function is used: ๐‘ˆ(๐‘‰) = ๐‘‰ โˆ’ ๐›พ 2 ๐‘‰2 , ๐›พ > 0 ๐›พ is assumed to be positive so that the utility function is concave: Source: https://financestu.com This implies that the investor is risk-averse. With ๐›พ = 0 the investor would be indifferent to risk, while ๐›พ < 0 would mean that the investor is risk taker (i.e., prefers more risk for the same amount of wealth, which is obviously not realistic). Remember that the expected return of a portfolio is given by ๐œ‡ ๐‘ƒ = ๐’˜โ€ฒ ๐ = ๐‘‰, where ๐’˜ is the vector of portfolio weights and ๐ is the vector of mean return of the single assets. Moreover, recall that the variance is the expected value of the squared deviation from the mean. So, the utility function becomes: ๐‘ˆ(๐’˜) = ๐’˜โ€ฒ๐ โˆ’ ๐›พ 2 ๐’˜โ€ฒโˆ‘๐’˜ Therefore, given a risk-free asset and a set of ๐‘ risky assets with mean returns ๐ and covariance matrix ๐œฎ, and a certain risk aversion coefficient ๐›พ, the investor we are considering wants to select the weights ๐’˜ in a way that maximizes the following utility function: max ๐’˜ ๐’˜โ€ฒ๐ โˆ’ ๐›พ 2 ๐’˜โ€ฒโˆ‘๐’˜ This is an unconstrained optimization problem easy to solve. We just need to set the first-order condition, i.e., take the partial derivative with respect to ๐’˜ and set it equal to zero: ๐œ•๐‘ˆ(๐’˜) ๐œ•๐’˜ = ๐ โˆ’ 2๐›พ 2 โˆ‘๐’˜ = ๐ โˆ’ ๐›พโˆ‘๐’˜ = ๐ŸŽ We then solve for ๐’˜: โˆ‘๐’˜ = 1 ๐›พ ๐ ๐’˜ = 1 ๐›พ โˆ‘โˆ’๐Ÿ ๐ So, the closed-form solution that gives the optimal weights for the risky assets is: ๐’˜ ๐’Ž๐’— = 1 ๐›พ โˆ‘โˆ’๐Ÿ ๐ while the weight for the risk-free asset is equal to 1 โˆ’ ๐’˜ ๐’Ž๐’—โ€ฒ๐Ÿ, where ๐Ÿ is a vector of ones with length equal to the number of risky assets. The resulting optimal expected utility is: ๐‘ˆ(๐’˜ ๐’Ž๐’—) = 1 2๐›พ ๐โ€ฒโˆ‘โˆ’๐Ÿ ๐ Providing a specific value for ๐›พ might be difficult in practice. Moreover, it can be difficult to interpret the meaning of the specific utility value associated with a certain portfolio. While we can say that a portfolio with a certain utility is preferable to another with a lower utility, it is not obvious how good it is in a more general sense. In short, the value itself, in the case of utility, is not very informative. A more intuitive approach is to specify the preferences through a desired mean portfolio return ๐‘…๐‘’ instead of a level of risk aversion. In this case, the goal becomes to minimize the variance given the desired mean return. This is a constrained optimization problem: min ๐’˜ ๐’˜โ€ฒ โˆ‘๐’˜ subject to: ๐’˜โ€ฒ ๐ + (1 โˆ’ ๐’˜โ€ฒ๐Ÿ)๐‘…๐‘“ = ๐‘…๐‘’ In the constraint, ๐’˜โ€ฒ ๐ is the return of the risky assets, and (1 โˆ’ ๐’˜โ€ฒ๐Ÿ)๐‘…๐‘“ is the return of the risk-free asset. Together they give the return of the portfolio, which, as stated, must be equal to ๐‘…๐‘’. To solve this problem, we use the method of Lagrange multipliers. First we need to define the Lagrangian function, i.e., a modified version of the objective function that incorporates the constraint in this way: ๐ฟ(๐’˜, ๐œ†) = ๐’˜โ€ฒ โˆ‘๐’˜ + ๐œ†[๐‘…๐‘’ โˆ’ ๐’˜โ€ฒ ๐ โˆ’ (1 โˆ’ ๐’˜โ€ฒ๐Ÿ)๐‘…๐‘“] where ๐œ† is the Lagrange multiplier. By including this additional term we can now solve an unconstrained problem instead of a constrained one. Therefore, we set the first order conditions for the Lagrangian function. The conditions involve two simultaneous equations, as we have to compute the partial derivative both with respect to ๐’˜ and to ๐œ†. ๐œ•๐ฟ ๐œ•๐’˜ = 2โˆ‘๐’˜ โˆ’ ๐œ†๐ + ๐œ†๐‘…๐‘“ ๐Ÿ = ๐ŸŽ ๐œ•๐ฟ ๐œ•๐œ† = ๐‘…๐‘’ โˆ’ ๐’˜โ€ฒ ๐ โˆ’ (1 โˆ’ ๐’˜โ€ฒ ๐Ÿ)๐‘…๐‘“ = 0 Solving this system for ๐’˜ is somewhat computation intensive, but it gives a closed-form solution. Specifically, the optimal portfolio weights in this case are: ๐’˜ ๐’Ž๐’— = ๐‘…๐‘’ ๐โ€ฒโˆ‘โˆ’๐Ÿ ๐ โˆ‘โˆ’๐Ÿ ๐ In both cases we do not need to explicitly include the risk-free asset in the asset menu, as it is equivalent and simpler to work with excess returns, i.e. with the returns of the risky assets from which we subtracted the risk-free rate. Obviously, it is also possible to specify a given level of variance and maximize the mean return. Mathematically, these are two equivalent optimization problems. However, it is more intuitive and more common to specify the desired mean and minimize the variance. So far we treated the inputs ๐ and โˆ‘ as if they are given, but in practice they need to be estimated. The simplest approach is called plug-in approach: the sample estimates of the inputs are computed from past data, and are then plugged into the optimization problem as if they were the true values. Obviously, this is not really the case, as sample estimates can be poor estimates of the true parameter values. In particular, the estimation error in the sample mean is typically so big that minimizing the variance while ignoring ๐ usually leads to portfolios with a higher Sharpe ratio than those computed via mean-variance optimization. Therefore, the investor might want to compute the global minimum variance portfolio (GMV), also simply called minimum variance portfolio. Obviously, we need to impose the constraint that the sum of the weights of the risky assets is equal to one, which means that nothing is invested in the risk-free asset. Otherwise, everything would be invested in the risk-free asset. Hence, we have to solve the following constrained optimization problem: min ๐’˜ ๐’˜โ€ฒ โˆ‘๐’˜ subject to: ๐’˜โ€ฒ๐Ÿ = 1 We write the Lagrangian function: ๐ฟ(๐’˜, ๐œ†) = ๐’˜โ€ฒ โˆ‘๐’˜ + ๐œ†[1 โˆ’ ๐’˜โ€ฒ๐Ÿ] In order to get a more convenient first order condition, it is common to multiply the first term by 0.5, which does not alter the result. So the Lagrangian becomes: ๐ฟ(๐’˜, ๐œ†) = 1 2 ๐’˜โ€ฒ โˆ‘๐’˜ + ๐œ†[1 โˆ’ ๐’˜โ€ฒ๐Ÿ] The first order conditions are: ๐œ•๐ฟ ๐œ•๐’˜ = โˆ‘๐’˜ โˆ’ ๐œ†๐Ÿ = ๐ŸŽ ๐œ•๐ฟ ๐œ•๐œ† = 1 โˆ’ ๐’˜โ€ฒ ๐Ÿ = 0 Through some simple rearrangement we get: ๐’˜ = ๐œ†โˆ‘โˆ’๐Ÿ ๐Ÿ ๐’˜โ€ฒ ๐Ÿ = 1 In the first equation, we can multiply both sides by ๐Ÿโ€ฒ, obtaining: ๐Ÿโ€ฒ๐’˜ = ๐œ†๐Ÿโ€ฒโˆ‘โˆ’๐Ÿ ๐Ÿ From the second equation we know that: ๐’˜โ€ฒ ๐Ÿ = ๐Ÿโ€ฒ ๐’˜ = 1 Hence, the first equation becomes: 1 = ๐œ†๐Ÿโ€ฒโˆ‘โˆ’๐Ÿ ๐Ÿ ๐œ† = 1 ๐Ÿโ€ฒโˆ‘โˆ’๐Ÿ ๐Ÿ So, finally, we can take this last result and replace ๐œ† in ๐’˜ = ๐œ†โˆ‘โˆ’๐Ÿ ๐Ÿ, obtaining: ๐’˜ = 1 ๐Ÿโ€ฒโˆ‘โˆ’๐Ÿ ๐Ÿ โˆ‘โˆ’๐Ÿ ๐Ÿ Therefore, the closed form-solution that gives the minimum variance weights is: ๐’˜ ๐’— = 1 ๐Ÿโ€ฒโˆ‘โˆ’๐Ÿ ๐Ÿ โˆ‘โˆ’๐Ÿ ๐Ÿ As nothing is invested in the risk-free rate (since we require that the weights for the risky assets must sum up to 1), it is equivalent to work with returns or excess returns. However, it might be convenient to still work with excess returns, so that the results will be easily comparable with those obtained by the mean-variance portfolio. A further improvement can come from restricting the minimum variance portfolio to only have long positions. In other words, we add another constraint that prohibits short selling positions, to get a long-only minimum variance portfolio. This problem does not have a closed form solution, but it can easily be solved with computer programs. When a value for ๐›พ is specified, another strategy that mitigates the impact of the estimation error is the 1/N rule.1 In this rule the (sample) estimates of ๐ and โˆ‘ are used to optimally allocate the wealth between the risk-free asset and the equally weighted risky assets. This rule usually performs very well. The weights for the risky assets according to this strategy are: ๐’˜ ๐Ÿ/๐‘ต = 1 ๐›พ ๐Ÿโ€ฒ๐ ๐Ÿโ€ฒโˆ‘๐Ÿ ๐Ÿ and the weight for the riskless asset is given by 1 โˆ’ ๐’˜โ€ฒ ๐Ÿ/๐‘ต ๐Ÿ. 1 The name โ€œ1/N ruleโ€ is often used to refer to a naive rule where one simply places all the wealth on risky assets with all weights equal to 1/N, without estimating any input. In these notes we refer instead to the more elaborate rule described in the text. For example, if ๐‘ = 5 and this rule returns a weight of 0.15 for each risky asset, we equally divide 75% of our wealth among the risky assets (i.e., 15% on each risky asset), and then place the remaining 25% on the risk-free asset.