def plot_rolling_returns(returns,<EOL>factor_returns=None,<EOL>live_start_date=None,<EOL>logy=False,<EOL>cone_std=None,<EOL>legend_loc='<STR_LIT>',<EOL>volatility_match=False,<EOL>cone_function=timeseries.forecast_cone_bootstrap,<EOL>ax=None, **kwargs):
if ax is None:<EOL><INDENT>ax = plt.gca()<EOL><DEDENT>ax.set_xlabel('<STR_LIT>')<EOL>ax.set_ylabel('<STR_LIT>')<EOL>ax.set_yscale('<STR_LIT>' if logy else '<STR_LIT>')<EOL>if volatility_match and factor_returns is None:<EOL><INDENT>raise ValueError('<STR_LIT>'<EOL>'<STR_LIT>')<EOL><DEDENT>elif volatility_match and factor_returns is not None:<EOL><INDENT>bmark_vol = factor_returns.loc[returns.index].std()<EOL>returns = (returns / returns.std()) * bmark_vol<EOL><DEDENT>cum_rets = ep.cum_returns(returns, <NUM_LIT:1.0>)<EOL>y_axis_formatter = FuncFormatter(utils.two_dec_places)<EOL>ax.yaxis.set_major_formatter(FuncFormatter(y_axis_formatter))<EOL>if factor_returns is not None:<EOL><INDENT>cum_factor_returns = ep.cum_returns(<EOL>factor_returns[cum_rets.index], <NUM_LIT:1.0>)<EOL>cum_factor_returns.plot(lw=<NUM_LIT:2>, color='<STR_LIT>',<EOL>label=factor_returns.name, alpha=<NUM_LIT>,<EOL>ax=ax, **kwargs)<EOL><DEDENT>if live_start_date is not None:<EOL><INDENT>live_start_date = ep.utils.get_utc_timestamp(live_start_date)<EOL>is_cum_returns = cum_rets.loc[cum_rets.index < live_start_date]<EOL>oos_cum_returns = cum_rets.loc[cum_rets.index >= live_start_date]<EOL><DEDENT>else:<EOL><INDENT>is_cum_returns = cum_rets<EOL>oos_cum_returns = pd.Series([])<EOL><DEDENT>is_cum_returns.plot(lw=<NUM_LIT:3>, color='<STR_LIT>', alpha=<NUM_LIT>,<EOL>label='<STR_LIT>', ax=ax, **kwargs)<EOL>if len(oos_cum_returns) > <NUM_LIT:0>:<EOL><INDENT>oos_cum_returns.plot(lw=<NUM_LIT:4>, color='<STR_LIT>', alpha=<NUM_LIT>,<EOL>label='<STR_LIT>', ax=ax, **kwargs)<EOL>if cone_std is not None:<EOL><INDENT>if isinstance(cone_std, (float, int)):<EOL><INDENT>cone_std = [cone_std]<EOL><DEDENT>is_returns = returns.loc[returns.index < live_start_date]<EOL>cone_bounds = cone_function(<EOL>is_returns,<EOL>len(oos_cum_returns),<EOL>cone_std=cone_std,<EOL>starting_value=is_cum_returns[-<NUM_LIT:1>])<EOL>cone_bounds = cone_bounds.set_index(oos_cum_returns.index)<EOL>for std in cone_std:<EOL><INDENT>ax.fill_between(cone_bounds.index,<EOL>cone_bounds[float(std)],<EOL>cone_bounds[float(-std)],<EOL>color='<STR_LIT>', alpha=<NUM_LIT:0.5>)<EOL><DEDENT><DEDENT><DEDENT>if legend_loc is not None:<EOL><INDENT>ax.legend(loc=legend_loc, frameon=True, framealpha=<NUM_LIT:0.5>)<EOL><DEDENT>ax.axhline(<NUM_LIT:1.0>, linestyle='<STR_LIT>', color='<STR_LIT>', lw=<NUM_LIT:2>)<EOL>return ax<EOL>
Plots cumulative rolling returns versus some benchmarks'.

Backtest returns are in green, and out-of-sample (live trading)
returns are in red.

Additionally, a non-parametric cone plot may be added to the
out-of-sample returns region.

Parameters
----------
returns : pd.Series
    Daily returns of the strategy, noncumulative.
     - See full explanation in tears.create_full_tear_sheet.
factor_returns : pd.Series, optional
    Daily noncumulative returns of the benchmark factor to which betas are
    computed. Usually a benchmark such as market returns.
     - This is in the same style as returns.
live_start_date : datetime, optional
    The date when the strategy began live trading, after
    its backtest period. This date should be normalized.
logy : bool, optional
    Whether to log-scale the y-axis.
cone_std : float, or tuple, optional
    If float, The standard deviation to use for the cone plots.
    If tuple, Tuple of standard deviation values to use for the cone plots
     - See timeseries.forecast_cone_bounds for more details.
legend_loc : matplotlib.loc, optional
    The location of the legend on the plot.
volatility_match : bool, optional
    Whether to normalize the volatility of the returns to those of the
    benchmark returns. This helps compare strategies with different
    volatilities. Requires passing of benchmark_rets.
cone_function : function, optional
    Function to use when generating forecast probability cone.
    The function signiture must follow the form:
    def cone(in_sample_returns (pd.Series),
             days_to_project_forward (int),
             cone_std= (float, or tuple),
             starting_value= (int, or float))
    See timeseries.forecast_cone_bootstrap for an example.
ax : matplotlib.Axes, optional
    Axes upon which to plot.
**kwargs, optional
    Passed to plotting function.

Returns
-------
ax : matplotlib.Axes
    The axes that were plotted on.