simplify expression

This commit is contained in:
sid 2021-10-09 06:36:23 +05:30
parent 45b7a0c837
commit 30bc96cf3f

View File

@ -38,6 +38,4 @@ class MaxDrawDownHyperOptLoss(IHyperOptLoss):
except ValueError: except ValueError:
# No losing trade, therefore no drawdown. # No losing trade, therefore no drawdown.
return -total_profit return -total_profit
max_drawdown_rev = 1 / max_drawdown[0] return -total_profit / max_drawdown[0]
ret = max_drawdown_rev * total_profit
return -ret