7.5 Fama-French factors

Fama-French factors are available from Kenneth French’s website. We will use Fama-French 5 factors daily file. More description on what these factors are is available here.

I earlier downloaded and cleaned up the CSV file a little bit for easy operation. You can download it from this link: http://bit.ly/2V5euiB or you can directly read it as follows.

ff <- read.csv("http://bit.ly/2V5euiB") %>% 
  mutate(Date = lubridate::ymd(Date)) %>% 
  mutate_if(is.numeric, function(x) x / 100)

We divided all the returns by 100 to correctly convert them into fractions. Take a look at the data set.

head(ff)
##         Date   MktRF     SMB     HML     RMW     CMA      RF
## 1 1963-07-01 -0.0067  0.0000 -0.0032 -0.0001  0.0015 0.00012
## 2 1963-07-02  0.0079 -0.0027  0.0027 -0.0007 -0.0019 0.00012
## 3 1963-07-03  0.0063 -0.0017 -0.0009  0.0017 -0.0033 0.00012
## 4 1963-07-05  0.0040  0.0008 -0.0028  0.0008 -0.0033 0.00012
## 5 1963-07-08 -0.0063  0.0004 -0.0018 -0.0029  0.0013 0.00012
## 6 1963-07-09  0.0045  0.0000  0.0010  0.0014 -0.0004 0.00012

Next, we will merge Fama-French factors with price_stacked.

price_merge <- price_stakced %>% 
  inner_join(ff, by = c("ref.date" = "Date")) %>% 
  mutate(ret = ret.adjusted.prices - RF)

ret is \(ExcessRet_{it}\)