From fa8904978b9b4bd27a4daba95d7136e7b0a31712 Mon Sep 17 00:00:00 2001 From: Matthias Date: Fri, 19 Jul 2019 06:31:49 +0200 Subject: [PATCH] Don't use --hyperopt-loss-class, but --hyperopt-loss instead --- docs/bot-usage.md | 4 ++-- docs/hyperopt.md | 8 ++++---- freqtrade/configuration/arguments.py | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/bot-usage.md b/docs/bot-usage.md index aef91189a..ff2e3279c 100644 --- a/docs/bot-usage.md +++ b/docs/bot-usage.md @@ -219,7 +219,7 @@ usage: freqtrade hyperopt [-h] [-i TICKER_INTERVAL] [--timerange TIMERANGE] [-s {all,buy,sell,roi,stoploss} [{all,buy,sell,roi,stoploss} ...]] [--dmmp] [--print-all] [-j JOBS] [--random-state INT] [--min-trades INT] [--continue] - [--hyperopt-loss-class NAME] + [--hyperopt-loss NAME] optional arguments: -h, --help show this help message and exit @@ -264,7 +264,7 @@ optional arguments: --continue Continue hyperopt from previous runs. By default, temporary files will be removed and hyperopt will start from scratch. - --hyperopt-loss-class NAME + --hyperopt-loss NAME Specify the class name of the hyperopt loss function class (IHyperOptLoss). Different functions can generate completely different results, since the diff --git a/docs/hyperopt.md b/docs/hyperopt.md index 5ff5310a3..ef3d28188 100644 --- a/docs/hyperopt.md +++ b/docs/hyperopt.md @@ -156,15 +156,15 @@ Each hyperparameter tuning requires a target. This is usually defined as a loss By default, FreqTrade uses a loss function, which has been with freqtrade since the beginning and optimizes mostly for short trade duration and avoiding losses. -A different version this can be used by using the `--hyperopt-loss-class ` argument. +A different version this can be used by using the `--hyperopt-loss ` argument. This class should be in it's own file within the `user_data/hyperopts/` directory. -Currently, the following loss-functions are builtin: `SharpeHyperOptLoss` and `DefaultHyperOptLoss`. +Currently, the following loss functions are builtin: `SharpeHyperOptLoss` and `DefaultHyperOptLoss`. ### Creating and using a custom loss function To use a custom loss function class, make sure that the function `hyperopt_loss_function` is defined in your custom hyperopt loss class. -For the sample below, you then need to add the command line parameter `--hyperopt-loss-class SuperDuperHyperOptLoss` to your hyperopt call so this fuction is being used. +For the sample below, you then need to add the command line parameter `--hyperopt-loss SuperDuperHyperOptLoss` to your hyperopt call so this fuction is being used. A sample of this can be found below, which is identical to the Default Hyperopt loss implementation. A full sample can be found [user_data/hyperopts/](https://github.com/freqtrade/freqtrade/blob/develop/user_data/hyperopts/sample_hyperopt_loss.py) @@ -252,7 +252,7 @@ use data from directory `user_data/data`. ### Running Hyperopt with Smaller Testset Use the `--timerange` argument to change how much of the testset you want to use. -To use one month of data, use the following parameter: +For example, to use one month of data, pass the following parameter to the hyperopt call: ```bash freqtrade hyperopt --timerange 20180401-20180501 diff --git a/freqtrade/configuration/arguments.py b/freqtrade/configuration/arguments.py index 891bf7d93..c9304c15a 100644 --- a/freqtrade/configuration/arguments.py +++ b/freqtrade/configuration/arguments.py @@ -231,7 +231,7 @@ AVAILABLE_CLI_OPTIONS = { action='store_true', ), "hyperopt_loss": Arg( - '--hyperopt-loss-class', + '--hyperopt-loss', help='Specify the class name of the hyperopt loss function class (IHyperOptLoss). ' 'Different functions can generate completely different results, ' 'since the target for optimization is different. (default: `%(default)s`).',