qis.plot_brinson_attribution_table¶
- qis.plot_brinson_attribution_table(totals_table, active_total, grouped_allocation_return, grouped_selection_return, grouped_interaction_return, var_format='{:.0%}', total_column='Total Sum', is_exclude_interaction_term=True, axs=(None, None, None, None, None), **kwargs)[source]¶
Create comprehensive visualization of Brinson attribution results.
Generates a multi-panel visualization including: 1. Summary table with attribution statistics 2. Time series of cumulative total attribution effects 3. Time series of cumulative allocation effects by asset class 4. Time series of cumulative selection effects by asset class 5. Time series of cumulative interaction effects by asset class
- Parameters:
totals_table (DataFrame) – Summary statistics table from compute_brinson_attribution_table.
active_total (DataFrame) – Time series of total attribution effects.
grouped_allocation_return (DataFrame) – Allocation effects by asset class over time.
grouped_selection_return (DataFrame) – Selection effects by asset class over time.
grouped_interaction_return (DataFrame) – Interaction effects by asset class over time.
var_format (str) – Format string for displaying numeric values (default: percentage).
total_column (str) – Name of the total column for portfolio-level aggregation.
is_exclude_interaction_term (bool) – Whether interaction terms are excluded from analysis.
axs (List[Axes]) – Optional list of matplotlib axes for plotting (if None, creates new figures).
**kwargs – Additional arguments passed to plotting functions.
- Returns:
- (table_fig, active_fig, allocation_fig,
selection_fig, interaction_fig)
- Return type:
Tuple of matplotlib figures
Example
>>> # After running compute_brinson_attribution_table >>> figs = plot_brinson_attribution_table( ... totals_table, active_total, allocation_return, ... selection_return, interaction_return ... ) >>> table_fig, active_fig, alloc_fig, select_fig, interact_fig = figs >>> plt.show()