From historical data on the S&P 500:
# Parameters
rf <- 0.05 # T-bill (risk-free) rate
E_index <- 0.13 # Expected return of S&P 500
sd_index <- 0.20 # Standard deviation of S&P 500
# Portfolio weights for T-bills and S&P 500
W_bills <- c(0.0, 0.2, 0.4, 0.6, 0.8, 1.0)
W_index <- 1 - W_bills
# Expected return of each portfolio
E_port <- W_bills * rf + W_index * E_index
# Variance of each portfolio (T-bills have zero variance; no covariance term needed)
Var_port <- (W_index * sd_index)^2
# Standard deviation
SD_port <- sqrt(Var_port)
library(knitr)
df10 <- data.frame(
W_bills = W_bills,
W_index = W_index,
E_r = paste0(round(E_port * 100, 1), "%"),
Variance = round(Var_port, 4),
Std_Dev = paste0(round(SD_port * 100, 1), "%")
)
kable(df10,
col.names = c("W(bills)", "W(index)", "E(r)", "Variance", "Std Dev"),
align = "ccccc",
caption = "Expected Return and Variance for T-bill / S&P 500 Portfolios")
| W(bills) | W(index) | E(r) | Variance | Std Dev |
|---|---|---|---|---|
| 0.0 | 1.0 | 13% | 0.0400 | 20% |
| 0.2 | 0.8 | 11.4% | 0.0256 | 16% |
| 0.4 | 0.6 | 9.8% | 0.0144 | 12% |
| 0.6 | 0.4 | 8.2% | 0.0064 | 8% |
| 0.8 | 0.2 | 6.6% | 0.0016 | 4% |
| 1.0 | 0.0 | 5% | 0.0000 | 0% |
library(ggplot2)
df_plot <- data.frame(SD = SD_port * 100, Er = E_port * 100, W_index = W_index)
ggplot(df_plot, aes(x = SD, y = Er)) +
geom_line(color = "#2c7bb6", linewidth = 1.2) +
geom_point(aes(color = factor(W_index)), size = 4) +
geom_text(aes(label = paste0("W_idx=", W_index)), vjust = -1, size = 3.2, color = "gray30") +
scale_color_brewer(palette = "RdYlBu", name = "W(index)") +
labs(
title = "Capital Allocation Line: T-bills + S&P 500",
x = "Standard Deviation (%)",
y = "Expected Return (%)"
) +
theme_minimal(base_size = 13)
Interpretation: As we shift weight from T-bills to the S&P 500, both expected return and risk (std dev) increase linearly — tracing the Capital Allocation Line (CAL).
A2 <- 2
U_A2 <- E_port - 0.5 * A2 * Var_port
df11 <- data.frame(
W_bills = W_bills,
W_index = W_index,
E_r = round(E_port, 4),
Variance = round(Var_port, 4),
Utility = round(U_A2, 4)
)
kable(df11,
col.names = c("W(bills)", "W(index)", "E(r)", "Variance", "Utility (A=2)"),
align = "ccccc",
caption = "Utility Values for A = 2")
| W(bills) | W(index) | E(r) | Variance | Utility (A=2) |
|---|---|---|---|---|
| 0.0 | 1.0 | 0.130 | 0.0400 | 0.0900 |
| 0.2 | 0.8 | 0.114 | 0.0256 | 0.0884 |
| 0.4 | 0.6 | 0.098 | 0.0144 | 0.0836 |
| 0.6 | 0.4 | 0.082 | 0.0064 | 0.0756 |
| 0.8 | 0.2 | 0.066 | 0.0016 | 0.0644 |
| 1.0 | 0.0 | 0.050 | 0.0000 | 0.0500 |
best11 <- which.max(U_A2)
cat("Optimal portfolio for A = 2:\n")
## Optimal portfolio for A = 2:
cat(" W(bills) =", W_bills[best11], "\n")
## W(bills) = 0
cat(" W(index) =", W_index[best11], "\n")
## W(index) = 1
cat(" E(r) =", round(E_port[best11]*100, 1), "%\n")
## E(r) = 13 %
cat(" Utility =", round(U_A2[best11], 4), "\n")
## Utility = 0.09
Conclusion (A = 2): A moderately risk-averse investor (A = 2) maximizes utility by holding 100% in the S&P 500 and 0% in T-bills. Since A = 2 reflects relatively low risk aversion, the investor prefers higher equity exposure.
A3 <- 3
U_A3 <- E_port - 0.5 * A3 * Var_port
df12 <- data.frame(
W_bills = W_bills,
W_index = W_index,
E_r = round(E_port, 4),
Variance = round(Var_port, 4),
Utility = round(U_A3, 4)
)
kable(df12,
col.names = c("W(bills)", "W(index)", "E(r)", "Variance", "Utility (A=3)"),
align = "ccccc",
caption = "Utility Values for A = 3")
| W(bills) | W(index) | E(r) | Variance | Utility (A=3) |
|---|---|---|---|---|
| 0.0 | 1.0 | 0.130 | 0.0400 | 0.0700 |
| 0.2 | 0.8 | 0.114 | 0.0256 | 0.0756 |
| 0.4 | 0.6 | 0.098 | 0.0144 | 0.0764 |
| 0.6 | 0.4 | 0.082 | 0.0064 | 0.0724 |
| 0.8 | 0.2 | 0.066 | 0.0016 | 0.0636 |
| 1.0 | 0.0 | 0.050 | 0.0000 | 0.0500 |
best12 <- which.max(U_A3)
cat("Optimal portfolio for A = 3:\n")
## Optimal portfolio for A = 3:
cat(" W(bills) =", W_bills[best12], "\n")
## W(bills) = 0.4
cat(" W(index) =", W_index[best12], "\n")
## W(index) = 0.6
cat(" E(r) =", round(E_port[best12]*100, 1), "%\n")
## E(r) = 9.8 %
cat(" Utility =", round(U_A3[best12], 4), "\n")
## Utility = 0.0764
Conclusion (A = 3): A more risk-averse investor (A = 3) maximizes utility with 60% in the S&P 500 and 40% in T-bills. Compared to A = 2, this investor holds less equity and more safe assets — consistent with higher risk aversion penalizing variance more heavily.
df_cmp <- data.frame(
W_index = rep(W_index, 2),
Utility = c(U_A2, U_A3),
Investor = rep(c("A = 2 (Less Risk Averse)", "A = 3 (More Risk Averse)"), each = 6)
)
ggplot(df_cmp, aes(x = W_index, y = Utility, color = Investor, group = Investor)) +
geom_line(linewidth = 1.2) +
geom_point(size = 3.5) +
geom_vline(xintercept = W_index[best11], linetype = "dashed", color = "#d7191c", alpha = 0.6) +
geom_vline(xintercept = W_index[best12], linetype = "dashed", color = "#2c7bb6", alpha = 0.6) +
scale_color_manual(values = c("#d7191c", "#2c7bb6")) +
labs(
title = "Utility vs. Equity Weight for A = 2 and A = 3",
x = "Weight in S&P 500 (W_index)",
y = "Utility",
color = NULL
) +
theme_minimal(base_size = 13) +
theme(legend.position = "top")
cfa <- data.frame(
Investment = 1:4,
E_r = c(0.12, 0.15, 0.21, 0.24),
sigma = c(0.30, 0.50, 0.16, 0.21)
)
# Utility formula: U = E(r) - 0.5 * A * sigma^2
A_cfa <- 4
cfa$Variance <- cfa$sigma^2
cfa$Utility <- cfa$E_r - 0.5 * A_cfa * cfa$Variance
kable(cfa,
col.names = c("Investment", "E(r)", "σ", "σ²", "Utility (A=4)"),
digits = 4,
align = "ccccc",
caption = "CFA Utility Formula Data — U = E(r) − ½·A·σ², A = 4")
| Investment | E(r) | σ | σ² | Utility (A=4) |
|---|---|---|---|---|
| 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 |
best_cfa <- which.max(cfa$Utility)
cat("Best investment for A = 4:\n")
## Best investment for A = 4:
cat(" Investment", cfa$Investment[best_cfa], "\n")
## Investment 3
cat(" E(r) =", cfa$E_r[best_cfa]*100, "%\n")
## E(r) = 21 %
cat(" σ =", cfa$sigma[best_cfa]*100, "%\n")
## σ = 16 %
cat(" Utility =", round(cfa$Utility[best_cfa], 4), "\n")
## Utility = 0.1588
Answer: Investment 3 yields the highest utility of 0.1588 for a risk-averse investor with A = 4. Although Investment 4 offers the highest expected return (24%), its variance is penalized heavily. Investment 3 offers a good return (21%) with the lowest standard deviation (16%), making it optimal.
# Risk-neutral investor: A = 0, so U = E(r) only
cfa$Utility_neutral <- cfa$E_r
best_neutral <- which.max(cfa$Utility_neutral)
cat("Best investment for risk-neutral investor (A = 0):\n")
## Best investment for risk-neutral investor (A = 0):
cat(" Investment", cfa$Investment[best_neutral], "\n")
## Investment 4
cat(" E(r) =", cfa$E_r[best_neutral]*100, "%\n")
## E(r) = 24 %
Answer: Investment 4 — A risk-neutral investor ignores variance entirely (A = 0), so the utility function reduces to U = E(r). They simply choose the investment with the highest expected return, which is Investment 4 at 24%.
Answer: (b) Investor’s aversion to risk.
In the utility function U = E(r) − ½·A·σ²:
- A is the coefficient of risk aversion — it measures how much an investor dislikes variance.
- A higher A means greater dislike of risk: variance is penalized more, pushing the investor toward safer assets.
- A = 0 → risk neutral; A > 0 → risk averse; A < 0 → risk seeking.
Option (a) is incorrect — return requirements are separate from risk preference.
Option (c) is the certainty equivalent rate, which equals the utility value U itself, not A.
Option (d) is not how A functions mathematically.
summary_df <- data.frame(
Problem = c("10", "11 (A=2)", "12 (A=3)", "CFA 1 (A=4)", "CFA 2 (Risk Neutral)", "CFA 3"),
Question = c(
"E(r) and Variance of mixed portfolios",
"Optimal portfolio utility",
"Optimal portfolio utility",
"Best investment with A=4",
"Best investment, risk neutral",
"What does A represent?"
),
Answer = c(
"See table above",
paste0("W_index = ", W_index[best11]*100, "%, U = ", round(U_A2[best11],4)),
paste0("W_index = ", W_index[best12]*100, "%, U = ", round(U_A3[best12],4)),
paste0("Investment 3, U = ", round(cfa$Utility[best_cfa],4)),
paste0("Investment 4, E(r) = 24%"),
"b) Investor's aversion to risk"
)
)
kable(summary_df, align = "lll", caption = "Summary of All Answers")
| Problem | Question | Answer |
|---|---|---|
| 10 | E(r) and Variance of mixed portfolios | See table above |
| 11 (A=2) | Optimal portfolio utility | W_index = 100%, U = 0.09 |
| 12 (A=3) | Optimal portfolio utility | W_index = 60%, U = 0.0764 |
| CFA 1 (A=4) | Best investment with A=4 | Investment 3, U = 0.1588 |
| CFA 2 (Risk Neutral) | Best investment, risk neutral | Investment 4, E(r) = 24% |
| CFA 3 | What does A represent? | b) Investor’s aversion to risk |