Fix 2 for passing CI
This commit is contained in:
@@ -5,16 +5,17 @@ This module defines the alternative HyperOptLoss class which can be used for
|
|||||||
Hyperoptimization.
|
Hyperoptimization.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from typing import Any, Dict
|
from typing import Any
|
||||||
|
|
||||||
from freqtrade.optimize.hyperopt import IHyperOptLoss
|
from freqtrade.optimize.hyperopt import IHyperOptLoss
|
||||||
|
|
||||||
|
|
||||||
class MaxDrawDownPerPairHyperOptLoss(IHyperOptLoss):
|
class MaxDrawDownPerPairHyperOptLoss(IHyperOptLoss):
|
||||||
"""
|
"""
|
||||||
Defines the loss function for hyperopt.
|
Defines the loss function for hyperopt.
|
||||||
|
|
||||||
This implementation calculates the profit/drawdown ratio per pair and
|
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.
|
the parameters for all pairs in the pairlist.
|
||||||
|
|
||||||
This way, we prevent one or more pairs with good results from inflating
|
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)
|
score_per_pair.append(score)
|
||||||
|
|
||||||
return -min(score_per_pair)
|
return -min(score_per_pair)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user