qis.plot_regime_data

qis.plot_regime_data(regime_classifier, regime_data_to_plot=RegimeData.REGIME_SHARPE, drop_sharpe_from_labels=False, drop_benchmark=False, x_rotation=90, add_bar_values=True, title='Conditional Excess Sharpe ratio', var_format='{:.1f}', bbox_to_anchor=(1.0, 0.95), fontsize=10, is_top_totals=True, is_add_totals=True, is_use_vbar=False, reverse_columns=True, legend_loc='upper right', ax=None, **kwargs)[source]

plot regime-conditional data of the classifier as stacked bars with regime colors.

for regime_data_to_plot=RegimeData.REGIME_SHARPE the values follow perf_params.sharpe_convention (see qis/docs/sharpe_conventions.md): PA (default) divides the additivity-patched compound per-annum regime returns by the annualized vol. ARITHMETIC computes sr_s = sqrt(af) * p_s * m_s / std(r) on the sampled simple returns, so the regime bars sum to the total arithmetic Sharpe ratio exactly; LOG is the analog on log(1+r). The additive conventions are the natural choice for regime attribution.

Parameters:
Return type:

Figure