1. Introduction

This report analyzes the returns of six portfolios formed on size and book-to-market ratios from the Kenneth French Data Library. The goal is to compute descriptive statistics and compare the return distributions across two time periods.

  1. Load Packages
library(tidyverse) 
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr     1.2.0     ✔ readr     2.2.0
## ✔ forcats   1.0.1     ✔ stringr   1.6.0
## ✔ ggplot2   4.0.2     ✔ tibble    3.3.1
## ✔ lubridate 1.9.5     ✔ tidyr     1.3.2
## ✔ purrr     1.2.1     
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(readr) 
library(dplyr) 
library(moments)
  1. Import data
data <- read.csv("6_Portfolios_2x3.csv", skip=15)
view(data)

Rename columns

data <- data %>%
  rename(
    date = X192708,
    SL   = X2.4876,
    SM   = X.2.3003,
    SH   = X0.7332,
    BL   = X4.0055,
    BM   = X1.1524,
    BH   = X.1.9351
  )

Numeric the variables

data <- data %>%
  mutate(across(date:BH, ~as.numeric(trimws(.))))
## Warning: There were 7 warnings in `mutate()`.
## The first warning was:
## ℹ In argument: `across(date:BH, ~as.numeric(trimws(.)))`.
## Caused by warning:
## ! NAs introduced by coercion
## ℹ Run `dplyr::last_dplyr_warnings()` to see the 6 remaining warnings.
data[data == "."] <- NA
data <- data %>% mutate(across(SL:BH, as.numeric))

Convert returns from percent

data[,2:7] <- data[,2:7] / 100
  1. Split Dataset
first_half <- data %>% filter(date >= 193001 & date <= 197412)
second_half <- data %>% filter(date >= 197501 & date <= 201812)
  1. Statistic function
portfolio_stats <- function(df){

  data.frame(
    Portfolio = c("SL","SM","SH"),

    Mean = c(mean(df$SL), mean(df$SM), mean(df$SH)),

    SD = c(sd(df$SL), sd(df$SM), sd(df$SH)),

    Skewness = c(skewness(df$SL),
                 skewness(df$SM),
                 skewness(df$SH)),

    Kurtosis = c(kurtosis(df$SL),
                 kurtosis(df$SM),
                 kurtosis(df$SH))
  )
}
  1. Calculate Statistics
stats_1930_1974 <- portfolio_stats(first_half)
stats_1975_2018 <- portfolio_stats(second_half)

stats_1930_1974
##   Portfolio      Mean        SD Skewness Kurtosis
## 1        SL 0.2506980 0.7993628 5.775917 42.90931
## 2        SM 0.3980074 1.0552911 4.341012 27.76480
## 3        SH 0.4324318 1.1459337 4.528249 30.61588
stats_1975_2018
##   Portfolio     Mean       SD Skewness Kurtosis
## 1        SL 1.694753 3.850970 2.383251 7.688315
## 2        SM 1.713936 3.757114 2.120033 6.138402
## 3        SH 1.801386 4.395081 2.610576 9.017531
  1. Comparison
comparison <- merge(stats_1930_1974,
                    stats_1975_2018,
                    by="Portfolio",
                    suffixes=c("_1930_1974",
                               "_1975_2018"))

comparison
##   Portfolio Mean_1930_1974 SD_1930_1974 Skewness_1930_1974 Kurtosis_1930_1974
## 1        SH      0.4324318    1.1459337           4.528249           30.61588
## 2        SL      0.2506980    0.7993628           5.775917           42.90931
## 3        SM      0.3980074    1.0552911           4.341012           27.76480
##   Mean_1975_2018 SD_1975_2018 Skewness_1975_2018 Kurtosis_1975_2018
## 1       1.801386     4.395081           2.610576           9.017531
## 2       1.694753     3.850970           2.383251           7.688315
## 3       1.713936     3.757114           2.120033           6.138402
  1. Average Return Comparison
ggplot(comparison,
       aes(x=Portfolio,
           y=Mean_1930_1974)) +
  geom_bar(stat="identity") +
  ggtitle("Average Returns (1930–1974)")

ggplot(comparison,
       aes(x=Portfolio,
           y=Mean_1975_2018)) +
  geom_bar(stat="identity") +
  ggtitle("Average Returns (1975–2018)")

  1. Risk Comparison
ggplot(comparison,
       aes(x=Portfolio,
           y=SD_1930_1974)) +
  geom_bar(stat="identity") +
  ggtitle("Volatility (1930–1974)")

ggplot(comparison,
       aes(x=Portfolio,
           y=SD_1975_2018)) +
  geom_bar(stat="identity") +
  ggtitle("Volatility (1975–2018)")

  1. Discussion

The descriptive statistics reveal differences between the two periods. Average returns are higher in the later period. Portfolios with high book-to-market ratios tend to produce higher returns.

Standard deviation is also larger in the second period, indicating greater volatility.

Both periods exhibit positive skewness and high kurtosis, suggesting that financial returns have asymmetric distributions and fat tails.

  1. Conclusion

Because the mean, standard deviation, skewness, and kurtosis change significantly between the two periods, the results suggest that the portfolio returns do not come from the same distribution across time.

  1. CFA Problem

Problem

Given $100,000 to invest, we want to calculate the expected risk premium of investing in equities compared to risk-free T-bills.

Step 1: Risk Premium Formula

The risk premium is defined as:

\[ Risk\ Premium = E(R_{equity}) - R_f \]

Where:

  • \(E(R_{equity})\) = Expected return from equities
  • \(R_f\) = Risk-free return

Step 2: Investment Outcomes

Scenario Probability Return ($)
Good Market 0.6 50,000
Bad Market 0.4 -30,000

Step 3: Expected Return of Equities

# Probabilities
prob <- c(0.6, 0.4)

# Returns
returns <- c(50000, -30000)

# Expected equity return
expected_equity <- sum(prob * returns)

expected_equity
## [1] 18000

Expected equity return:

scales::dollar(expected_equity)
## [1] "$18,000"

Step 4: Risk-Free Return

risk_free <- 5000
scales::dollar(risk_free)
## [1] "$5,000"

The risk-free investment (T-bill) provides a return of $5,000.

Step 5: Risk Premium Calculation

risk_premium <- expected_equity - risk_free
risk_premium
## [1] 13000

Formatted result:

scales::dollar(risk_premium)
## [1] "$13,000"

Final Answer

The expected risk premium of investing in equities instead of T-bills is $13,000.

This means investors expect to earn $13,000 more on average as compensation for taking additional risk in the equity market.