MS-E2114 Investment Science                                                                    Exercise 5, Solutions
Teemu Seeve                                                                                              12.10.2017
   • Suppose you purchase an asset at price X0 and sell it 1 year later with price X1 . The total return on your
     investment is R = X1 /X0 , and the rate of return is r = (X1 − X0 )/X0 . It is clear that the two notions are
     related by R = 1 + r.
   • Generally speaking, being short on an asset means arranging a financial position that creates profit when
     the value of the asset declines. Specifically, short selling (or shorting) means selling an asset that you do
     not own. To do this, you borrow an asset from someone who owns it. You then sell the borrowed asset
     to someone else, receiving an amount X0 . Later, you repay your loan by purchasing the asset for, say, X1
     and return the asset to your lender. If X1 < X0 , you will have made a profit of X0 − X1 . If X1 > X0 , the
     loss is X1 − X0 . Short selling is considered quite risky, because the potential loss for shorting is unlimited.
   • Let x, y and z be random variables and a and b be constants. The mean, variance and covariance of x and
     y have following properties:
        – E[ax + by] = aE[x] + bE[y]
        – σx2 = Var[x] = E[(x − E[x])2 ] = E[x2 ] − 2E[x]E[x] + E[x]2 = E[x2 ] − E[x]2
        – σxy = Cov[x, y] = E[(x − E[x])(y − E[y])] = E[(y − E[y])(x − E[x])] = Cov[y, x] = σyx
        – Var[ax + by] = a2 Var[x] + b2 Var[y] + 2abCov[x, y]
        – Cov[ax + by, z] = aCov[x, z] + bCov[y, z]
               σxy
        – ρ=        (correlation)
              σx σy
   • Suppose that n different assets are available. We can form a portfolio of these assets so that the fraction
     of an asset
              P i in the portfolio is wi (that is, the weight of the asset i in the portfolio). For the weights wi ,
     we have ni=1 wi = 1.
   • Let Ri and ri denote
                     P the total return and rate of return of assetP   i, respectively. The overall return of the
     portfolio is R = ni=1 wi Ri and the overall rate of return is r = ni=1 wi ri .
MS-E2114 Investment Science                                                                              Exercise 5, Solutions
Teemu Seeve                                                                                                        12.10.2017
   • The Markowitz model. P    Suppose we wantPn to find the portfolio that has a rate of return r̄ and has minimum
                                 n
     variance Var[r] = Var[ i=1 wi ri ] = i,j=1 wi wj σij , where σij are the variances (i = j) and covariances
     (i 6= j) of the assets in the portfolio. We denote the mean rate of return of the asset i as r̄i and formulate
     the optimization problem as
                                                             n
                                                           1 X
                                                       min     wi wj σij
                                                           2
                                                              i,j=1
                                                              n
                                                              X
                                                       s.t.         wi r̄i = r̄
                                                              i=1
                                                              Xn
                                                                    wi = 1.
                                                              i=1
   • The above optimization problem can be solved using Lagrange multipliers λ and µ. The Lagrangian is
                                   n                 n                 n
                                                                  !              !
                                1 X                 X                  X
                           L=         wi wj σij − λ    wi r̄i − r̄ − µ    wi − 1 .
                                2
                                      i,j=1                    i=1                            i=1
     Setting the derivatives of the Lagrangian with respect to wi , i = 1, . . . , n, λ and µ to zero gives the equations
     for the efficient set as
                                                           ∂
                                                              L = 0,              ∀i = 1, 2, . . . , n
                                                          ∂wi
                                                            ∂
                                                              L=0
                                                           ∂λ
                                                            ∂
                                                              L=0
                                                           ∂µ
                                          n
                                          X
                                      ⇒         σij wj − λr̄i − µ = 0,            ∀i = 1, 2, . . . , n
                                          j=1
                                                        n
                                                        X
                                                              wi r̄i = r̄
                                                        i=1
                                                          Xn
                                                                wi = 1.
                                                          i=1
     There are n + 2 equations with n + 2 variables (wi ’s, λ and µ). The equation system can be solved to find
     the weights wi that minimize the variance of the portfolio that has overall rate of return of r̄
MS-E2114 Investment Science                                                                Exercise 5, Solutions
Teemu Seeve                                                                                          12.10.2017
 5.1 (L6.3) (Two correlated assets) The correlation ρ between assets A and B is 0.1, and other data are given
     in Table 1 (Note ρ = σAB /(σA σB ).
                                         Table 1: Two Correlated Cases
                                               Asset   r̄     σ
                                                 A    10% 15%
                                                 B    18% 30%
     a) Find the proportions α of A and (1−α) of B that define the portfolio of A and B which has the minimum
     standard deviation.
     b) What is the value of this minimum standard deviation?
     c) What is the expected return of this portfolio?
     Solution:
     We have
     r̄A = 0.10, r̄B = 0.18, σA = 0.15 and σB = 0.30.
     The correlation is ρ = 0.1 and the covariance of the assets is
           σAB
     ρ=          ⇒ σAB = ρσA σB .
          σA σB
     We construct a portfolio that has proportions α of A and (1 − α) of B. The rate of return of this portfolio
     is a random variable r = αrA + (1 − α)rB , of which mean r̄ and variance σ 2 can be calculated as
      r̄ = αr̄A + (1 − α)r̄B
     σ 2 = α 2 σA
                2
                  + (1 − α)2 σB
                              2
                                + 2α(1 − α)σAB = α2 σA
                                                     2
                                                       + (1 − α)2 σB
                                                                   2
                                                                     + 2α(1 − α)ρσA σB .
     a) We find arg minα σ 2 by setting the derivative of σ 2 with respect to α to zero:
     dσ 2       2    2                 2                       σ 2 − ρσA σB
          = 2α(σA + σB − 2ρσA σB ) − 2σB + 2ρσA σB = 0 ⇒ α = 2 B 2
     dα                                                     σA + σB − 2ρσA σB
     Substituting the values of σA , σB , and ρ yields α = 0.826. Figure 1 presents the minimum variance set.
     b) Substituting values of α, ρ, σA and σB gives
     σ 2 = α 2 σA
                2 + (1 − α)2 σ 2 + 2α(1 − α)ρσ σ = 0.0194 ⇒ σ = 13.92%
                              B               A B
     c) Substituting values of α, r̄A and r̄B gives
     r̄ = αr̄A + (1 − α)r̄B = 11.39%
MS-E2114 Investment Science                                                      Exercise 5, Solutions
Teemu Seeve                                                                                12.10.2017
        0.3
                      No shorting
                      Shorting allowed
       0.25           Asset A
                      Asset B
        0.2
       0.15
        0.1
       0.05
          0
              0     0.05      0.1        0.15     0.2       0.25         0.3   0.35      0.4
                               Figure 1: Mean-standard deviation curve
MS-E2114 Investment Science                                                                   Exercise 5, Solutions
Teemu Seeve                                                                                             12.10.2017
 5.2 (L6.7) (Markowitz fun) There are just three assets with rates of return r1 , r2 and r3 , respectively. The
     covariance matrix and the expected rates of return are
                                                                
                                                 2 1 0            0.4
                                          V = 1 2 1 , r̄ = 0.8
                                                 0 1 2            0.8
     a) Find the minimum-variance portfolio.
     b) If the risk-free rate is rf = 0.2, find the efficient portfolio of risky assets.
     Solution:
     a) The equations for the efficient set are
                                          3
                                          X
                                                σij wj − λr̄i − µ = 0,         ∀i = 1, 2, 3
                                          j=1
                                                        3
                                                        X
                                                              wi r̄i = r̄                                       (1)
                                                         i=1
                                                           X3
                                                                   wi = 1,
                                                             i=1
     where σij = Vij . Minimum variance portfolio can be found by setting λ = 0, and because r̄ is free, equation
     (1) can be dropped as redundant. Hence we solve
                                             n
                                             X
                                                    σij wj − µ = 0,         ∀i = 1, 2, 3
                                              j=1
                                                       n
                                                       X
                                                             wi = 1
                                                       i=1
                                                  ⇒ 2w1 + w2                −µ= 0                               (2)
                                                       w1 +2w2 + w3 −µ= 0                                       (3)
                                                               w2 +2w3 −µ= 0                                    (4)
                                                       w1 + w2 + w3 −1 = 0.                                     (5)
     Subtracting (5) from (3) yields µ = w2 − 1, and substituting this into equations (2)-(4) yields
                                                     2w1                +1= 0
                                                      w1 +w2 + w3 +1= 0
                                                                    2w3 +1= 0,
     and hence w1 = 0.5, w2 = 0, w3 = 0.5.
MS-E2114 Investment Science                                                                      Exercise 5, Solutions
Teemu Seeve                                                                                                12.10.2017
     b) The equations to solve the one fund F have been derived in the lecture. With three risky assets they
     are
                                         X3
                                            σij vj = r̄i − rf , ∀i = 1, 2, 3,
                                          j=1
     where vi are unnormalized weights vi = λwi . We solve this set of equations for the given covariance matrix
     V and expected rates of return r̄, rf .
                                           2v1 + v2      = 0.4 − 0.2 = 0.2                                         (6)
                                            v1 +2v2 + v3 = 0.8 − 0.2 = 0.6                                         (7)
                                                  v2 +2v3 = 0.8 − 0.2 = 0.6.                                       (8)
     Solving v2 and v3 from (6) and (8) and substituting these into (7) yields
                          v1 + 2(0.2 − 2v1 ) + 0.3 − (0.2 − v1 )/2 = 0.6 ⇒ v1 = 1.11 · 10−17 ,
     and substituting this into (6) and (8) yields v2 = 0.2, v3 = 0.2. We note that v1 is practically 0, and we
     normalize v2 and v3 to find the normalized asset weights in the one fund as w1 = 0, w2 = 0.5, w3 = 0.5.
MS-E2114 Investment Science                                                                   Exercise 5, Solutions
Teemu Seeve                                                                                             12.10.2017
 5.3 (L6.1) (Shorting with margin) Suppose that to short a stock you are required to deposit an amount equal
     to 1.5X0 , where X0 is the initial price of the stock. At the end of first year the stock price is X1 and you
     liquidate your position. If R is the total return of the stock, what is the total return on your short?
     Solution:
     We seek to find the total return on the short, that is,
                                                            amount received
                                           total return =                   .
                                                            amount invested
     Of the required deposit of 1.5X0 , an amount X0 can be covered from the proceeds of selling the stock
     when the contract is made. However, an amount 0.5X0 must be invested from other sources than selling
     the shorted stock, and hence
                                            amount invested = 0.5X0 .
     In a typical short-selling process, the deposit 1.5X0 will be made into a margin account. The balance of
     this account is then either increased (if the price of the stock declines) or decreased (if the price of the
     stock increases). If the position is liquidated at the end of the first year, when the stock price is X1 , then
     the balance of the margin account will be 1.5X0 − X1 , as the cash to purchase the stocks back from the
     market is reduced from the account. Hence the amount received is
                                           amount received = 1.5X0 − X1 .
     Then the total return will be
                                                   1.5X0 − X1      X1
                                  total return =              =3−2    = 3 − 2R.
                                                      0.5X0        X0
     To see when shorting is more profitable purchasing the stock, we consider
                                                 3 − 2R > R ⇔ R < 1,
     and hence we see that if R < 1, going short is is more profitable than going long (i.e., purchasing the
     stock).
MS-E2114 Investment Science                                                                   Exercise 5, Solutions
Teemu Seeve                                                                                             12.10.2017
 5.4 (L6.5) (Rain insurance) Kalle Virtanen’s friend is planning to invest 1 Me in a rock concert to be held 1
     year from now. The friend figures that he will obtain 3 Me revenue from his 1 Me investment - unless,
     my goodness, it rains. If it rains, he will lose his entire investment. There is a 50% chance that it will rain
     the day of the concert. Kalle suggests that he buys rain insurance. He can buy one unit of insurance for
     0.50 e, and this unit pays 1 e if it rains and nothing if it does not. He may purchase as many units as he
     wishes, up to 3 Me.
     a) What is the expected rate of return on his investment if he buys u units of insurance? (The cost of
     insurance is in addition to his 1 Me investment.)
     b) What number of units will minimize the variance of his return? What is this minimum value? And what
     is the corresponding expected rate of return? (Hint: Before calculating a general expression for variance,
     think about a simple answer.)
     Solution:
     Initial investment is 1 000 000 + 0.5u
     With a probability of 50% it rains, and the revenue is 0 + u
     With a probability of 50% it does not rain, and the revenue is 3 000 000 + 0
     a) Total return is R = revenue/investment. Hence the expected total return is
                                          u                   3 000 000       0.50u + 1 500 000
                       R̄ = 0.50                    + 0.50                  =                   ,
                                   1 000 000 + 0.5u        1 000 000 + 0.5u    1 000 000 + 0.5u
     and the expected rate of return is
                                                                  500 000
                                              r̄ = R̄ − 1 =                    .
                                                              1 000 000 + 0.5u
     b) By inspection, it can be seen that buying u = 3 000 000 units of insurance eliminates all uncertainty
     regarding the return. So, u = 3 000 000 units of insurance results in a variance of 0 and a corresponding
     expected rate of return equal to
                                                        3 000 000
                                           r̄ =                         − 1 = 0.2.
                                                  1 000 000 + 1 500 000
MS-E2114 Investment Science                                                                 Exercise 5, Solutions
Teemu Seeve                                                                                           12.10.2017
 5.5 (L6.6) Suppose there are n assets which are uncorrelated. You may invest in any one, or in any combination
     of them. The mean rate of return r̄ is the same for each asset, but the variances are different. The return
     of an asset i has a variance of σi2 (i = 1, 2, . . . , n).
     a) Show the situation on an r̄ − σ diagram. Describe the efficient set.
     b) Find the minimum-variance point. Express your result in terms of
                                                                 n
                                                                      !−1
                                                                X   1
                                                     σ̄ 2 =               .
                                                                   σ2
                                                                i=1 i
     Solution:
     a) The three assets are on a single horizontal line. The efficient set is a single point on the same line
     (shaded black in Figure 2), but to the left of the left-most of the three original points.
                                    Figure 2: r̄ − σ diagram of Exercise 4.
     b) Let wi be the percentage of the total investment invested in asset i. Then, because the assets are
     uncorrelated, we have
                                                               Xn
                                       Var(total investment) =    wi2 σi2 ,
                                                                     i=1
             Pn
     where    i=1 wi = 1. We set up the the Lagrangian and set its derivatives w.r.t. wi ’s to zero as follows:
                      n                  n
                                                  !
                     X                  X              ∂L                             λ
                L=       wi2 σi2 − λ        wi − 1 ⇒       = 2wi σi2 − λ = 0 ⇒ wi = 2 ∀i = 1, . . . , n.
                                                       ∂wi                          2σi
                     i=1                i=1
                                               Pn
     Substituting these to the constraint i=1 wi = 1 yields
                                      n              n                      n
                                                                                  !−1
                                    X      λ        X   1    2             X    1
                                               =1⇔         = ⇔λ=2
                                     i=1
                                          2σi2          σ2
                                                    i=1 i
                                                             λ                 σ2
                                                                           i=1 i
                                                                        2 −1 yields
                                                              Pn
     Substituting λ into wi = λ/(2σi2 ) and denoting σ̄ 2 =
                                                                         
                                                                i=1 1/σi
                                                              σ̄ 2
                                                       wi =
                                                              σi2
MS-E2114 Investment Science                                                                                           Exercise 5, Solutions
Teemu Seeve                                                                                                                     12.10.2017
 5.6 (L6.8) (Tracking) Suppose that it is impractical to use all the assets that are incorporated into a specified
     portfolio (such as a given efficient portfolio). One alternative is to find the portfolio, made up of a given
     set of n stocks, that tracks the specified portfolio most closely - in the sense of minimizing the variance of
     the difference in returns.
     Specifically, suppose that the target portfolio has (random) rate of return rM . Suppose that there are n
     assets with (random) rates of return r1 , r2 , . . . , rn . We wish to find the portfolio rate of return
                                                      r = α1 r1 + α2 r2 + . . . αn rn
     (with ni=1 αi = 1) minimizing Var[r − rM ].
            P
     a) Find a set of equations for the αi ’s.
     b) Although this portfolio tracks the desired portfolio most closely in terms of variance, it may not have
     the desired the mean. Hence a logical approach is to minimize the variance of the tracking error sub-
     ject to achieving a given mean return. As the mean is varied, this results in a family of portfolios that
     are efficient in a new sense - say, tracking efficient. Find the equation for the αi ’s that are tracking efficient.
     Solution:
     a) Using formula for the variance of a sum Var[ax + by] = a2 Var[x] + 2abCov[x, y] + b2 Var[y] we write
                                                                                    n X
                                                                                    X n                       n
                                                                                                              X
                                                                                                                              2
                Var[r − rM ] = Var[r] − 2Cov[r, rM ] + Var[rM ] =                             αi αj σij − 2         αi σiM + σM ,
                                                                                    i=1 j=1                   i=1
     where σij is the covariance of stocks i and j, σiM is the covariance of stock i and the tracked portfolio, and
      2 is the variance of the return of the tracked portfolio. In the last equality we used the formula for the
     σM
     variance of the return of a portfolio Var[r] = Var [ ni=1 αi rP
                                                         P              Pn Pn
                                                                   i] =  i=1     Pαni αj Cov[ri , rj ] and the linearity
                                                                               j=1
                                                                      n
     of covariance with respect to another of the variates Cov [ i=1 ai x, y] = i=1 ai Cov[x, y].
                                                   Pn
     So, to minimize Var[r − rM ] subject             i=1 αi    = 1 set up the Lagrangian
                             n X
                               n                        n                              n
                                                                                                       !
                             X                          X                              X
                                                                         2
                       L=              αi αj σij − 2           αi σiM + σM −λ                 αi − 1
                             i=1 j=1                    i=1                            i=1
                             n                 n n                            n                            n
                                                                                                                        !
                             X                 X X                            X                            X
                         =         αi2 σi2 +                  αi αj σij − 2                   2
                                                                                    αi σiM + σM −λ               αi − 1
                             i=1               i=1 j=1,j6=i                   i=1                          i=1
     Differentiation with respect to αi s and λ and setting the derivatives to zero yields
                                                n
                              ∂L                X
                                  = 2αi σi2 + 2   αj σij − 2σiM − λ = 0, ∀i = 1, . . . , n
                              ∂αi
                                                       j=1,j6=i
                                                                     n
                                                          ∂L X
                                                             = αi − 1 = 0,
                                                          ∂λ
                                                                    i=1
     and we have n + 1 equations and n + 1 variables from which the αi ’s can be solved.
MS-E2114 Investment Science                                                                                           Exercise 5, Solutions
Teemu Seeve                                                                                                                     12.10.2017
                                                               n
                                                               X
     b) Similar to a) with the added constraint                      αi r̄i = r̄M . The Lagrangian is now
                                                               i=1
                n                   n n                            n                          n                       n
                                                                                                             !                             !
                X                   X X                            X                          X                       X
           L=         αi2 σi2   +                  αi αj σij − 2         αi σiM +    2
                                                                                    σM   −λ         αi − 1       −µ         αi r̄i − r̄M
                i=1                 i=1 j=1,j6=i                   i=1                        i=1                     i=1
     Again, we differentiate with respect to α’s, λ and µ and set the derivatives to zero and get
                                                 n
                                ∂L               X
                                    = 2αi σi + 2   αj σij − 2σiM − λ − µr̄i = 0 ∀i = 1, . . . , n,
                                ∂αi
                                                        j=1,j6=i
                                                                             n
                                                              ∂L X
                                                                 = αi − 1 = 0,
                                                              ∂λ
                                                                          i=1
                                                                         n
                                                            ∂L X
                                                               = αi r̄i − r̄M = 0.
                                                            ∂µ
                                                                     i=1
     These n + 2 equations can be solved to find the tracking efficient αi ’s.