Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Alphalens - How to create cumulative returns chart of greater than 1D holding period?

When I run the following in Alphalens...

create_returns_tear_sheet(factor_data,  
                                   long_short=True,  
                                   group_neutral=False,  
                                   by_group=True)  

... i get a suite of charts and tables, including 1, 5 & 10 day rolling returns charts. However it only produces a 1D cumulative returns chart (factor weighted long/short).

Is there a trick for producing the 5 and 10 day cumulative returns charts (factor weighted long/short)?

Any pointers appreciated!

3 responses

Anyway in a nutshell it is not possible now.

" In alphalens the "periods" refer to the time periods over which you want alphalens to investigate whether some predictive power exists. There is no re-balancing going on (and because of this, no sensitivity to frequencies selecting out specific days).

Here's the code of what alphalens does internally:

for period in periods:  
    delta = prices.pct_change(period).shift(-period)  

it's a simple pct_change() followed by .shift(-period).
"

Tks