@plotting.customize<EOL>def create_returns_tear_sheet(returns, positions=None,<EOL>transactions=None,<EOL>live_start_date=None,<EOL>cone_std=(<NUM_LIT:1.0>, <NUM_LIT>, <NUM_LIT>),<EOL>benchmark_rets=None,<EOL>bootstrap=False,<EOL>turnover_denom='<STR_LIT>',<EOL>header_rows=None,<EOL>return_fig=False):
if benchmark_rets is not None:<EOL><INDENT>returns = utils.clip_returns_to_benchmark(returns, benchmark_rets)<EOL><DEDENT>plotting.show_perf_stats(returns, benchmark_rets,<EOL>positions=positions,<EOL>transactions=transactions,<EOL>turnover_denom=turnover_denom,<EOL>bootstrap=bootstrap,<EOL>live_start_date=live_start_date,<EOL>header_rows=header_rows)<EOL>plotting.show_worst_drawdown_periods(returns)<EOL>vertical_sections = <NUM_LIT:11><EOL>if live_start_date is not None:<EOL><INDENT>vertical_sections += <NUM_LIT:1><EOL>live_start_date = ep.utils.get_utc_timestamp(live_start_date)<EOL><DEDENT>if benchmark_rets is not None:<EOL><INDENT>vertical_sections += <NUM_LIT:1><EOL><DEDENT>if bootstrap:<EOL><INDENT>vertical_sections += <NUM_LIT:1><EOL><DEDENT>fig = plt.figure(figsize=(<NUM_LIT>, vertical_sections * <NUM_LIT:6>))<EOL>gs = gridspec.GridSpec(vertical_sections, <NUM_LIT:3>, wspace=<NUM_LIT:0.5>, hspace=<NUM_LIT:0.5>)<EOL>ax_rolling_returns = plt.subplot(gs[:<NUM_LIT:2>, :])<EOL>i = <NUM_LIT:2><EOL>ax_rolling_returns_vol_match = plt.subplot(gs[i, :],<EOL>sharex=ax_rolling_returns)<EOL>i += <NUM_LIT:1><EOL>ax_rolling_returns_log = plt.subplot(gs[i, :],<EOL>sharex=ax_rolling_returns)<EOL>i += <NUM_LIT:1><EOL>ax_returns = plt.subplot(gs[i, :],<EOL>sharex=ax_rolling_returns)<EOL>i += <NUM_LIT:1><EOL>if benchmark_rets is not None:<EOL><INDENT>ax_rolling_beta = plt.subplot(gs[i, :], sharex=ax_rolling_returns)<EOL>i += <NUM_LIT:1><EOL><DEDENT>ax_rolling_volatility = plt.subplot(gs[i, :], sharex=ax_rolling_returns)<EOL>i += <NUM_LIT:1><EOL>ax_rolling_sharpe = plt.subplot(gs[i, :], sharex=ax_rolling_returns)<EOL>i += <NUM_LIT:1><EOL>ax_drawdown = plt.subplot(gs[i, :], sharex=ax_rolling_returns)<EOL>i += <NUM_LIT:1><EOL>ax_underwater = plt.subplot(gs[i, :], sharex=ax_rolling_returns)<EOL>i += <NUM_LIT:1><EOL>ax_monthly_heatmap = plt.subplot(gs[i, <NUM_LIT:0>])<EOL>ax_annual_returns = plt.subplot(gs[i, <NUM_LIT:1>])<EOL>ax_monthly_dist = plt.subplot(gs[i, <NUM_LIT:2>])<EOL>i += <NUM_LIT:1><EOL>ax_return_quantiles = plt.subplot(gs[i, :])<EOL>i += <NUM_LIT:1><EOL>plotting.plot_rolling_returns(<EOL>returns,<EOL>factor_returns=benchmark_rets,<EOL>live_start_date=live_start_date,<EOL>cone_std=cone_std,<EOL>ax=ax_rolling_returns)<EOL>ax_rolling_returns.set_title(<EOL>'<STR_LIT>')<EOL>plotting.plot_rolling_returns(<EOL>returns,<EOL>factor_returns=benchmark_rets,<EOL>live_start_date=live_start_date,<EOL>cone_std=None,<EOL>volatility_match=(benchmark_rets is not None),<EOL>legend_loc=None,<EOL>ax=ax_rolling_returns_vol_match)<EOL>ax_rolling_returns_vol_match.set_title(<EOL>'<STR_LIT>')<EOL>plotting.plot_rolling_returns(<EOL>returns,<EOL>factor_returns=benchmark_rets,<EOL>logy=True,<EOL>live_start_date=live_start_date,<EOL>cone_std=cone_std,<EOL>ax=ax_rolling_returns_log)<EOL>ax_rolling_returns_log.set_title(<EOL>'<STR_LIT>')<EOL>plotting.plot_returns(<EOL>returns,<EOL>live_start_date=live_start_date,<EOL>ax=ax_returns,<EOL>)<EOL>ax_returns.set_title(<EOL>'<STR_LIT>')<EOL>if benchmark_rets is not None:<EOL><INDENT>plotting.plot_rolling_beta(<EOL>returns, benchmark_rets, ax=ax_rolling_beta)<EOL><DEDENT>plotting.plot_rolling_volatility(<EOL>returns, factor_returns=benchmark_rets, ax=ax_rolling_volatility)<EOL>plotting.plot_rolling_sharpe(<EOL>returns, ax=ax_rolling_sharpe)<EOL>plotting.plot_drawdown_periods(<EOL>returns, top=<NUM_LIT:5>, ax=ax_drawdown)<EOL>plotting.plot_drawdown_underwater(<EOL>returns=returns, ax=ax_underwater)<EOL>plotting.plot_monthly_returns_heatmap(returns, ax=ax_monthly_heatmap)<EOL>plotting.plot_annual_returns(returns, ax=ax_annual_returns)<EOL>plotting.plot_monthly_returns_dist(returns, ax=ax_monthly_dist)<EOL>plotting.plot_return_quantiles(<EOL>returns,<EOL>live_start_date=live_start_date,<EOL>ax=ax_return_quantiles)<EOL>if bootstrap and (benchmark_rets is not None):<EOL><INDENT>ax_bootstrap = plt.subplot(gs[i, :])<EOL>plotting.plot_perf_stats(returns, benchmark_rets,<EOL>ax=ax_bootstrap)<EOL><DEDENT>elif bootstrap:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>for ax in fig.axes:<EOL><INDENT>plt.setp(ax.get_xticklabels(), visible=True)<EOL><DEDENT>if return_fig:<EOL><INDENT>return fig<EOL><DEDENT>
Generate a number of plots for analyzing a strategy's returns.

- Fetches benchmarks, then creates the plots on a single figure.
- Plots: rolling returns (with cone), rolling beta, rolling sharpe,
    rolling Fama-French risk factors, drawdowns, underwater plot, monthly
    and annual return plots, daily similarity plots,
    and return quantile box plot.
- Will also print the start and end dates of the strategy,
    performance statistics, drawdown periods, and the return range.

Parameters
----------
returns : pd.Series
    Daily returns of the strategy, noncumulative.
     - See full explanation in create_full_tear_sheet.
positions : pd.DataFrame, optional
    Daily net position values.
     - See full explanation in create_full_tear_sheet.
transactions : pd.DataFrame, optional
    Executed trade volumes and fill prices.
    - See full explanation in create_full_tear_sheet.
live_start_date : datetime, optional
    The point in time when the strategy began live trading,
    after its backtest period.
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
     - The cone is a normal distribution with this standard deviation
         centered around a linear regression.
benchmark_rets : pd.Series, optional
    Daily noncumulative returns of the benchmark.
     - This is in the same style as returns.
bootstrap : boolean, optional
    Whether to perform bootstrap analysis for the performance
    metrics. Takes a few minutes longer.
turnover_denom : str, optional
    Either AGB or portfolio_value, default AGB.
    - See full explanation in txn.get_turnover.
header_rows : dict or OrderedDict, optional
    Extra rows to display at the top of the perf stats table.
return_fig : boolean, optional
    If True, returns the figure that was plotted on.