Do not subtract risk_free_ratio twice

This commit is contained in:
hroff-1902 2020-02-13 07:07:35 +03:00 committed by GitHub
parent 9ec9a7b124
commit b2328cdf4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -53,7 +53,7 @@ class SortinoHyperOptLossDaily(IHyperOptLoss):
sum_daily['downside_returns'] = 0 sum_daily['downside_returns'] = 0
sum_daily.loc[total_profit < 0, sum_daily.loc[total_profit < 0,
'downside_returns'] = sum_daily['profit_percent_after_slippage'] 'downside_returns'] = sum_daily['profit_percent_after_slippage']
total_downside = sum_daily['downside_returns'] - risk_free_rate total_downside = sum_daily['downside_returns']
down_stdev = total_downside.std() down_stdev = total_downside.std()
if (down_stdev != 0.): if (down_stdev != 0.):