From 904580b91422f8c1490b02652effc9e3251b17fa Mon Sep 17 00:00:00 2001 From: mrpabloyeah Date: Tue, 8 Apr 2025 17:41:13 +0200 Subject: [PATCH] Fix 2 for passing CI --- .../hyperopt_loss/hyperopt_loss_max_drawdown_per_pair.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/freqtrade/optimize/hyperopt_loss/hyperopt_loss_max_drawdown_per_pair.py b/freqtrade/optimize/hyperopt_loss/hyperopt_loss_max_drawdown_per_pair.py index d806d227d..19ce29455 100644 --- a/freqtrade/optimize/hyperopt_loss/hyperopt_loss_max_drawdown_per_pair.py +++ b/freqtrade/optimize/hyperopt_loss/hyperopt_loss_max_drawdown_per_pair.py @@ -5,16 +5,17 @@ This module defines the alternative HyperOptLoss class which can be used for Hyperoptimization. """ -from typing import Any, Dict +from typing import Any from freqtrade.optimize.hyperopt import IHyperOptLoss + class MaxDrawDownPerPairHyperOptLoss(IHyperOptLoss): """ Defines the loss function for hyperopt. This implementation calculates the profit/drawdown ratio per pair and - returns the worst result as objetive, forcing hyperopt to optimize + returns the worst result as objective, forcing hyperopt to optimize the parameters for all pairs in the pairlist. This way, we prevent one or more pairs with good results from inflating @@ -56,4 +57,3 @@ class MaxDrawDownPerPairHyperOptLoss(IHyperOptLoss): score_per_pair.append(score) return -min(score_per_pair) -