qis.generate_strategy_benchmark_factsheet_plt

qis.generate_strategy_benchmark_factsheet_plt(multi_portfolio_data, strategy_idx=0, benchmark_idx=1, time_period=None, perf_params=PerfParams(freq='W-WED', freq_vol='W-WED', freq_skewness='ME', freq_drawdown='D', freq_reg='W-WED', freq_excess_return='W-WED', return_type=<ReturnTypes.LOG: 'Log'>, sharpe_convention=<SharpeConvention.PA: 1>, rates_data=None), regime_classifier=<qis.perfstats.regime_classifier.BenchmarkReturnsQuantilesRegime object>, backtest_name=None, add_benchmarks_to_navs=False, add_brinson_attribution=True, add_exposures_pnl_attribution=False, add_strategy_factsheet=False, add_grouped_exposures=False, add_grouped_cum_pnl=False, add_tracking_error_table=False, add_exposures_comp=False, is_grouped=True, figsize=(8.3, 11.7), fontsize=5, add_joint_instrument_history_report=False, recent_ra_perf_table_start_date=Timestamp('2020-12-31 00:00:00'), brinson_time_period=None, brinson_group_data=None, *, add_performance_inference_sheet=True, alpha_inference=InterceptInference.BARTLETT_HAC, alpha_coverage=None, group_data=None, lookthrough_matrix=None, **kwargs)[source]

factsheet comparing one strategy against one benchmark, as a list of A4 figures.

The two-portfolio case, where the difference between them is the subject: the first page is the joint summary, followed by paired inference and Brinson attribution decomposing the active return into allocation and selection (including interaction). This is why this is a separate report from generate_multi_portfolio_factsheet(), which compares strategies that share no common weights.

The Brinson page labels its realised-trading-cost basis: gross by default, or net when is_net=True is passed through kwargs. This option does not attribute management fees, funding or other cash flows absent from instrument P&L.

Parameters:
  • alpha_coverage (HoldingsAlphaCoverage | None) – Optional explicit tiny-weight/proxy policy for holdings alpha. None keeps strict coverage. Enabled policies append coverage/excluded-date audit pages without changing beta warm-up, Sharpe, page one or portfolio NAV.

  • alpha_inference (InterceptInference) – Primary marginal-alpha uncertainty method; defaults to Bartlett HAC. PREWHITENED_AR1 is opt-in; the alternate is shown on the same sample as unadjusted sensitivity only. Forwarded to embedded strategy pages; Sharpe stays unchanged.

  • add_performance_inference_sheet (bool) – Default-on paired arithmetic-Sharpe and marginal holdings-alpha appendix before Brinson. Uses strategy_idx minus benchmark_idx; alpha uses only the first market benchmark, with shared freq_beta/factor_beta_span from kwargs (defaults B/260). Sharpe uses perf_params.freq_vol. Short/missing samples warn and remain unavailable. False omits inference here and in any appended standalone strategy factsheets, preserving the earlier kwargs forwarding behaviour. Page one is unchanged.

  • lookthrough_matrix (DataFrame | None) – Optional static instrument-by-sleeve fractions. Supplied rows are finite, nonnegative and sum to one; omitted rows use group_data. None preserves categorical reporting. This is an accounting split.

  • group_data (Series | None) – Ordinary instrument labels as a Series; defaults to portfolio metadata where available. Fractional memberships belong in lookthrough_matrix.

  • multi_portfolio_data (MultiPortfolioData) – the portfolios, strategy and benchmark among them

  • strategy_idx (int) – position of the strategy within multi_portfolio_data

  • benchmark_idx (int) – position of the benchmark within multi_portfolio_data

  • time_period (TimePeriod) – reporting window. None uses the full common history

  • recent_ra_perf_table_start_date (Timestamp | None) – start of the second risk-adjusted performance table. Defaults to 31 December 2020; None uses the trailing year

  • perf_params (PerfParams) – annualisation, frequency and rate conventions for the statistics

  • regime_classifier (BenchmarkReturnsQuantilesRegime) – how benchmark returns are mapped to regimes

  • backtest_name (str) – title of the report

  • add_benchmarks_to_navs (bool) – include the benchmarks as additional lines in the performance panels

  • brinson_time_period (TimePeriod | None) – Independent attribution window. None uses time_period. The first shared NAV is its baseline; earlier returns are excluded.

  • brinson_group_data (Series | None) – Legacy alias for report-wide group_data Series labels. Use lookthrough_matrix for fractional memberships.

  • add_brinson_attribution (bool) – add the allocation / selection decomposition, with interaction assigned entirely to instrument selection

  • add_exposures_pnl_attribution (bool) – add the exposure and P&L attribution pages

  • add_strategy_factsheet (bool) – append the full single-strategy factsheet

  • add_grouped_exposures (bool) – report exposures by group in that appended factsheet

  • add_grouped_cum_pnl (bool) – report cumulative P&L by group in that appended factsheet

  • add_tracking_error_table (bool) – add the per-instrument attribution and IR table; the keyword keeps its historical name for compatibility

  • add_exposures_comp (bool) – add the strategy-versus-benchmark exposure comparison

  • is_grouped (bool | None) – report annual returns by asset class rather than by instrument. None decides by the universe size, grouping once there are more than ten instruments. More than ten groups are omitted from the RA summary tables with a warning

  • figsize (Tuple[float, float]) – page size in inches; the default is A4 portrait

  • fontsize (int) – base font size

  • add_joint_instrument_history_report (bool) – add the per-instrument history page

  • **kwargs – plotting options, including asset_tail_count: 10 (default) or 20 assets per tail. Selection affects display only; totals retain every holding

Returns:

Pages in order, ready for save_figs_to_pdf(). Completed per-instrument exposure comparison pages are closed in pyplot but remain drawable and saveable. Other pages remain open for the caller to close after use; unrelated figures are left open.

Return type:

List[Figure]