qis.plot_model_layer_in_sample_sharpe_bridge¶
- qis.plot_model_layer_in_sample_sharpe_bridge(attribution, model_name='Model', benchmark_label='Benchmark', labels=None, colors=None, detailed_mode=True, title=None, ax=None)[source]¶
Plot full-sample return contributions over full-sample volatility.
The plotted numerators come from the exact full-sample attribution. Benchmark return is divided by full-sample benchmark log-return volatility; every model contribution is divided by one common full-sample endpoint-model log-return volatility, preserving signs and exact additivity.
- Parameters:
attribution (ModelLayerAlphaBetaAttribution) – Full-sample model-layer alpha/beta attribution computed by QIS.
model_name (str) – Model name used in the title and endpoint labels.
benchmark_label (str) – Display label for the benchmark reference bar.
labels (Optional[Mapping[str, str]]) – Optional semantic label overrides. Full-sample defaults label systematic return as beta times benchmark and the three remaining contributions as alpha.
colors (Optional[Mapping[str, str]]) – Optional semantic colour overrides; keys are documented by the return bridge.
detailed_mode (bool) – Whether to draw the title, subtitle and methodology note.
title (Optional[str]) – Detailed-mode title. None uses the standard in-sample title.
ax (Optional[plt.Axes]) – Existing axis. None creates a new report-sized figure.
- Returns:
The created figure, or None when drawing on a supplied axis.
- Raises:
TypeError – If
attributionis not a full-sample model-layer attribution.ValueError – If required labelled inputs or full-sample volatilities are invalid.
RuntimeError – If the common-denominator Sharpe bridge does not reconcile.
- Return type:
Optional[Figure]