simplify expression
This commit is contained in:
@@ -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
|
|
||||||
|
Reference in New Issue
Block a user