numeraire.sharpe_diff_test#

numeraire.sharpe_diff_test(a: NDArray[float64], b: NDArray[float64]) SharpeDiffResult[source]#

Jobson-Korkie (1981) z-test of equal Sharpe ratios with the Memmel (2003) correction.

a and b are two aligned return series (same periods). The statistic tests H0: mu_a/sigma_a = mu_b/sigma_b using the asymptotic variance:

theta = (1/T) * (2 s_a^2 s_b^2 - 2 s_a s_b s_ab + mu_a^2 s_b^2 / 2 + mu_b^2 s_a^2 / 2
                  - mu_a mu_b s_ab^2 / (s_a s_b))
z = (s_b mu_a - s_a mu_b) / sqrt(theta)