Hi everyone, my algorithm would like to automatically extract Fama French factors from the official Fama French website as it updates itself monthly.
I am currently working on it in research environment and am unable to load the fama french factors from the website.
from io import StringIO
csv = qb.Download("https://mba.tuck.dartmouth.edu/pages/faculty/ken.french/ftp/F-F_Research_Data_Factors_CSV.zip")
# read file (which needs to be a csv) to a pandas DataFrame. include following imports above
# from io import StringIO
# import pandas as pd
df = pd.read_csv(StringIO(csv))
the error i'm getting is: ParserError: Error tokenizing data. C error: Expected 1 fields in line 4, saw 2.
Can someone please help me out with this issue/is there a more efficient way to automatically pull fama french 3 factors as it updates itself monthly?
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!