qis.plot_signal_diagnostics_boxplot

qis.plot_signal_diagnostics_boxplot(result, horizon, num_buckets=10, title=None, xlabel='Signal at t-1 (quantile buckets)', ylabel='Vol-normalised return  $\\tilde y$', ax=None, **kwargs)[source]

Distribution of cross-sectional returns conditional on the signal.

Buckets the signal score z into num_buckets quantile groups and renders the conditional return distribution as a boxplot. Each box reads “at this signal level, here’s the distribution of realised forward returns across assets and dates”. A monotone upward trend in box medians is the visual signature of a working signal; the title carries the pooled β/t/IC for the precise number.

Replaces the earlier scatter-based view: visually equivalent information at a fraction of the file size (one box per bucket vs several thousand alpha-blended points).

Parameters:
  • result (SignalDiagnosticsResult) – Output of estimate_signal_diagnostics.

  • horizon (str) – Label of the horizon to plot (must exist in result.horizon_labels).

  • num_buckets (int) – Number of quantile buckets for the signal axis. Default 10 (deciles).

  • title (str | None) – Figure title. Auto-generated with β/t/IC when None.

  • xlabel (str) – Axis labels.

  • ylabel (str) – Axis labels.

  • ax (Axes | None) – Optional matplotlib axis. New figure created when None.

  • **kwargs – Forwarded to df_boxplot_by_classification_var.

Returns:

The Figure when ax is None, otherwise None.

Return type:

Figure | None