Skip to content

Commit

Permalink
BUG: perf.average_cumulative_return_by_quantile crahes
Browse files Browse the repository at this point in the history
  • Loading branch information
luca-s committed Mar 16, 2018
1 parent f5b070f commit f683b4b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions alphalens/performance.py
Original file line number Diff line number Diff line change
Expand Up @@ -966,6 +966,9 @@ def average_cumulative_return(q_fact, demean_by):
#
avgcumret = g_fq.groupby(g_fq).apply(average_cumulative_return,
demean_by)
if len(avgcumret) == 0:
continue

avgcumret['group'] = group
avgcumret.set_index('group', append=True, inplace=True)
returns_bygroup.append(avgcumret)
Expand Down

0 comments on commit f683b4b

Please sign in to comment.