Hi,
I ran into this issue too. The documentation seems outdated.
Looking at the source code, the function takes indeed 3 non-optional arguments:
https://github.com/quantopian/alphalens/blob/master/alphalens/plotting.py#L714
def plot_cumulative_returns(factor_returns, period, freq, title=None, ax=None):
"""
Plots the cumulative returns of the returns series passed in.
Parameters
----------
factor_returns : pd.Series
Period wise returns of dollar neutral portfolio weighted by factor
value.
period: pandas.Timedelta or string
Length of period for which the returns are computed (e.g. 1 day)
if 'period' is a string it must follow pandas.Timedelta constructor
format (e.g. '1 days', '1D', '30m', '3h', '1D1h', etc)
freq : pandas DateOffset
Used to specify a particular trading calendar e.g. BusinessDay or Day
Usually this is inferred from utils.infer_trading_calendar, which is
called by either get_clean_factor_and_forward_returns or
compute_forward_returns
I guess you need to add the 3rd argument 'freq'. Here is a working example, assuming you already have the first two parameters:
from pandas.tseries.offsets import BDay
al.plotting.plot_cumulative_returns(factor_returns=factor_returns, period=period, freq=BDay())