rf <- 0.02
rs <- 0.10
sd_sp <- 0.20

w_sp <- seq(0,1,0.2)
w_rf <- 1 - w_sp

expected_return <- w_rf*rf + w_sp*rs
variance <- (w_sp*sd_sp)^2

portfolio <- data.frame(
Tbill=w_rf,
SP500=w_sp,
Expected_Return=expected_return,
Variance=variance
)

portfolio
##   Tbill SP500 Expected_Return Variance
## 1   1.0   0.0           0.020   0.0000
## 2   0.8   0.2           0.036   0.0016
## 3   0.6   0.4           0.052   0.0064
## 4   0.4   0.6           0.068   0.0144
## 5   0.2   0.8           0.084   0.0256
## 6   0.0   1.0           0.100   0.0400
A <- 2

portfolio$Utility_A2 <- portfolio$Expected_Return - 0.5*A*portfolio$Variance
portfolio
##   Tbill SP500 Expected_Return Variance Utility_A2
## 1   1.0   0.0           0.020   0.0000     0.0200
## 2   0.8   0.2           0.036   0.0016     0.0344
## 3   0.6   0.4           0.052   0.0064     0.0456
## 4   0.4   0.6           0.068   0.0144     0.0536
## 5   0.2   0.8           0.084   0.0256     0.0584
## 6   0.0   1.0           0.100   0.0400     0.0600

Conclusion:

Investor with A = 2 prefers the portfolio with the highest utility.

Problem 12 (A = 3)

A <- 3

portfolio$Utility_A3 <- portfolio$Expected_Return - 0.5*A*portfolio$Variance
portfolio
##   Tbill SP500 Expected_Return Variance Utility_A2 Utility_A3
## 1   1.0   0.0           0.020   0.0000     0.0200     0.0200
## 2   0.8   0.2           0.036   0.0016     0.0344     0.0336
## 3   0.6   0.4           0.052   0.0064     0.0456     0.0424
## 4   0.4   0.6           0.068   0.0144     0.0536     0.0464
## 5   0.2   0.8           0.084   0.0256     0.0584     0.0456
## 6   0.0   1.0           0.100   0.0400     0.0600     0.0400

Conclusion:

Higher risk aversion (A = 3) leads the investor to prefer a portfolio with more T-bills.

CFA Problem 1-3

Investment Data:

investment <- 1:4
E <- c(0.12,0.15,0.21,0.24)
sd <- c(0.30,0.40,0.16,0.21)

data <- data.frame(investment,E,sd)
data
##   investment    E   sd
## 1          1 0.12 0.30
## 2          2 0.15 0.40
## 3          3 0.21 0.16
## 4          4 0.24 0.21

Utility Formula:

U = E(r) − 0.5Aσ²

Question 1 (A = 4)

A <- 4
data$Utility <- data$E - 0.5*A*(data$sd^2)
data
##   investment    E   sd Utility
## 1          1 0.12 0.30 -0.0600
## 2          2 0.15 0.40 -0.1700
## 3          3 0.21 0.16  0.1588
## 4          4 0.24 0.21  0.1518

Investment with the highest utility should be selected.

Question 2 (Risk seeker)

Risk seeker means negative A.

A <- -4
data$Utility_riskseeker <- data$E - 0.5*A*(data$sd^2)
data
##   investment    E   sd Utility Utility_riskseeker
## 1          1 0.12 0.30 -0.0600             0.3000
## 2          2 0.15 0.40 -0.1700             0.4700
## 3          3 0.21 0.16  0.1588             0.2612
## 4          4 0.24 0.21  0.1518             0.3282

A risk-seeking investor prefers higher risk investments.

Question 3

The variable A represents:

Investor’s risk aversion.