Created
December 22, 2019 09:12
-
-
Save FrederikBussler/019d14921029cb46c80d228b958ca810 to your computer and use it in GitHub Desktop.
Performance
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
strats = ['returns'] # 19 | |
for col in cols: # 20 | |
strat = 'strategy_%s' % col.split('_')[1] # 21 | |
df[strat] = df[col].shift(1) * df['returns'] # 22 | |
strats.append(strat) # 23 | |
df[strats].dropna().cumsum().apply(np.exp).plot() # 24 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment