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:
regime_classifier (RegimeClassifier)
regime_data_to_plot (RegimeData)
drop_sharpe_from_labels (bool)
drop_benchmark (bool)
x_rotation (int)
add_bar_values (bool)
title (str | None)
var_format (str)
fontsize (int)
is_top_totals (bool)
is_add_totals (bool)
is_use_vbar (bool)
reverse_columns (bool)
legend_loc (str | None)
ax (Axes)
- Return type: