qis.plot_portfolio_breadth_history

qis.plot_portfolio_breadth_history(result, *, title='Portfolio breadth through time', detailed_mode=True, colors=None, x_date_freq='YE', date_format='%b-%y', fontsize=10, axs=None)[source]

Plot one portfolio’s asset counts and breadth-efficiency ratios through time.

Parameters:
  • result (PortfolioBreadthResult) – Numerical breadth result produced by compute_portfolio_breadth.

  • title (str) – Figure-level title shown in detailed mode.

  • detailed_mode (bool) – Whether to draw titles and the methodology note.

  • colors (Optional[Mapping[str, str]]) – Optional semantic colour overrides keyed by metric label.

  • x_date_freq (str) – Tick frequency passed to the QIS time-series plotter.

  • date_format (str) – Date-label format passed to the QIS time-series plotter.

  • fontsize (int) – Base font size for axes and legends.

  • axs (Optional[Sequence[plt.Axes]]) – Two caller-owned axes, counts first and efficiencies second. None creates a figure.

Returns:

The figure drawn on, or None when axs was supplied.

Return type:

Optional[Figure]