Remove hyperopts occurances
This commit is contained in:
parent
6f01d7f8ea
commit
5b62ad876e
@ -32,7 +32,7 @@ jobs:
|
|||||||
name: backtest
|
name: backtest
|
||||||
- script:
|
- script:
|
||||||
- cp config.json.example config.json
|
- cp config.json.example config.json
|
||||||
- freqtrade hyperopt --datadir tests/testdata -e 5 --strategy SampleStrategy --hyperopt SampleHyperOpts
|
- freqtrade hyperopt --datadir tests/testdata -e 5 --strategy SampleStrategy --hyperopt SampleHyperOpt
|
||||||
name: hyperopt
|
name: hyperopt
|
||||||
- script: flake8
|
- script: flake8
|
||||||
name: flake8
|
name: flake8
|
||||||
|
@ -131,7 +131,7 @@ You can add the entry "user_data_dir" setting to your configuration, to always p
|
|||||||
Alternatively, pass in `--userdir` to every command.
|
Alternatively, pass in `--userdir` to every command.
|
||||||
The bot will fail to start if the directory does not exist, but will create necessary subdirectories.
|
The bot will fail to start if the directory does not exist, but will create necessary subdirectories.
|
||||||
|
|
||||||
This directory should contain your custom strategies, custom hyperopts and hyperopt loss functions, backtesting historical data (downloaded using either backtesting command or the download script) and plot outputs.
|
This directory should contain your custom strategies, custom hyperopt and hyperopt loss functions, backtesting historical data (downloaded using either backtesting command or the download script) and plot outputs.
|
||||||
|
|
||||||
It is recommended to use version control to keep track of changes to your strategies.
|
It is recommended to use version control to keep track of changes to your strategies.
|
||||||
|
|
||||||
@ -294,7 +294,7 @@ optional arguments:
|
|||||||
entry and exit).
|
entry and exit).
|
||||||
--hyperopt NAME Specify hyperopt class name which will be used by the
|
--hyperopt NAME Specify hyperopt class name which will be used by the
|
||||||
bot.
|
bot.
|
||||||
--hyperopt-path PATH Specify additional lookup path for Hyperopts and
|
--hyperopt-path PATH Specify additional lookup path for Hyperopt and
|
||||||
Hyperopt Loss functions.
|
Hyperopt Loss functions.
|
||||||
--eps, --enable-position-stacking
|
--eps, --enable-position-stacking
|
||||||
Allow buying the same pair multiple times (position
|
Allow buying the same pair multiple times (position
|
||||||
|
@ -166,7 +166,7 @@ AVAILABLE_CLI_OPTIONS = {
|
|||||||
),
|
),
|
||||||
"hyperopt_path": Arg(
|
"hyperopt_path": Arg(
|
||||||
'--hyperopt-path',
|
'--hyperopt-path',
|
||||||
help='Specify additional lookup path for Hyperopts and Hyperopt Loss functions.',
|
help='Specify additional lookup path for Hyperopt and Hyperopt Loss functions.',
|
||||||
metavar='PATH',
|
metavar='PATH',
|
||||||
),
|
),
|
||||||
"epochs": Arg(
|
"epochs": Arg(
|
||||||
@ -239,7 +239,7 @@ AVAILABLE_CLI_OPTIONS = {
|
|||||||
help='Specify the class name of the hyperopt loss function class (IHyperOptLoss). '
|
help='Specify the class name of the hyperopt loss function class (IHyperOptLoss). '
|
||||||
'Different functions can generate completely different results, '
|
'Different functions can generate completely different results, '
|
||||||
'since the target for optimization is different. Built-in Hyperopt-loss-functions are: '
|
'since the target for optimization is different. Built-in Hyperopt-loss-functions are: '
|
||||||
'DefaultHyperOptLoss, OnlyProfitHyperOptLoss, SharpeHyperOptLoss '
|
'DefaultHyperOptLoss, OnlyProfitHyperOptLoss, SharpeHyperOptLoss.'
|
||||||
'(default: `%(default)s`).',
|
'(default: `%(default)s`).',
|
||||||
metavar='NAME',
|
metavar='NAME',
|
||||||
default=constants.DEFAULT_HYPEROPT_LOSS,
|
default=constants.DEFAULT_HYPEROPT_LOSS,
|
||||||
|
@ -78,7 +78,7 @@ def start_hyperopt(args: Dict[str, Any]) -> None:
|
|||||||
except Timeout:
|
except Timeout:
|
||||||
logger.info("Another running instance of freqtrade Hyperopt detected.")
|
logger.info("Another running instance of freqtrade Hyperopt detected.")
|
||||||
logger.info("Simultaneous execution of multiple Hyperopt commands is not supported. "
|
logger.info("Simultaneous execution of multiple Hyperopt commands is not supported. "
|
||||||
"Hyperopt module is resource hungry. Please run your Hyperopts sequentially "
|
"Hyperopt module is resource hungry. Please run your Hyperopt sequentially "
|
||||||
"or on separate machines.")
|
"or on separate machines.")
|
||||||
logger.info("Quitting now.")
|
logger.info("Quitting now.")
|
||||||
# TODO: return False here in order to help freqtrade to exit
|
# TODO: return False here in order to help freqtrade to exit
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
"""
|
"""
|
||||||
IHyperOpt interface
|
IHyperOpt interface
|
||||||
This module defines the interface to apply for hyperopts
|
This module defines the interface to apply for hyperopt
|
||||||
"""
|
"""
|
||||||
import logging
|
import logging
|
||||||
import math
|
import math
|
||||||
@ -27,8 +27,8 @@ def _format_exception_message(method: str, space: str) -> str:
|
|||||||
|
|
||||||
class IHyperOpt(ABC):
|
class IHyperOpt(ABC):
|
||||||
"""
|
"""
|
||||||
Interface for freqtrade hyperopts
|
Interface for freqtrade hyperopt
|
||||||
Defines the mandatory structure must follow any custom hyperopts
|
Defines the mandatory structure must follow any custom hyperopt
|
||||||
|
|
||||||
Class attributes you can use:
|
Class attributes you can use:
|
||||||
ticker_interval -> int: value of the ticker interval to use for the strategy
|
ticker_interval -> int: value of the ticker interval to use for the strategy
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
"""
|
"""
|
||||||
IHyperOptLoss interface
|
IHyperOptLoss interface
|
||||||
This module defines the interface for the loss-function for hyperopts
|
This module defines the interface for the loss-function for hyperopt
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from abc import ABC, abstractmethod
|
from abc import ABC, abstractmethod
|
||||||
@ -11,7 +11,7 @@ from pandas import DataFrame
|
|||||||
|
|
||||||
class IHyperOptLoss(ABC):
|
class IHyperOptLoss(ABC):
|
||||||
"""
|
"""
|
||||||
Interface for freqtrade hyperopts Loss functions.
|
Interface for freqtrade hyperopt Loss functions.
|
||||||
Defines the custom loss function (`hyperopt_loss_function()` which is evaluated every epoch.)
|
Defines the custom loss function (`hyperopt_loss_function()` which is evaluated every epoch.)
|
||||||
"""
|
"""
|
||||||
ticker_interval: str
|
ticker_interval: str
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# pragma pylint: disable=attribute-defined-outside-init
|
# pragma pylint: disable=attribute-defined-outside-init
|
||||||
|
|
||||||
"""
|
"""
|
||||||
This module load custom hyperopts
|
This module load custom hyperopt
|
||||||
"""
|
"""
|
||||||
import logging
|
import logging
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
@ -70,7 +70,7 @@ def start_list_exchanges(args: Dict[str, Any]) -> None:
|
|||||||
|
|
||||||
def start_create_userdir(args: Dict[str, Any]) -> None:
|
def start_create_userdir(args: Dict[str, Any]) -> None:
|
||||||
"""
|
"""
|
||||||
Create "user_data" directory to contain user data strategies, hyperopts, ...)
|
Create "user_data" directory to contain user data strategies, hyperopt, ...)
|
||||||
:param args: Cli args from Arguments()
|
:param args: Cli args from Arguments()
|
||||||
:return: None
|
:return: None
|
||||||
"""
|
"""
|
||||||
|
@ -12,7 +12,7 @@ import freqtrade.vendor.qtpylib.indicators as qtpylib
|
|||||||
from freqtrade.optimize.hyperopt_interface import IHyperOpt
|
from freqtrade.optimize.hyperopt_interface import IHyperOpt
|
||||||
|
|
||||||
|
|
||||||
class SampleHyperOpts(IHyperOpt):
|
class SampleHyperOpt(IHyperOpt):
|
||||||
"""
|
"""
|
||||||
This is a sample Hyperopt to inspire you.
|
This is a sample Hyperopt to inspire you.
|
||||||
Feel free to customize it.
|
Feel free to customize it.
|
||||||
|
@ -14,7 +14,7 @@ import freqtrade.vendor.qtpylib.indicators as qtpylib
|
|||||||
from freqtrade.optimize.hyperopt_interface import IHyperOpt
|
from freqtrade.optimize.hyperopt_interface import IHyperOpt
|
||||||
|
|
||||||
|
|
||||||
class AdvancedSampleHyperOpts(IHyperOpt):
|
class AdvancedSampleHyperOpt(IHyperOpt):
|
||||||
"""
|
"""
|
||||||
This is a sample hyperopt to inspire you.
|
This is a sample hyperopt to inspire you.
|
||||||
Feel free to customize it.
|
Feel free to customize it.
|
||||||
|
Loading…
Reference in New Issue
Block a user