qis.compute_bnb_regimes_pa_perf_table

qis.compute_bnb_regimes_pa_perf_table(prices, benchmark=None, benchmark_price=None, freq='QE', return_type=ReturnTypes.RELATIVE, q=None, regime_ids_colors=None, perf_params=None, drop_benchmark=False, **kwargs)[source]

Compute benchmark regime performance attribution table.

Convenience function for computing regime-conditional performance using benchmark return quantiles classification.

Parameters:
  • prices (DataFrame) – Asset price series

  • benchmark (str) – Benchmark column name in prices

  • benchmark_price (Series) – Alternative benchmark price series to add to prices

  • freq (str) – Sampling frequency

  • return_type (ReturnTypes) – Type of returns to compute

  • q (ndarray | int) – Quantile boundaries or number of quantiles

  • regime_ids_colors (Dict[str, str]) – Mapping of regime names to colors

  • perf_params (PerfParams) – Performance parameters

  • drop_benchmark (bool) – Exclude benchmark from results

Returns:

Regime-conditional performance table

Raises:

ValueError – If neither benchmark nor benchmark_price provided

Return type:

DataFrame