chore: remove unused arguments in loss functions

This commit is contained in:
Matthias
2024-12-07 15:51:37 +01:00
parent ebae0a7248
commit 98e0a5f101
4 changed files with 2 additions and 9 deletions

View File

@@ -9,7 +9,6 @@ from datetime import datetime
from pandas import DataFrame
from freqtrade.constants import Config
from freqtrade.data.metrics import calculate_calmar
from freqtrade.optimize.hyperopt import IHyperOptLoss
@@ -24,10 +23,8 @@ class CalmarHyperOptLoss(IHyperOptLoss):
@staticmethod
def hyperopt_loss_function(
results: DataFrame,
trade_count: int,
min_date: datetime,
max_date: datetime,
config: Config,
starting_balance: float,
*args,
**kwargs,

View File

@@ -7,7 +7,6 @@ Hyperoptimization.
from pandas import DataFrame
from freqtrade.constants import Config
from freqtrade.data.metrics import calculate_underwater
from freqtrade.optimize.hyperopt import IHyperOptLoss
@@ -22,7 +21,7 @@ class MaxDrawDownRelativeHyperOptLoss(IHyperOptLoss):
@staticmethod
def hyperopt_loss_function(
results: DataFrame, config: Config, starting_balance: float, *args, **kwargs
results: DataFrame, starting_balance: float, *args, **kwargs
) -> float:
"""
Objective function.

View File

@@ -33,7 +33,6 @@ TARGET_TRADE_AMOUNT variable sets the minimum number of trades required to avoid
import numpy as np
from pandas import DataFrame
from freqtrade.constants import Config
from freqtrade.data.metrics import calculate_expectancy, calculate_max_drawdown
from freqtrade.optimize.hyperopt import IHyperOptLoss
@@ -57,7 +56,6 @@ class MultiMetricHyperOptLoss(IHyperOptLoss):
def hyperopt_loss_function(
results: DataFrame,
trade_count: int,
config: Config,
starting_balance: float,
**kwargs,
) -> float:

View File

@@ -10,7 +10,6 @@ individual needs.
from pandas import DataFrame
from freqtrade.constants import Config
from freqtrade.data.metrics import calculate_max_drawdown
from freqtrade.optimize.hyperopt import IHyperOptLoss
@@ -22,7 +21,7 @@ DRAWDOWN_MULT = 0.075
class ProfitDrawDownHyperOptLoss(IHyperOptLoss):
@staticmethod
def hyperopt_loss_function(
results: DataFrame, config: Config, starting_balance: float, *args, **kwargs
results: DataFrame, starting_balance: float, *args, **kwargs
) -> float:
total_profit = results["profit_abs"].sum()