Maulana Ahmad Fahrezi
Student ID: 114035115
This assignment analyzes portfolio return, variance, and investor utility using historical financial data.
The analysis includes:
This problem calculates the expected return and variance of portfolios consisting of T-bills and the S&P 500 index.
Assumptions:
# Portfolio weights
w_tbills <- c(0,0.2,0.4,0.6,0.8,1)
w_index <- 1 - w_tbills
# Returns
r_tbill <- 0.05
r_index <- 0.13
# Standard deviation
sd_index <- 0.20
sd_tbill <- 0
# Expected portfolio return
portfolio_return <- w_tbills*r_tbill + w_index*r_index
# Portfolio variance (T-bill variance = 0)
portfolio_variance <- (w_index^2)*(sd_index^2)
# Create table
portfolio_table <- data.frame(
W_Tbill = w_tbills,
W_Index = w_index,
Expected_Return = portfolio_return,
Variance = portfolio_variance
)
round(portfolio_table,4)
From the table above, we can see that portfolios with a higher allocation to the S&P 500 provide higher expected returns but also higher risk (variance). Conversely, portfolios with higher allocations to T-bills have lower risk but also lower expected returns.
This demonstrates the fundamental trade-off between risk and return in portfolio management.
plot(portfolio_variance, portfolio_return,
xlab="Portfolio Risk (Variance)",
ylab="Expected Return",
main="Risk vs Return of Portfolios",
pch=19)
The graph illustrates the relationship between portfolio risk and expected return. As the allocation to the S&P 500 increases, both expected return and risk increase. This visualizes the fundamental trade-off between risk and return.
The utility of each portfolio is calculated using the utility function:
U = E(r) − 0.5 × A × σ²
Where:
In this problem, A = 2.
A <- 2
utility_A2 <- portfolio_return - 0.5*A*portfolio_variance
portfolio_table$Utility_A2 <- utility_A2
round(portfolio_table,4)
Based on the utility values calculated with A = 2, we can determine which portfolio provides the highest utility for an investor with moderate risk aversion. The portfolio with the highest utility represents the best balance between return and risk for this investor.
The optimal portfolio is the one with the highest utility value in the table above.
This problem repeats the utility calculation with a higher risk aversion level. By comparing the utility values, we can identify the optimal portfolio for an investor with higher risk aversion (A = 3).
A <- 3
utility_A3 <- portfolio_return - 0.5*A*portfolio_variance
portfolio_table$Utility_A3 <- utility_A3
round(portfolio_table,4)
When the risk aversion coefficient increases to A = 3, the investor becomes more sensitive to risk. As a result, portfolios with lower variance become more attractive, even if their expected return is slightly lower. This demonstrates how investor preferences change depending on their tolerance for risk.
plot(portfolio_return, portfolio_table$Utility_A2,
xlab="Expected Return",
ylab="Utility (A = 2)",
main="Utility vs Expected Return",
pch=19)
This graph shows how investor utility changes as expected return increases. The optimal portfolio is the one that maximizes the utility value for the investor.
The following investments are evaluated using the utility formula.
# Investment data
investment <- 1:4
expected_return <- c(0.12,0.15,0.21,0.24)
sd <- c(0.30,0.50,0.16,0.21)
variance <- sd^2
A <- 4
utility <- expected_return - 0.5*A*variance
investment_table <- data.frame(
Investment = investment,
Expected_Return = expected_return,
Std_Dev = sd,
Variance = variance,
Utility = utility
)
round(investment_table,4)
If the investor is risk neutral, the risk aversion parameter becomes:
A = 0
In this case, the investor only cares about expected return.
A <- 0
utility_risk_neutral <- expected_return - 0.5*A*variance
investment_table$Utility_RiskNeutral <- utility_risk_neutral
round(investment_table,4)
The variable A in the utility function represents the investor’s risk aversion.
A higher value of A indicates that the investor dislikes risk more strongly, meaning the investor prefers portfolios with lower variance even if the expected return is lower.
This analysis demonstrates how portfolio allocation affects expected return, variance, and investor utility. By adjusting the risk aversion coefficient (A), different investors may choose different optimal portfolios depending on their tolerance for risk.