intercept = 0.01013452166825877
bm 0.000078
roeq 0.000027
dtype: float64
Kerry Back
intercept = 0.01013452166825877
bm 0.000078
roeq 0.000027
dtype: float64
test = test.join(quintiles)
rets = test.reset_index().groupby(["date", "quintile"]).ret.mean()
rets = rets.unstack()
print(rets.head())
print(rets.mean())
quintile 1 2 3 4 5
date
2010-01 -0.018635 -0.029396 -0.019440 -0.011638 0.055819
2010-02 0.036299 0.040267 0.038363 0.039892 0.040899
2010-03 0.077513 0.064601 0.084102 0.071667 0.104047
2010-04 0.068089 0.047461 0.054447 0.085994 0.138964
2010-05 -0.085651 -0.066710 -0.072764 -0.077961 -0.102800
quintile
1 0.011773
2 0.012077
3 0.012061
4 0.011726
5 0.015664
dtype: float64