Update hyperopt_loss_calmar.py
This commit is contained in:
parent
5f309627ea
commit
88b96d5d1b
@ -54,7 +54,7 @@ class CalmarHyperOptLoss(IHyperOptLoss):
|
||||
except ValueError:
|
||||
max_drawdown = 0
|
||||
|
||||
if max_drawdown != 0 and trade_count > 2000:
|
||||
if max_drawdown != 0:
|
||||
calmar_ratio = expected_returns_mean / max_drawdown * msqrt(365)
|
||||
else:
|
||||
# Define high (negative) calmar ratio to be clear that this is NOT optimal.
|
||||
|
Loading…
Reference in New Issue
Block a user