def show_perf_stats(returns, factor_returns=None, positions=None,<EOL>transactions=None, turnover_denom='<STR_LIT>',<EOL>live_start_date=None, bootstrap=False,<EOL>header_rows=None):
if bootstrap:<EOL><INDENT>perf_func = timeseries.perf_stats_bootstrap<EOL><DEDENT>else:<EOL><INDENT>perf_func = timeseries.perf_stats<EOL><DEDENT>perf_stats_all = perf_func(<EOL>returns,<EOL>factor_returns=factor_returns,<EOL>positions=positions,<EOL>transactions=transactions,<EOL>turnover_denom=turnover_denom)<EOL>date_rows = OrderedDict()<EOL>if len(returns.index) > <NUM_LIT:0>:<EOL><INDENT>date_rows['<STR_LIT>'] = returns.index[<NUM_LIT:0>].strftime('<STR_LIT>')<EOL>date_rows['<STR_LIT>'] = returns.index[-<NUM_LIT:1>].strftime('<STR_LIT>')<EOL><DEDENT>if live_start_date is not None:<EOL><INDENT>live_start_date = ep.utils.get_utc_timestamp(live_start_date)<EOL>returns_is = returns[returns.index < live_start_date]<EOL>returns_oos = returns[returns.index >= live_start_date]<EOL>positions_is = None<EOL>positions_oos = None<EOL>transactions_is = None<EOL>transactions_oos = None<EOL>if positions is not None:<EOL><INDENT>positions_is = positions[positions.index < live_start_date]<EOL>positions_oos = positions[positions.index >= live_start_date]<EOL>if transactions is not None:<EOL><INDENT>transactions_is = transactions[(transactions.index <<EOL>live_start_date)]<EOL>transactions_oos = transactions[(transactions.index ><EOL>live_start_date)]<EOL><DEDENT><DEDENT>perf_stats_is = perf_func(<EOL>returns_is,<EOL>factor_returns=factor_returns,<EOL>positions=positions_is,<EOL>transactions=transactions_is,<EOL>turnover_denom=turnover_denom)<EOL>perf_stats_oos = perf_func(<EOL>returns_oos,<EOL>factor_returns=factor_returns,<EOL>positions=positions_oos,<EOL>transactions=transactions_oos,<EOL>turnover_denom=turnover_denom)<EOL>if len(returns.index) > <NUM_LIT:0>:<EOL><INDENT>date_rows['<STR_LIT>'] = int(len(returns_is) /<EOL>APPROX_BDAYS_PER_MONTH)<EOL>date_rows['<STR_LIT>'] = int(len(returns_oos) /<EOL>APPROX_BDAYS_PER_MONTH)<EOL><DEDENT>perf_stats = pd.concat(OrderedDict([<EOL>('<STR_LIT>', perf_stats_is),<EOL>('<STR_LIT>', perf_stats_oos),<EOL>('<STR_LIT>', perf_stats_all),<EOL>]), axis=<NUM_LIT:1>)<EOL><DEDENT>else:<EOL><INDENT>if len(returns.index) > <NUM_LIT:0>:<EOL><INDENT>date_rows['<STR_LIT>'] = int(len(returns) /<EOL>APPROX_BDAYS_PER_MONTH)<EOL><DEDENT>perf_stats = pd.DataFrame(perf_stats_all, columns=['<STR_LIT>'])<EOL><DEDENT>for column in perf_stats.columns:<EOL><INDENT>for stat, value in perf_stats[column].iteritems():<EOL><INDENT>if stat in STAT_FUNCS_PCT:<EOL><INDENT>perf_stats.loc[stat, column] = str(np.round(value * <NUM_LIT:100>,<EOL><NUM_LIT:1>)) + '<STR_LIT:%>'<EOL><DEDENT><DEDENT><DEDENT>if header_rows is None:<EOL><INDENT>header_rows = date_rows<EOL><DEDENT>else:<EOL><INDENT>header_rows = OrderedDict(header_rows)<EOL>header_rows.update(date_rows)<EOL><DEDENT>utils.print_table(<EOL>perf_stats,<EOL>float_format='<STR_LIT>'.format,<EOL>header_rows=header_rows,<EOL>)<EOL>
Prints some performance metrics of the strategy.

- Shows amount of time the strategy has been run in backtest and
  out-of-sample (in live trading).

- Shows Omega ratio, max drawdown, Calmar ratio, annual return,
  stability, Sharpe ratio, annual volatility, alpha, and beta.

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.
positions : pd.DataFrame, optional
    Daily net position values.
     - See full explanation in create_full_tear_sheet.
transactions : pd.DataFrame, optional
    Prices and amounts of executed trades. One row per trade.
    - See full explanation in tears.create_full_tear_sheet
turnover_denom : str, optional
    Either AGB or portfolio_value, default AGB.
    - See full explanation in txn.get_turnover.
live_start_date : datetime, optional
    The point in time when the strategy began live trading, after
    its backtest period.
bootstrap : boolean, optional
    Whether to perform bootstrap analysis for the performance
    metrics.
     - For more information, see timeseries.perf_stats_bootstrap
header_rows : dict or OrderedDict, optional
    Extra rows to display at the top of the displayed table.