PART 4 M EAN -VARIANCE P ORTFOLIO T HEORY 93 Primary objectives: Ï Markowitz model: Computing minimum variance (risk) portfolios Ï Random Variables, Variance, co-variance, mean Ï Quadratic programming: Modelling portfolio optimization as quadratic program Ï Simple parameter estimation Ï Modelling: Transaction costs, diversifiaction Ï Robustness issues: Naive approaches 94 Further reading INVESTMENT SCIENCE, by David G. Luenberger, Oxford University Press Today chapter 6 95 Assets Asset is investment instrument that can be bought and sold frequently Return Ï Ï Ï X0 : amount invested, X1 : amount received X1 Total return: R = X0 X1 − X0 Rate of return: r = X0 96 Short sales Sell asset without owning it. Ï Borrow asset from someone who owns it (such as a brokerage firm) Ï sell borrowed asset to someone else receiving X0 Ï Repay your loan by purchasing asset for X1 Ï Return asset to lender Ï Short selling is profitable if the asset price declines 97 Portfolios Portfolio return Ï n assets are available with return Ri and X0 is to be invested Ï weight wi : fraction of asset i in portfolio Pn i=1 wi = 1 Ï Ï Return of Portfolio: R = = Ï Using formula R = 1 + r and for the rate of return Pn i=1 wi X0 Ri n X X0 wi R i i=1 Pn i=1 wi = 1, one has r = Pn i=1 wi ri 98 Basic notions of probability Expected value, variance Ï x a random variable over a finite probability space, expected P value E(x) or x of x is i xi pi , where pi is the probability of x to attain value xi Ï Linearity of expectation: x, y random variables, α, β ∈ R, then E(α x + β y) = αE(x) + βE(y) Ï Ï Variance of x: var(x) = E[(x − x)2 ] = E(x2 ) − x̄2 p Standard deviation: σ(x) = var(x) Example: Rolling a dice σ2 (x) = E(x2 ) − 3.52 = 1/6(1 + 4 + 9 + 16 + 25 + 36) − 3.52 = 2.92 99 Covariance Ï Ï Ï Ï Ï Covariance: cov(x, y) = E[(x − x)(y − y)] = E(x · y) − x · y Correlation: ρ(x, y) = cov(x, y)/(σ(x) · σ(y)); notice |ρ(x, y)| É 1 Uncorrelated: ρ(x, y) = 0 Positively correlated: ρ(x, y) > 0 Negatively correlated: ρ(x, y) < 0 Example of samples of positive, negative and uncorrelated variables y x 100 Variance of sum var( n X i=1 xi ) = E[ n ¡X i=1 ¢2 xi − xi ] X = E[ (xi − xi )(xj − xj )] i,j n X = i,j=1 = n X E(xi − xi )(xj − xj )) cov(xi , xj ). i,j=1 101 Random returns Ï Rates of return are considered to be random variables Ï n assets with random rates of return ri i = 1, . . . , n and expected value r i respectively Ï Expected rate of return of portfolio r= Ï n X r i wi i=1 Variance of portfolio return var(r) = n X i,j=1 wi wj var(ri , rj ) = wT Qw where Q is symmetric positive semi-definite matrix 102 The optimization problem Task Compute weights such that variance (risk) of portfolio is minimal among those having at least a certain expected return. 103 Quadratic programming Convex quadratic program Q ∈ Rn×n positive semidefinite, c ∈ Rn A ∈ Rm×n and b ∈ Rm , then min xT Qx + cT x Ax = b x Ê 0, is (convex) quadratic program. Efficient algorithms Convex quadratic programs can be solved efficiently. We will treat an approximation algorithm in greater detail later. 104 Mean-variance portfolio optimization as a quadratic program Pn i=1 wi r i P n i=1 wi w Aw Ê = Ê É min wT Qw r 1 0 if no shortsales allowed b additional constraints 105 Parameter estimation Observed rates of return Ï Ï Ï Ï Ï Ï Time series: r1 , . . . , rT P Mean value: r = T1 Tt=1 rt P Variance: var(r) = T1 Tt=1 (rt − r)2 Second time series: s1 , . . . , sT , mean: s, variance var(s) P Covariance: cov(r, s) = T1 Tt=1 (rt − r)(st − s) Correlation: ρ(r, s) = cov(r, s)/(σ(r)σ(s)) 106 Example Ï S&P 500 index for returns on stocks, 10 year treasury bond index for returns on bonds, cash invested in money market a 1 day federal fund rate Year 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 Stocks 20.2553 25.6860 23.4297 28.7463 33.4484 37.5813 33.7839 41.8725 46.4795 42.5448 44.2212 50.5451 60.1461 51.3114 37.7306 51.7772 64.1659 59.5739 63.4884 75.3032 99.7795 94.8671 Bonds 262.935 268.730 284.090 289.162 299.894 302.695 318.197 309.103 316.051 298.249 354.671 394.532 403.942 417.252 433.927 457.885 529.141 531.144 524.435 531.040 517.860 538.769 MM 100.00 102.33 105.33 108.89 113.08 117.97 124.34 129.94 137.77 150.12 157.48 164.00 172.74 189.93 206.13 216.85 226.93 241.82 266.07 302.74 359.96 404.48 Year 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 Stocks 115.308 141.316 150.181 197.829 234.755 247.080 288.116 379.409 367.636 479.633 516.178 568.202 575.705 792.042 973.897 1298.82 1670.01 2021.40 1837.36 1618.98 1261.18 1622.94 Bonds 777.332 787.357 907.712 1200.63 1469.45 1424.91 1522.40 1804.63 1944.25 2320.64 2490.97 2816.40 2610.12 3287.27 3291.58 3687.33 4220.24 3903.32 4575.33 4827.26 5558.40 5588.19 MM 440.68 482.42 522.84 566.08 605.20 646.17 702.77 762.16 817.87 854.10 879.04 905.06 954.39 1007.84 1061.15 1119.51 1171.91 1234.02 1313.00 1336.89 1353.47 1366.73 107 Annual rates of return Year 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 Stocks 26.81 -8.78 22.69 16.36 12.36 -10.10 23.94 11.00 -8.47 3.94 14.30 18.99 -14.69 -26.47 37.23 23.93 -7.16 6.57 18.61 32.50 -4.92 21.55 Bonds 2.20 5.72 1.79 3.71 0.93 5.12 -2.86 2.25 -5.63 18.92 11.24 2.39 3.29 4.00 5.52 15.56 0.38 -1.26 -1.26 -2.48 4.04 44.28 MM 2.33 2.93 3.38 3.85 4.32 5.40 4.51 6.02 8.97 4.90 4.14 5.33 9.95 8.53 5.20 4.65 6.56 10.03 13.78 18.90 12.37 8.95 Year 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 Stocks 22.56 6.27 31.17 18.67 5.25 16.61 31.69 -3.10 30.46 7.62 10.08 1.32 37.58 22.96 33.36 28.58 21.04 -9.10 -11.89 22.10 28.68 Bonds 1.29 15.29 32.27 22.39 -3.03 6.84 18.54 7.74 19.36 7.34 13.06 -7.32 25.94 0.13 12.02 14.45 -7.51 17.22 5.51 15.15 0.54 MM 9.47 8.38 8.27 6.91 6.77 8.76 8.45 7.31 4.43 2.92 2.96 5.45 5.60 5.29 5.50 4.68 5.30 6.40 1.82 1.24 0.98 108 Rates of return rit = (Ii,t − Ii,t−1)/Ii,t−1 rates of return of asset i = 1, , 2, 3 Arithmetic mean r i = 1/T · PT t=1 rit gives Arithmetic mean r i Stocks 12.06 % Bonds 7.85% MM 6.32 % 109 Geometric mean Suppose I invest X0 at time 0. Rates of return are r1 = .25 and r2 = −.25 on the first and second day. What is X2 ? X2 = (1 − .25)(1 + .25)X0 = (1 − .0625)X0 Arithmetic mean of return is 0. Geometric mean: (1 + r)2 = (1 − .25)(1 + .25) and thus p r = (1 − .25)(1 + .25) − 1. Geometric mean qQ r i = T Ti=1 (1 + rit ) − 1. Is constant yearly rate of return to be applied to obtain IiT starting from Ii0 . 110 Example with geometric mean Geometric mean r i Stocks 10.73% Bonds 7.37% MM 6.27% Covariance matrix cov(Ri , Rj ) = 1 T PT t=1 (rit − r it )(rjt − r jt ) : Covariance Stocks Bonds MM Stocks 0.02778 0.00387 0.00021 Bonds 0.00387 0.01112 -0.00020 MM 0.00021 -0.00020 0.00115 111 Example cont. Volatility (standard deviation) σ(Ri ) = p cov(Ri , Ri ) Volatility 16.67 % 10.55 % 3.40 % 112 Setting up the quadratic program min .02778 · wS2 + 2 · .00387wS wB + 2 · .00021wS wM 2 +.01112wB2 − 2 · .00020wB wM + 0.00115wM such that .1073wS + .0737wB + .0627wM Ê R wS + wB + wM = 1 ws Ê 0, wB Ê 0, wM Ê 0 113 Diversification Markowitz portfolio tends to have unreasonably large quantities of individual assets and if short-sales are allowed, unusually large quantities of short sales. Example: Limit certain assets to m% means additional constraints wi É m, for assets i. Limiting the overall amount of short sales: Split each wi into wi = wi+ − wi − n X i=1 wi− É m′ , These go in additional constraint section of Markowitz model 114 Transaction costs Re-optimizing a portfolio w0 current portfolio and w the desired portfolio. Let yi be the fraction of asset i sold and zi be the fraction of asset i bought. wi − wi0 É yi , yi Ê 0 wi0 − wi É zi , zi Ê 0 Following constraint limits fraction of transaction to h: n X (yi + zi ) É h i=1 115 Robustness Markowitz model is sensitive Small change of mean and variance in input results often in large changes of portfolio. One way to deal with this is to re-sample returns from historical data to generate alternative, but similar r and var estimates. Run optimizer on the generated inputs and take mean. 116 Primary objectives: Ï Markowitz model: Computing minimum variance (risk) portfolios Ï Random Variables, Variance, co-variance, mean Ï Quadratic programming: Modelling portfolio optimization as quadratic program Ï Simple parameter estimation Ï Modelling: Transaction costs, diversifiaction Ï Robustness issues: Naive approaches 117 Primary objectives: Ï Markowitz model: Computing minimum variance (risk) portfolios ✔ Ï Random Variables, Variance, co-variance, mean ✔ Ï Quadratic programming: Modelling portfolio optimization as quadratic program ✔ Ï Simple parameter estimation ✔ Ï Modelling: Transaction costs, diversifiaction ✔ Ï Robustness issues: Naive approaches ✔ 118