abdullahkarasan / mlfrm

Other
72 stars 48 forks source link

Chapter 9 - Stock Price Crash Measures #7

Open mshearer0 opened 2 years ago

mshearer0 commented 2 years ago

This section of code is not needed as crash_dataw is not referenced further:

std = crash_data.groupby('TICKER')['RET'].resample('W').std()\ .reset_index() crash_dataw['std'] = pd.DataFrame(std['RET'])

The count values are not used:

merge_all = merge_grouped.groupby('TICKER')\ .resample('1Y').agg({'down':['sum', 'count'], 'up':['sum', 'count']})\ .reset_index() merge_all.head()