rafe 0.1.0
First public release.
Metrics
-
compute_rafe(),compute_crafe()andcompute_trafe()implement the risk-adjusted mean error, the operator-norm precision distortion, and their combination into the upper bound on the Sharpe-ratio gap. - Argument order matches the replication code of Salcher, Stöckl & Hanke (2026), so scripts from that repository run unchanged:
compute_rafe()takes the realised covariance as its third positional argument, andcompute_crafe()takes the realised covariance first. -
compute_trafe()applies the theorem’s data-dependent constant by default (c = 1when RAFE ≤ SR*, elsec = 2), and returns the decomposition as attributesrafe,crafe,candSR_star. The published replication code fixesc = 1; passc = 1to reproduce those numbers exactly.
Moment correction
-
mu_rafe_stein()applies positive-part James–Stein shrinkage in the risk-whitened space. SupplyT_obsfor the James–Stein intensity orkappato fix it. -
sigma_crafe_floor()raises small eigenvalues to a floor relative to the mean eigenvalue. -
sep_tune()andjoint_trafe_tune()select(kappa, tau)on an inner-validation split, sequentially or jointly. Default grids use 101 points on[0, 1]for kappa and on[0, 0.5]for tau.
