def kelly_ratio(R, Rf=0, method="half"): KR = returns.excess(R, Rf).mean() / R.var() if method == "half": KR = KR / 2 return KR
def srm(R, Rf, p, Func): xR = returns.excess(R, Rf) SRM = xR.mean() / Func