DefaultHyperOpts --> DefaultHyperOpt; hyperopts --> hyperopt where it's not correct
This commit is contained in:
parent
9e23ca14d1
commit
4ec83a2c24
@ -106,7 +106,7 @@ user_data/
|
||||
├── backtest_results
|
||||
├── data
|
||||
├── hyperopts
|
||||
├── hyperopts_results
|
||||
├── hyperopt_results
|
||||
├── plot
|
||||
└── strategies
|
||||
```
|
||||
@ -256,7 +256,7 @@ optional arguments:
|
||||
entry and exit).
|
||||
--customhyperopt NAME
|
||||
Specify hyperopt class name (default:
|
||||
`DefaultHyperOpts`).
|
||||
`DefaultHyperOpt`).
|
||||
--hyperopt-path PATH Specify additional lookup path for Hyperopts and
|
||||
Hyperopt Loss functions.
|
||||
--eps, --enable-position-stacking
|
||||
|
@ -38,7 +38,7 @@ like pauses. You can stop your bot, adjust settings and start it again.
|
||||
|
||||
### I want to improve the bot with a new strategy
|
||||
|
||||
That's great. We have a nice backtesting and hyperoptimizing setup. See
|
||||
That's great. We have a nice backtesting and hyperoptimization setup. See
|
||||
the tutorial [here|Testing-new-strategies-with-Hyperopt](bot-usage.md#hyperopt-commands).
|
||||
|
||||
### Is there a setting to only SELL the coins being held and not perform anymore BUYS?
|
||||
@ -59,7 +59,7 @@ If you're a US customer, the bot will fail to create orders for these pairs, and
|
||||
|
||||
### How many epoch do I need to get a good Hyperopt result?
|
||||
|
||||
Per default Hyperopts without `-e` or `--epochs` parameter will only
|
||||
Per default Hyperopt called without the `-e`/`--epochs` command line option will only
|
||||
run 100 epochs, means 100 evals of your triggers, guards, ... Too few
|
||||
to find a great result (unless if you are very lucky), so you probably
|
||||
have to run it for 10.000 or more. But it will take an eternity to
|
||||
|
@ -10,12 +10,12 @@ Hyperopt requires historic data to be available, just as backtesting does.
|
||||
To learn how to get data for the pairs and exchange you're interrested in, head over to the [Data Downloading](data-download.md) section of the documentation.
|
||||
|
||||
!!! Bug
|
||||
Hyperopt will crash when used with only 1 CPU Core as found out in [Issue #1133](https://github.com/freqtrade/freqtrade/issues/1133)
|
||||
Hyperopt can crash when used with only 1 CPU Core as found out in [Issue #1133](https://github.com/freqtrade/freqtrade/issues/1133)
|
||||
|
||||
## Prepare Hyperopting
|
||||
|
||||
Before we start digging into Hyperopt, we recommend you to take a look at
|
||||
an example hyperopt file located into [user_data/hyperopts/](https://github.com/freqtrade/freqtrade/blob/develop/user_data/hyperopts/sample_hyperopt.py)
|
||||
the sample hyperopt file located in [user_data/hyperopts/](https://github.com/freqtrade/freqtrade/blob/develop/user_data/hyperopts/sample_hyperopt.py).
|
||||
|
||||
Configuring hyperopt is similar to writing your own strategy, and many tasks will be similar and a lot of code can be copied across from the strategy.
|
||||
|
||||
@ -64,9 +64,9 @@ multiple guards. The constructed strategy will be something like
|
||||
"*buy exactly when close price touches lower bollinger band, BUT only if
|
||||
ADX > 10*".
|
||||
|
||||
If you have updated the buy strategy, ie. changed the contents of
|
||||
`populate_buy_trend()` method you have to update the `guards` and
|
||||
`triggers` hyperopts must use.
|
||||
If you have updated the buy strategy, i.e. changed the contents of
|
||||
`populate_buy_trend()` method, you have to update the `guards` and
|
||||
`triggers` your hyperopt must use correspondingly.
|
||||
|
||||
#### Sell optimization
|
||||
|
||||
@ -82,7 +82,7 @@ To avoid naming collisions in the search-space, please prefix all sell-spaces wi
|
||||
#### Using ticker-interval as part of the Strategy
|
||||
|
||||
The Strategy exposes the ticker-interval as `self.ticker_interval`. The same value is available as class-attribute `HyperoptName.ticker_interval`.
|
||||
In the case of the linked sample-value this would be `SampleHyperOpts.ticker_interval`.
|
||||
In the case of the linked sample-value this would be `SampleHyperOpt.ticker_interval`.
|
||||
|
||||
## Solving a Mystery
|
||||
|
||||
|
@ -10,7 +10,7 @@ DEFAULT_TICKER_INTERVAL = 5 # min
|
||||
HYPEROPT_EPOCH = 100 # epochs
|
||||
RETRY_TIMEOUT = 30 # sec
|
||||
DEFAULT_STRATEGY = 'DefaultStrategy'
|
||||
DEFAULT_HYPEROPT = 'DefaultHyperOpts'
|
||||
DEFAULT_HYPEROPT = 'DefaultHyperOpt'
|
||||
DEFAULT_HYPEROPT_LOSS = 'DefaultHyperOptLoss'
|
||||
DEFAULT_DB_PROD_URL = 'sqlite:///tradesv3.sqlite'
|
||||
DEFAULT_DB_DRYRUN_URL = 'sqlite://'
|
||||
|
@ -11,7 +11,7 @@ import freqtrade.vendor.qtpylib.indicators as qtpylib
|
||||
from freqtrade.optimize.hyperopt_interface import IHyperOpt
|
||||
|
||||
|
||||
class DefaultHyperOpts(IHyperOpt):
|
||||
class DefaultHyperOpt(IHyperOpt):
|
||||
"""
|
||||
Default hyperopt provided by the Freqtrade bot.
|
||||
You can override it with your own Hyperopt
|
||||
|
@ -1,7 +1,7 @@
|
||||
# pragma pylint: disable=attribute-defined-outside-init
|
||||
|
||||
"""
|
||||
This module load custom hyperopts
|
||||
This module load custom pairlists
|
||||
"""
|
||||
import logging
|
||||
from pathlib import Path
|
||||
@ -15,7 +15,7 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
class PairListResolver(IResolver):
|
||||
"""
|
||||
This class contains all the logic to load custom hyperopt class
|
||||
This class contains all the logic to load custom PairList class
|
||||
"""
|
||||
|
||||
__slots__ = ['pairlist']
|
||||
|
@ -12,7 +12,7 @@ from freqtrade import OperationalException
|
||||
from freqtrade.data.converter import parse_ticker_dataframe
|
||||
from freqtrade.data.history import load_tickerdata_file
|
||||
from freqtrade.optimize import setup_configuration, start_hyperopt
|
||||
from freqtrade.optimize.default_hyperopt import DefaultHyperOpts
|
||||
from freqtrade.optimize.default_hyperopt import DefaultHyperOpt
|
||||
from freqtrade.optimize.default_hyperopt_loss import DefaultHyperOptLoss
|
||||
from freqtrade.optimize.hyperopt import Hyperopt
|
||||
from freqtrade.resolvers.hyperopt_resolver import (HyperOptLossResolver,
|
||||
@ -148,12 +148,12 @@ def test_setup_hyperopt_configuration_with_arguments(mocker, default_conf, caplo
|
||||
def test_hyperoptresolver(mocker, default_conf, caplog) -> None:
|
||||
patched_configuration_load_config_file(mocker, default_conf)
|
||||
|
||||
hyperopts = DefaultHyperOpts
|
||||
delattr(hyperopts, 'populate_buy_trend')
|
||||
delattr(hyperopts, 'populate_sell_trend')
|
||||
hyperopt = DefaultHyperOpt
|
||||
delattr(hyperopt, 'populate_buy_trend')
|
||||
delattr(hyperopt, 'populate_sell_trend')
|
||||
mocker.patch(
|
||||
'freqtrade.resolvers.hyperopt_resolver.HyperOptResolver._load_hyperopt',
|
||||
MagicMock(return_value=hyperopts(default_conf))
|
||||
MagicMock(return_value=hyperopt(default_conf))
|
||||
)
|
||||
x = HyperOptResolver(default_conf, ).hyperopt
|
||||
assert not hasattr(x, 'populate_buy_trend')
|
||||
|
Loading…
Reference in New Issue
Block a user