diff --git a/freqtrade/commands/arguments.py b/freqtrade/commands/arguments.py index 6f60e6f86..e6805ed5a 100755 --- a/freqtrade/commands/arguments.py +++ b/freqtrade/commands/arguments.py @@ -64,7 +64,6 @@ ARGS_BACKTEST = [ ARGS_HYPEROPT = [ *ARGS_COMMON_OPTIMIZE, - "hyperopt", "hyperopt_path", "position_stacking", "enable_protections", diff --git a/freqtrade/commands/cli_options.py b/freqtrade/commands/cli_options.py index 485f85dbd..3898305af 100755 --- a/freqtrade/commands/cli_options.py +++ b/freqtrade/commands/cli_options.py @@ -2,7 +2,7 @@ Definition of cli arguments used in arguments.py """ -from argparse import SUPPRESS, ArgumentTypeError +from argparse import ArgumentTypeError from freqtrade import constants from freqtrade.constants import HYPEROPT_LOSS_BUILTIN @@ -256,12 +256,6 @@ AVAILABLE_CLI_OPTIONS = { choices=constants.BACKTEST_CACHE_AGE, ), # Hyperopt - "hyperopt": Arg( - "--hyperopt", - help=SUPPRESS, - metavar="NAME", - required=False, - ), "hyperopt_path": Arg( "--hyperopt-path", help="Specify additional lookup path for Hyperopt Loss functions.", diff --git a/freqtrade/configuration/configuration.py b/freqtrade/configuration/configuration.py index ea0c320fb..c544e47b5 100644 --- a/freqtrade/configuration/configuration.py +++ b/freqtrade/configuration/configuration.py @@ -336,7 +336,6 @@ class Configuration: # Hyperopt section configurations = [ - ("hyperopt", "Using Hyperopt class name: {}"), ("hyperopt_path", "Using additional Hyperopt lookup path: {}"), ("hyperoptexportfilename", "Using hyperopt file: {}"), ("lookahead_analysis_exportfilename", "Saving lookahead analysis results into {} ..."), diff --git a/freqtrade/optimize/hyperopt/hyperopt.py b/freqtrade/optimize/hyperopt/hyperopt.py index d0cdc0026..ba88d4969 100644 --- a/freqtrade/optimize/hyperopt/hyperopt.py +++ b/freqtrade/optimize/hyperopt/hyperopt.py @@ -18,7 +18,6 @@ from optuna.trial import FrozenTrial, Trial, TrialState from freqtrade.constants import FTHYPT_FILEVERSION, LAST_BT_RESULT_FN, Config from freqtrade.enums import HyperoptState -from freqtrade.exceptions import OperationalException from freqtrade.misc import file_dump_json, plural from freqtrade.optimize.hyperopt.hyperopt_optimizer import INITIAL_POINTS, HyperOptimizer from freqtrade.optimize.hyperopt.hyperopt_output import HyperoptOutput @@ -50,12 +49,6 @@ class Hyperopt: self.analyze_per_epoch = self.config.get("analyze_per_epoch", False) HyperoptStateContainer.set_state(HyperoptState.STARTUP) - if self.config.get("hyperopt"): - raise OperationalException( - "Using separate Hyperopt files has been removed in 2021.9. Please convert " - "your existing Hyperopt file to the new Hyperoptable strategy interface" - ) - time_now = datetime.now().strftime("%Y-%m-%d_%H-%M-%S") strategy = str(self.config["strategy"]) self.results_file: Path = ( diff --git a/freqtrade/optimize/hyperopt/hyperopt_optimizer.py b/freqtrade/optimize/hyperopt/hyperopt_optimizer.py index f1b3f7cdd..f905c9733 100644 --- a/freqtrade/optimize/hyperopt/hyperopt_optimizer.py +++ b/freqtrade/optimize/hyperopt/hyperopt_optimizer.py @@ -89,13 +89,7 @@ class HyperOptimizer: self.custom_hyperopt: HyperOptAuto self.analyze_per_epoch = self.config.get("analyze_per_epoch", False) - if not self.config.get("hyperopt"): - self.custom_hyperopt = HyperOptAuto(self.config) - else: - raise OperationalException( - "Using separate Hyperopt files has been removed in 2021.9. Please convert " - "your existing Hyperopt file to the new Hyperoptable strategy interface" - ) + self.custom_hyperopt = HyperOptAuto(self.config) self.backtesting._set_strategy(self.backtesting.strategylist[0]) self.custom_hyperopt.strategy = self.backtesting.strategy