qis.weights_tracking_error_report_by_ac_subac¶
- qis.weights_tracking_error_report_by_ac_subac(multi_portfolio_data, strategy_idx=0, benchmark_idx=1, ac_group_data=None, ac_group_order=None, sub_ac_group_data=None, sub_ac_group_order=None, turnover_groups=None, turnover_order=None, risk_model=None, covar_risk_model=None, 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>, add_benchmarks_to_navs=True, tre_max_clip=None, figsize=(11.7, 8.3), var_format='{:.1%}', add_titles=True, *, lookthrough_matrix=None, sub_ac_lookthrough_matrix=None, turnover_lookthrough_matrix=None, add_one_year_tail_risk=False, tail_risk_currency=None, tail_risk_monthly_returns=None, **kwargs)[source]¶
Build weights and tracking-error panels for a strategy and benchmark.
risk_modelandcovar_risk_modelare deliberately distinct. The former is the returns-basedLinearModelused by the legacy factor-attribution panels. The latter is the weights-and-covarianceRiskModelused for ex-ante tracking error, factor exposures, and systematic/residual tracking-error decomposition.- Parameters:
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.
sub_ac_lookthrough_matrix (DataFrame | None) – Independent optional partition for sub-asset-class panels.
turnover_lookthrough_matrix (DataFrame | None) – Independent optional partition attributing instrument turnover.
multi_portfolio_data (MultiPortfolioData) – Strategy and benchmark portfolios with shared report data.
strategy_idx (int) – Index of the strategy portfolio.
benchmark_idx (int) – Index of the benchmark portfolio.
ac_group_data (Series) – Asset-class label per instrument.
sub_ac_group_data (Series) – Sub-asset-class label per instrument.
sub_ac_group_order (List[str]) – Sub-asset-class display order.
turnover_groups (Series) – Group labels used only by the turnover panels.
risk_model (LinearModel) – Optional returns-based
LinearModelfor legacy attribution panels.covar_risk_model (RiskModel | None) – Optional weights-and-covariance
RiskModel. Its covariance is used whenmulti_portfolio_data.covar_dictis absent; a complete factor block adds tracking-error decomposition and strategy factor-exposure panels.time_period (TimePeriod) – Optional reporting period.
perf_params (PerfParams) – Performance-statistic configuration.
regime_classifier (BenchmarkReturnsQuantilesRegime) – Regime definition used for plot backgrounds.
add_benchmarks_to_navs (bool) – Whether to include benchmark NAVs in the performance panel.
tre_max_clip (float | None) – Optional upper clip for grouped tracking-error lines.
var_format (str) – Weight and contribution formatting string.
add_titles (bool) – Whether to draw panel titles.
add_one_year_tail_risk (bool) – Append a 99% one-year comparison under ‘one_year_tail_risk’.
tail_risk_currency (str | None) – Reference currency of all risk inputs, required for the Appendix.
tail_risk_monthly_returns (DataFrame | None) – Optional matched monthly simple asset returns in that currency. Each row is a completed month, dated when observable. Covariance is annualised.
**kwargs – Additional plotting arguments.
- Returns:
Figure and DataFrame dictionaries keyed by panel name.
- Return type: