Don't use --hyperopt-loss-class, but --hyperopt-loss instead

This commit is contained in:
Matthias 2019-07-19 06:31:49 +02:00
parent e01c0ab4d6
commit fa8904978b
3 changed files with 7 additions and 7 deletions

View File

@ -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

View File

@ -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 <Class-name>` argument.
A different version this can be used by using the `--hyperopt-loss <Class-name>` 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

View File

@ -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`).',