1 Question 1

dell_data <- read_csv("fnce611_hw4.csv")

1.1 Part a

lm1 <- lm(dell_excess_return ~ sp_excess_return, data = dell_data)

equation = function(x) {
  lm_coef <- list(a = formatC(coef(x)[1], digits = 4, format = 'f'),
                  b = formatC(coef(x)[2], digits = 4, format = 'f'),
                  r2 = formatC(summary(x)$r.squared, digits = 2, format = 'f'));
  lm_eq <- substitute(italic(y) == a + b %.% italic(x)*","~~italic(R)^2~"="~r2,lm_coef)
  as.character(as.expression(lm_eq));                 
}

dell_data %>%
  ggplot(aes(x = sp_excess_return, y = dell_excess_return)) +
  geom_point() + 
  geom_smooth(method = 'lm', se = FALSE) +
  annotate("rect", xmin = -.17, xmax = -.028, ymin = .08, ymax = 0.12, fill="white", colour = pal538[['red']]) +
  annotate("text", x = -0.1, y = 0.1, label = equation(lm1), parse = TRUE, 
           family = "DecimaMonoPro", size = 3) +
  theme_jrf(users_v = 'rstudio') +
  labs(title = "Linear Regression of 5-year History", x = "S&P Excess Return", 
       y = "Dell Excess Return")

beta <- 
  lm1 %>% 
  tidy() %>%
  filter(term == "sp_excess_return") %>%
  select(estimate) %>%
  unlist() %>%
  unname()

We find that \(\beta\) = 0.9803.

1.2 Part b

dell_expected_return <- mean(dell_data$risk_free_return) * 52 + 
        beta * (mean(dell_data$sp_return) * 52 - mean(dell_data$risk_free_return) * 52)

Dell’s expected return is 0.0726.

1.3 Part c

\[\begin{align} \ r_{dell} & = r_{f} + \beta_{dell}(r_{m} + r_{f}) \\ & = 0.0387 + 0.9803 (0.0845 - 0.0387) \\ & = 0.0836 \end{align}\]
  • Pros:
  • Cons:

1.4 Part d

variance <- 
  dell_data %>%
  summarise(
    dell_var = sd(dell_return)^2 * 52
    , sp_var = sd(sp_return)^2 * 52
    )

Annualized Variance of Dell and the market return
dell_var sp_var
0.1342 0.0513

1.5 Part e

\[\begin{align} \ Var(r_{dell}) &= \beta_{dell}^2 Var(r_{m}) + [\text{firm specific risk}] \\ \ 0.1342 &= 0.9803^2 \cdot 0.0513 + [\text{firm specific risk}] \end{align}\]

Of Dell’s sample variance, 0.1342, we can say that 0.0493 is from market risk and 0.0849 is firm specific risk.

2 Question 2

3 Question 3

4 Question 4