Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
alphalens source code on Github is not up to date

Hi,

The package we use in the research env is different from what available on github.
for example:
https://github.com/quantopian/alphalens/blob/master/alphalens/utils.py
versus


Signature: alphalens.utils.compute_forward_returns(prices, periods=(1, 5, 10), filter_zscore=None)  
Docstring:  
Finds the N period forward returns (as percent change) for each asset provided.

Parameters  
----------  
prices : pd.DataFrame  
    Pricing data to use in forward price calculation.  
    Assets as columns, dates as index. Pricing data must  
    span the factor analysis time period plus an additional buffer window  
    that is greater than the maximum number of expected periods  
    in the forward returns calculations.  
periods : sequence[int]  
    periods to compute forward returns on.  
filter_zscore : int or float  
    Sets forward returns greater than X standard deviations  
    from the the mean to nan.  
    Caution: this outlier filtering incorporates lookahead bias.

Returns  
-------  
forward_returns : pd.DataFrame - MultiIndex  
    Forward returns in indexed by date and asset.  
    Separate column for each forward return window.  
File:      /usr/local/lib/python2.7/dist-packages/alphalens/utils.py  
Type:      function  

Can we make this in sync, so I know what I am actually using?

Thanks.

1 response

The github code is always up to date. On Quantopian the software (alphalens, pyfolio, zipline, etc) is updated from time to time from github projects. Alphalens on Quantopian hasn't been updated for some time this is the reason of the differences you noticed