Created
January 24, 2021 07:06
-
-
Save HumanRupert/531610d72ba2d6990b1702a0bd20ed10 to your computer and use it in GitHub Desktop.
ff3fm_factors
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
factors = pd.read_csv("./data/factors.csv", index_col="Date") | |
# convert Date index to datetime object | |
factors.index= pd.to_datetime(factors.index, format="%Y%m%d") | |
# get monthly avg | |
factors = factors.resample('BM').mean() | |
factors_cum = factors.cumsum() | |
factors_cum.plot.line() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment