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, heatmap_fontsize=4, add_joint_instrument_history_report=False, **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 strategy on its own and the second is the comparison, with Brinson attribution decomposing the active return into allocation, selection and interaction. That decomposition is why this is a separate report from
generate_multi_portfolio_factsheet(), which compares strategies that share no common weights.- Parameters:
multi_portfolio_data (MultiPortfolioData) – the portfolios, strategy and benchmark among them
strategy_idx (int) – position of the strategy within
multi_portfolio_databenchmark_idx (int) – position of the benchmark within
multi_portfolio_datatime_period (TimePeriod) – reporting window. None uses the full common history
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
add_brinson_attribution (bool) – add the allocation / selection / interaction decomposition
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 tracking-error table
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
figsize (Tuple[float, float]) – page size in inches; the default is A4 portrait
fontsize (int) – base font size
heatmap_fontsize (int) – font size inside the heatmap panels, smaller because the cells are dense
add_joint_instrument_history_report (bool) – add the per-instrument history page
- Returns:
the pages, in order, ready for
save_figs_to_pdf()- Return type: