removed trade_count inside if statement

i removed trade_count inside if statement. Even though it helps overfitting, It is not useful when running hyperopt on small datasets.
This commit is contained in:
Robert Roman 2021-09-22 09:21:43 -05:00 committed by GitHub
parent b946f8e7f1
commit c6b684603c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -42,7 +42,7 @@ class CalmarHyperOptLoss(IHyperOptLoss):
except ValueError:
max_drawdown = 0
if max_drawdown != 0 and trade_count > 1000:
if max_drawdown != 0:
calmar_ratio = expected_returns_mean / max_drawdown * np.sqrt(365)
else:
calmar_ratio = -20.