def get_sortino_ratio( rets, risk_free=0.00 ):
    rets = np.asarray(rets)
    f_mean = np.mean( rets, axis=0 )
    negative_rets = rets[rets < 0]
    f_dev = np.std( negative_rets, axis=0 )
    f_sortino = (f_mean*252 - risk_free) / (f_dev * np.sqrt(252))
    return f_sortino
Final positive reward for winner, negative for loser.
dataset/ETHPy150Open QuantSoftware/QuantSoftwareToolkit/QSTK/qstkutil/tsutil.py/get_sortino_ratio--crossover with--dataset/ETHPy150Open pybrain/pybrain/pybrain/rl/environments/twoplayergames/tasks/gomokutask.py/GomokuTask.getReward