qis.plots.derived.regime_premium.plot_regime_beta_profiles¶
- qis.plots.derived.regime_premium.plot_regime_beta_profiles(betas, groups, se=None, regime_ids=('Bear', 'Normal', 'Bull'), group_colors=None, group_labels=None, markers=('o', '^', 'v', 's', 'D', 'P'), xlabel='Benchmark regime', ylabel='Regime beta on the benchmark', legend_loc='lower right', title=None, fontsize=10, figsize=(7.2, 4.4), ax=None)[source]¶
Group-mean regime betas with the members’ range, mean standard errors and total beta.
- Parameters:
betas (DataFrame) – one row per asset with
beta_<id>per regime andbeta_total, ascompute_regime_betasreturnsgroups (Series) – group of each asset, indexed like
betas; groups are drawn in order of first appearancese (DataFrame | None) – optional standard errors with
beta_<id>_secolumns, ascompute_regime_betas_bootstrapreturns; the error bars are the group meanregime_ids (Sequence[str]) – regimes on the x axis, in order
group_colors (Dict[str, str] | None) – colour per group; None uses the matplotlib cycle
group_labels (Dict[str, str] | None) – legend label per group; None uses the group names
xlabel (str | None) – x-axis label
ylabel (str) – y-axis label
legend_loc (str | None) – legend location; None hides the legend
title (str | None) – axis title
fontsize (int) – font size of the labels and legend
ax (Axes | None) – axis to draw on; None creates a figure
- Returns:
the new figure, or None when
axis given- Return type:
Figure | None