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:
		| @@ -42,7 +42,7 @@ class CalmarHyperOptLoss(IHyperOptLoss): | |||||||
|         except ValueError: |         except ValueError: | ||||||
|             max_drawdown = 0 |             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) |             calmar_ratio = expected_returns_mean / max_drawdown * np.sqrt(365) | ||||||
|         else: |         else: | ||||||
|             calmar_ratio = -20. |             calmar_ratio = -20. | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user