Chapter 1 Remarks on Assignment 6

1.1 Exercise 5.4

Compute the value V(1) of a portfolio worth initially V(0)=100 dollars that consists of two securities with weights w1=25% and w2=75%, given that the security prices are S1(0)=45 and S2(0)=33 dollars initially, changing to S1(1)=48 and S2(1)=32 dollars.

1.2

Scenario Prob. Return K1 Return K2 Return K3
ω1 0.25 12% 11% 2%
ω2 0.75 12% 13% 23%

Question: which stock is the most risky?

1.3 diversification

Even though an investment in either stock separately involves risk, we have reduced the overall risk to nil by splitting the investment between the two stocks. This is a simple example of diversification, which is particularly effective here because the returns are negatively correlated.

For each stock, it has a corresponding weights.

1.4 Weights

The weights are defined by

w1=x1S1(0)V(0),w2=x2S2(0)V(0)

Observe that the weights always add up to 100%

w1+w2=x1S1(0)+x2S2(0)V(0)=V(0)V(0)=1

1.5

w1=x1S1(0)V(0)x1=w1V(0)S1(0)V(1)=x1S1(1)+x2S2(1)=V(0)(w1S1(1)S1(0)+w2S2(1)S2(0))

1.6

Compute the value V(1) of a portfolio worth initially V(0)=100 dollars that consists of two securities with weights w1=25% and w2=75%, given that the security prices are S1(0)=45 and S2(0)=33 dollars initially, changing to S1(1)=48 and S2(1)=32 dollars.

V(1)=x1S1(1)+x2S2(1)=V(0)(w1S1(1)S1(0)+w2S2(1)S2(0))=99.394

1.7 Exercise 5.7

Compute the weights in a portfolio consisting of two kinds of stock if the expected return on the portfolio is to be E(KV)=20%, given the following information on the returns on stock 1 and 2:

Scenario Prob. Return K1 Return K2
w1 0.1 -10% 10%
w2 0.5 0% 20%
w3 0.4 20% 30%

1.8 Risk and Expected Return on a Portfolio

The expected return on a portfolio consisting of two securities can easily be expressed in terms of the weights and the expected returns on the components:

E(KV)=w1E(K1)+w2E(K2)

1.9

Scenario Prob. Return K1 Return K2
w1 0.1 -10% 10%
w2 0.5 0% 20%
w3 0.4 20% 30%

Idea: First compute E(K1) and E(K2), then build two equations and solve them.

E(KV)=w1E(K1)+w2E(K2)=0.27w1+23w2=0.2w1+w2=1

1.10 Exercise 5.8

Using the data below, find the weights in a portfolio with expected return μV=46% and compute the risk σ2V of this portfolio.

Scenario Prob. Return K1 Return K2
w1 0.4 -10% 20%
w2 0.2 0% 20%
w3 0.4 20% 10%

First compute E(K1) and E(K2)

1.11 Theorem

The variance of the return on a portfolio is given by:

Var(KV)=w21Var(K1)+w22Var(K2)+2w1w2Cov(K1,K2)

where wi is the share of stock i.

The covariance of two variables x and y in a data set measures how the two are linearly related. A positive covariance would indicate a positive linear relationship between the variables, and a negative covariance would indicate the opposite.

Population variacne: Var(x)=1nni=1(xiˉx)2=1nni=1(xiˉx)(xiˉx)=Cov(x,x)Population covariacne: Cov(x,y)=1nni=1(xiˉx)(yiˉy)

1.12 Proof

Lemma 1:Var(x)=E(x2)E(x)2Var(x)=E((xE[x])2)=1nni=1(xiˉx)=E(x2+E[x]22xE[x])=E(x2)+E(x)2E(2xE[x])=E(x2)+E(x)22E(x)2=E(x2)E(x)2

Question: Is E[E(x)2]=E(x)2 true?

Var(KV)=E(K2V)E(KV)2=[w1E(K1)+w2E(K2)]2+E((w1K1+w2K2)2)=E(w21K21+w22K22+2w1w2K1K2)w21E(K1)2w22E(K2)2+2w1w2E(K1)E(K2)=w21E(K21)+w22E(K22)+2w1w2E(K1K2)w21E(K1)2w22E(K2)2+2w1w2E(K1)E(K2)=w21[E(K21)E(K1)2]+w22[E(K22)E(K2)2]+2w1w2[E(K1K2)E(K1)E(K2)]=w21Var(K1)+w22Var(K2)+2w1w2Cov(K1,K2)

1.13 Note

The var() function in base R calculate the sample variance, and the population variance differs with the sample variance by a factor of n / n - 1. So an alternative to calculate population variance will be var(myVector) * (n - 1) / n where n is the length of the vector, here is an example:

a = c(0,2)
pop_var = var(a)*(1/2)
pop_var
## [1] 1
var(c(-0.1,0,0.2))*(2/3)
## [1] 0.01555556

1.14

In order to compute weighted mean and sd, you can use Hmisc packages

## Loading required package: lattice
## Loading required package: survival
## Loading required package: Formula
## Loading required package: ggplot2
## 
## Attaching package: 'Hmisc'
## The following objects are masked from 'package:base':
## 
##     format.pval, units
wtd.var(c(-0.1,0,0.2),c(0.4,0.2,0.4),method = 'ML')
## [1] 0.0184
# weighted covariance
cov_matrix = matrix(c(c(-0.1,0,0.2),c(0.2,0.2,0.1)),nrow = 3)
cov.wt(cov_matrix,c(0.4,0.2,0.4))
## $cov
##          [,1]     [,2]
## [1,]  0.02875 -0.01000
## [2,] -0.01000  0.00375
## 
## $center
## [1] 0.04 0.16
## 
## $n.obs
## [1] 3
## 
## $wt
## [1] 0.4 0.2 0.4

1.15 Exercise 5.9

Suppose that there are just two scenarios ω1 and ω2 and consider two risky securities with returns K1 and K2. Show that K1=aK2+b for some numbers a0 and b, and deduce that ρ12=1 or −1.

ρ12=Cov(x1,x2)σ1σ2

1.16 Correlation coefficient

Question: what is ρ12 in left and right figure?

1.17

Correlation coefficient:

ρ12=Cov(K1,K2)σ1σ2

Answer to Exercise 5.9:

Start from the definition of ρ12. Compute Cov(K1,K2) given that K1=aK2+b; then use the idea that Var(K1)=Var(aK2+b) to find the relation between σ1 and σ2.

$$ _{12}= \ Cov(K_1,K_2) = Cov(aK_2+b,K_2) = aCov(K_2,K_2)= aVar(K_2)=a_2^2\ Var(x) = a\ Var(bx) = b^2x\ Var(x+b) = a\ Cov(x,y) = a\ Cov(bx,by) = bba=b^2a\

_1^2 = f(_2^2)\ _1^2 = Var(K_1) = Var(aK_2+b) = a^2Var(K_2) = a^2_2^2\ _1 = |a|2\ {12}== = 1 -1 $$

1.18 Find a portfolio with minimum risk

We are interested in finding a portfolio with minimum risk for any given ρ12 such that 1<ρ12<1. We take s=w2 as a parameter:

μV=w1μ1+w2μ2

s=w2,w1+w2=1σ2V=w21σ21+w22σ22+2w1w2ρ12σ1σ2=(1s)2σ21+s2σ22+2(1s)sρ12σ1σ2σ2v=f(s)min(f(s))f(s)s=0s=?2f(s)s2>0

1.19

First we find the minimum without any restrictions on short sales.

If short sales are not allowed, we shall have to take into account the bounds 0s1 on the parameter.

Theorem For 1<ρ12<1 the portfolio with minimum variance is attained at

s0=σ21ρ12σ1σ2σ21+σ222ρ12σ1σ2

If short sales are not allowed, then the smallest variance is attained at

smin={0if s0<0s0if 0s011if 1<s0

1.20 Proof

Idea: compute the derivative of σ2V with respect to s and equate it to 0.

(1s)2σ21+s2σ22+2(1s)sρ12σ1σ2=0s=σ21ρ12σ1σ2σ21+σ222ρ12σ1σ2

1.21

1.22 Exercise 5.10

Compute the weights in the portfolio with minimum risk for the data in Example 5.6. Does this portfolio involve short selling?

Scenario Prob. Return K1 Return K2
w1 0.4 -10% 20%
w2 0.2 0% 20%
w3 0.4 20% 10%

σ1=0.0184,σ2=0.0024,ρ12=0.96309

1.23

sigma1 = 0.0184
sigma2 = 0.0024
rho12 = -0.96309
s0 = (sigma1^2-rho12*sigma1*sigma2)/(sigma1^2+sigma2^2-2*rho12*sigma1*sigma2)
s0
## [1] 0.8875354