Current code:
alpha_function <- function(x){
group_by(wficn, caldt) %>%
lm(mktrf~excess_return, data = CRSP_database) %>%
tidy() %>%
[[1]]$estimate
return()
}
Data: date, fundno, mtna, mret, mnav, mktrf, smb, hml, umd, rf
Needed is a database showing the total alpha per fund per year. Or the beta of one fundno per year.