moved line for total_downside

This commit is contained in:
Yazeed Al Oyoun 2020-02-07 02:14:12 +01:00 committed by hroff-1902
parent a46b7bcd6d
commit e8b9d88eb6

View File

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