code: def plot_rolling_returns(
      returns,
      factor_returns=None,
      live_start_date=None,
      logy=False,
      cone_std=None,
      legend_loc="best",
      volatility_match=False,
      cone_function=timeseries.forecast_cone_bootstrap,
      ax=None,
      **kwargs,
  ):
      """
      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.
      """
  
      if ax is None:
          ax = plt.gca()
  
      ax.set_xlabel("")
      ax.set_ylabel("Cumulative returns")
      ax.set_yscale("log" if logy else "linear")
  
      if volatility_match and factor_returns is None:
          raise ValueError(
              "volatility_match requires passing of " "factor_returns."
          )
      elif volatility_match and factor_returns is not None:
          bmark_vol = factor_returns.loc[returns.index].std()
          returns = (returns / returns.std()) * bmark_vol
  
      cum_rets = ep.cum_returns(returns, 1.0)
  
      y_axis_formatter = FuncFormatter(utils.two_dec_places)
      ax.yaxis.set_major_formatter(FuncFormatter(y_axis_formatter))
  
      if factor_returns is not None:
          cum_factor_returns = ep.cum_returns(
              factor_returns[cum_rets.index], 1.0
          )
          cum_factor_returns.plot(
              lw=2,
              color="gray",
              label=factor_returns.name,
              alpha=0.60,
              ax=ax,
              **kwargs,
          )
  
      if live_start_date is not None:
          live_start_date = ep.utils.get_utc_timestamp(live_start_date)
          is_cum_returns = cum_rets.loc[
              cum_rets.index < live_start_date
          ]
          oos_cum_returns = cum_rets.loc[
              cum_rets.index >= live_start_date
          ]
      else:
          is_cum_returns = cum_rets
          oos_cum_returns = pd.Series([])
  
      is_cum_returns.plot(
          lw=3,
          color="forestgreen",
          alpha=0.6,
          label="Backtest",
          ax=ax,
          **kwargs,
      )
  
      if len(oos_cum_returns) > 0:
          oos_cum_returns.plot(
              lw=4,
              color="red",
              alpha=0.6,
              label="Live",
              ax=ax,
              **kwargs,
          )
  
          if cone_std is not None:
              if isinstance(cone_std, (float, int)):
                  cone_std = [cone_std]
  
              is_returns = returns.loc[returns.index < live_start_date]
              cone_bounds = cone_function(
                  is_returns,
                  len(oos_cum_returns),
                  cone_std=cone_std,
                  starting_value=is_cum_returns[-1],
              )
  
              cone_bounds = cone_bounds.set_index(oos_cum_returns.index)
              for std in cone_std:
                  ax.fill_between(
                      cone_bounds.index,
                      cone_bounds[float(std)],
                      cone_bounds[float(-std)],
                      color="steelblue",
                      alpha=0.5,
                  )
  
      if legend_loc is not None:
          ax.legend(loc=legend_loc, frameon=True, framealpha=0.5)
      ax.axhline(1.0, linestyle="--", color="black", lw=2)
  
      return ax
  
imports: from __future__ import division
  import datetime
  from collections import OrderedDict
  from functools import wraps
  import empyrical
  import matplotlib
  import matplotlib.patches
  import matplotlib.pyplot
  import numpy
  import pandas
  import pytz
  import scipy
  from matplotlib import figure
  from matplotlib.backends.backend_agg import FigureCanvasAgg
  from matplotlib.ticker import FuncFormatter
  from .None import _seaborn
  from .None import capacity
  from .None import pos
  from .None import timeseries
  from .None import txn
  from .None import utils
  from .utils import APPROX_BDAYS_PER_MONTH, MM_DISPLAY_UNIT
label_desc: Use image node_id 14 for calling a global function with example usage: plot_rolling_returns(returns, factor_returns, live_start_date, logy, cone_std, legend_loc, volatility_match, cone_function, ax) and returns: ax