qis.compute_ra_perf_table¶
- qis.compute_ra_perf_table(prices, perf_params=None)[source]¶
Compute the full risk-adjusted performance table.
Combines outputs from
compute_performance_table(return metrics) andcompute_risk_table(volatility, drawdowns, higher moments) and derives the standard ratio family: Sharpe (rf=0, excess, log-annualised, log-excess, arithmetic, arithmetic-excess), Sortino, Calmar.- Parameters:
prices (DataFrame | Series) – DataFrame or Series of asset price levels.
perf_params (PerfParams) – Performance parameter object. If None, the frequency is inferred from the index:
PerfParams(freq=pd.infer_freq(prices.index)). A regular business-day index then givesfreq_vol,freq_regandfreq_excess_returnof ‘B’ (volatility annualised with 252), whilefreq_drawdownstays ‘D’ andfreq_skewness‘ME’; an irregular index, for whichpd.infer_freqreturns None, gives thePerfParams()defaults. Pass an explicitPerfParamsfor reproducible grids.
- Returns:
DataFrame indexed by asset with all performance and risk columns merged. Overlapping columns (e.g. START_DATE, END_DATE) are present once, taken from the performance table. Visible return columns retain each asset’s native observed endpoints. The p.a., log, excess, and Sortino ratio numerators instead use complete
freq_volboundaries within each asset’s observed support, so they describe the same sample as their volatility denominators without extending terminated histories. The Calmar numerator is the native-endpointPA_EXCESS_RETURN, because its denominatorMAX_DDis measured onfreq_drawdownup to each asset’s final observation. Undefined ratios are missing rather than infinite:SORTINO_RATIOwith fewer than two negativefreq_volreturns andCALMAR_RATIOfor a history that is never under water.- Return type: