I'm toying around w/ the Fama-French 3 factor data, and I'm having a hard time getting results that approximate what was covered in their paper here: https://www.bauer.uh.edu/rsusmel/phd/Fama-French_JFE93.pdf
I downloaded the latest csv file from their website at this url: https://mba.tuck.dartmouth.edu/pages/faculty/ken.french/data_library.html#Research.
Here's some python code of a regression I did on a single stock. I know this isn't the same as an entire portfolio, but I still think the results are incorrect.
# cleaned file
fama = pd.read_csv('Downloads/fama_french_factors.csv')
# single stock data
data = yf.download('AAPL', freq = 'M')['Adj Close']
# get EOM returns for Apple
data = data.resample('M', convention = 'end').last()
data = data.pct_change().dropna()
data.index = data.index + MonthEnd(0)
# merge the files together
data = pd.merge_asof(data, fama, left_index = True, right_index = True)
# run a regression
y = data['Return']
X = data[['Mkt', 'SMB', 'HML']]
X = sm.add_constant(X)
# fit model w/ statsmodels
mod = sm.OLS(y, X)
res = mod.fit()
print(res.summary())
When I run this the regression gives an R2 value of 0.288, which strikes me as really low. I know my regressions don't exactly match what was done in paper, which is excess return for a portfolio regressed against the 3 factors, but I suspect there's something wrong, likely with how the dates are indexed against one another.
The fama data only contains year and month, and I'm not clear if those represent returns at the beginning of the month or the end of the month, which might be impact the results.
Wondering if anyone knows what's wrong with my setup.