1. Problems 10 through 12

1.1. Introduction

This report analyzes portfolios composed of Treasury bills and the S&P 500 index.
Using historical data, the expected return, variance, and investor utility are calculated for different portfolio weights.

The objective is to determine the optimal portfolio for investors with different levels of risk aversion.


1.2. Data and Assumptions

The following assumptions are given:

  • Risk-free rate (T-bills) = 5%
  • Expected return of S&P 500 = 13%
  • Standard deviation of S&P 500 = 20%
rf <- 0.05
rm <- 0.13
sigma_m <- 0.20

1.3. Portfolio Weights

The portfolios consist of different combinations of T-bills and the S&P 500 index.

w_bills <- c(0,0.2,0.4,0.6,0.8,1.0)
w_index <- c(1.0,0.8,0.6,0.4,0.2,0)

portfolio <- data.frame(w_bills, w_index)
portfolio
##   w_bills w_index
## 1     0.0     1.0
## 2     0.2     0.8
## 3     0.4     0.6
## 4     0.6     0.4
## 5     0.8     0.2
## 6     1.0     0.0

1.4. Expected Portfolio Return

The expected portfolio return is calculated as:

\[ E(R_p) = w_f \cdot R_f + w_m \cdot E(R_m) \]

portfolio$Return <- w_bills*rf + w_index*rm
portfolio
##   w_bills w_index Return
## 1     0.0     1.0  0.130
## 2     0.2     0.8  0.114
## 3     0.4     0.6  0.098
## 4     0.6     0.4  0.082
## 5     0.8     0.2  0.066
## 6     1.0     0.0  0.050

1.5. Portfolio Variance

Since Treasury bills are risk-free, portfolio variance depends only on the risky asset.

Variance formula:

\[ \sigma_p^2 = w_m^2 \cdot \sigma_m^2 \]

portfolio$Variance <- (w_index^2)*(sigma_m^2)
portfolio
##   w_bills w_index Return Variance
## 1     0.0     1.0  0.130   0.0400
## 2     0.2     0.8  0.114   0.0256
## 3     0.4     0.6  0.098   0.0144
## 4     0.6     0.4  0.082   0.0064
## 5     0.8     0.2  0.066   0.0016
## 6     1.0     0.0  0.050   0.0000

1.6. Utility Analysis

Investor utility is calculated using the mean-variance utility function:

\[ U = E(R_p) - \tfrac{1}{2} A \cdot \sigma_p^2 \]

Case 1: Risk Aversion A = 2
A <- 2
portfolio$Utility_A2 <- portfolio$Return - 0.5*A*portfolio$Variance
portfolio
##   w_bills w_index Return Variance Utility_A2
## 1     0.0     1.0  0.130   0.0400     0.0900
## 2     0.2     0.8  0.114   0.0256     0.0884
## 3     0.4     0.6  0.098   0.0144     0.0836
## 4     0.6     0.4  0.082   0.0064     0.0756
## 5     0.8     0.2  0.066   0.0016     0.0644
## 6     1.0     0.0  0.050   0.0000     0.0500
Case 2: Risk Aversion A = 3
A <- 3
portfolio$Utility_A3 <- portfolio$Return - 0.5*A*portfolio$Variance
portfolio
##   w_bills w_index Return Variance Utility_A2 Utility_A3
## 1     0.0     1.0  0.130   0.0400     0.0900     0.0700
## 2     0.2     0.8  0.114   0.0256     0.0884     0.0756
## 3     0.4     0.6  0.098   0.0144     0.0836     0.0764
## 4     0.6     0.4  0.082   0.0064     0.0756     0.0724
## 5     0.8     0.2  0.066   0.0016     0.0644     0.0636
## 6     1.0     0.0  0.050   0.0000     0.0500     0.0500

1.7. Results Table

library(knitr)
kable(portfolio, digits = 4, caption = "Portfolio Return, Variance, and Utility")
Portfolio Return, Variance, and Utility
w_bills w_index Return Variance Utility_A2 Utility_A3
0.0 1.0 0.130 0.0400 0.0900 0.0700
0.2 0.8 0.114 0.0256 0.0884 0.0756
0.4 0.6 0.098 0.0144 0.0836 0.0764
0.6 0.4 0.082 0.0064 0.0756 0.0724
0.8 0.2 0.066 0.0016 0.0644 0.0636
1.0 0.0 0.050 0.0000 0.0500 0.0500

1.8. Risk–Return Visualization

library(ggplot2)

ggplot(portfolio, aes(x = Variance, y = Return)) +
  geom_point(size = 3, color = "steelblue") +
  geom_line(color = "firebrick", linewidth = 1) +
  labs(
    title = "Risk–Return Tradeoff",
    x = "Portfolio Variance",
    y = "Expected Return"
  ) +
  theme_minimal(base_size = 14) +
  theme(
    plot.title = element_text(hjust = 0.5, face = "bold"),
    axis.title = element_text(face = "bold"),
    panel.grid.minor = element_blank(),
    panel.grid.major = element_line(color = "grey80")
  )


1.9. Conclusion

The results demonstrate the trade-off between risk and return.
Portfolios with higher allocations to the S&P 500 produce higher expected returns but also higher risk.

For an investor with risk aversion coefficient A = 2, the optimal portfolio is the one with the highest expected utility, which occurs when investing fully in the S&P 500.

For a more risk-averse investor (A = 3), the optimal portfolio shifts toward a mix of T-bills and the S&P 500, reducing overall risk while maintaining reasonable returns.

Therefore, investor preferences play a crucial role in determining the optimal portfolio allocation.

2. CFA Problems 1-3

2.1 Introduction

Investment decisions often involve a trade-off between expected return and risk. Investors typically prefer higher returns but are also concerned about the uncertainty associated with those returns. The mean–variance utility framework provides a systematic approach for evaluating investments by adjusting expected returns for the level of risk involved.

This report evaluates four investment opportunities using the utility function framework. By incorporating a risk aversion coefficient, the analysis identifies the investment that maximizes investor satisfaction while considering both return and risk.

2.2 Data

The analysis uses four investment alternatives. Each investment is characterized by its expected return and standard deviation. The expected return represents the anticipated average return, while the standard deviation measures the volatility or risk associated with the investment.

A risk aversion coefficient A=4 is used to represent a risk-averse investor. A higher value of A implies greater sensitivity to risk.

investment <- c(1,2,3,4)
expected_return <- c(0.12,0.15,0.21,0.24)
sigma <- c(0.30,0.50,0.16,0.21)

A <- 4

2.3 Create Data Frame

The investment data is structured using a data frame in R. Organizing the data in this format allows for efficient calculations and simplifies the process of computing additional metrics such as variance and utility.

data <- data.frame(investment, expected_return, sigma)
data
##   investment expected_return sigma
## 1          1            0.12  0.30
## 2          2            0.15  0.50
## 3          3            0.21  0.16
## 4          4            0.24  0.21

2.4 Calculate Variance

Risk in the utility framework is measured using variance, which is the square of the standard deviation. Variance provides a quantitative measure of the dispersion of returns and is required for calculating investor utility.

data$variance <- sigma^2
data
##   investment expected_return sigma variance
## 1          1            0.12  0.30   0.0900
## 2          2            0.15  0.50   0.2500
## 3          3            0.21  0.16   0.0256
## 4          4            0.24  0.21   0.0441

2.5 Calculate Utility

The utility of each investment is calculated using the mean–variance utility function: \[ U = E(R_p) - \tfrac{1}{2} A \sigma_p^2 \]This formula adjusts expected return by subtracting a penalty for risk. The magnitude of the penalty depends on the investor’s level of risk aversion. Investors with higher risk aversion coefficients assign a larger penalty to risky investments.

data$utility <- expected_return - 0.5*A*data$variance
data
##   investment expected_return sigma variance utility
## 1          1            0.12  0.30   0.0900 -0.0600
## 2          2            0.15  0.50   0.2500 -0.3500
## 3          3            0.21  0.16   0.0256  0.1588
## 4          4            0.24  0.21   0.0441  0.1518

2.6 Final Table

The table below summarizes the expected return, standard deviation, variance, and calculated utility for each investment alternative. This summary enables a direct comparison across the available investment options.

library(knitr)
kable(data, digits=4, caption="Utility Calculation")
Utility Calculation
investment expected_return sigma variance utility
1 0.12 0.30 0.0900 -0.0600
2 0.15 0.50 0.2500 -0.3500
3 0.21 0.16 0.0256 0.1588
4 0.24 0.21 0.0441 0.1518

2.7 Optimal Investment for Risk-Averse Investor (A = 4)

For a risk-averse investor with A=4, the optimal investment is the one that produces the highest utility value. Utility reflects the trade-off between higher returns and higher risk. The results show that Investment 3 provides the highest utility and therefore represents the optimal choice for this investor.

data[which.max(data$utility),]
##   investment expected_return sigma variance utility
## 3          3            0.21  0.16   0.0256  0.1588

2.8 Risk Neutral Investor

A risk-neutral investor does not penalize risk in their decision-making process. In this case, the risk aversion coefficient A=0, which simplifies the utility function to expected return alone. Therefore, the investment with the highest expected return is preferred.

data[which.max(data$expected_return),]
##   investment expected_return sigma variance utility
## 4          4            0.24  0.21   0.0441  0.1518

2.9 Conclusion

  • The highest utility occurs for Investment 3 when A = 4.
  • If the investor is risk neutral, Investment 4 is preferred because it has the highest expected return.