qis.RegimeData¶
- class qis.RegimeData(*values)[source]¶
Bases:
Enumwhich statistic a regime-conditional table reports.
Selects the panel produced by
compute_regimes_pa_perf_table()and rendered byplot_regime_data(). Only the average is a within-regime statistic; the p.a. and Sharpe panels are frequency-weighted contributions of each regime to a full-sample total, so they add up across regimes and are not the return or Sharpe ratio earned inside a regime.- Variables:
REGIME_AVG – conditional mean periodic return within each regime, m_g, on the classifier’s grid and return basis
REGIME_PA – per-annum contribution of each regime, exp(af * p_g * m_g) - 1 with p_g the regime frequency, shifted by p_g times the residual so the regimes add up to the table’s
PA_RETURN(native endpoints)REGIME_SHARPE – Sharpe-ratio contribution of each regime in the convention carried on
PerfParams.sharpe_convention: under ARITHMETIC and LOG, sqrt(af) * p_g * m_g over the full-sample standard deviation, adding up to the Sharpe ratio on the regime grid; under PA, the REGIME_PA contribution overVOL, adding up toPA_RETURN / VOL, which equalsSHARPE_RF0only when the native endpoints lie on thefreq_volgrid. Seeqis/docs/sharpe_conventions.md
- __init__(*args, **kwds)¶
Attributes
- REGIME_AVG = 'Average'¶
- REGIME_PA = 'P.a.'¶
- REGIME_SHARPE = '-Sharpe'¶