From e97468964a46bc7464928a1626fa60f7b946ffbc Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 23 Jul 2022 08:42:20 +0200 Subject: [PATCH] Add support for --timeframe-detail in hyperopt fix #7070 --- docs/hyperopt.md | 23 ++++++++++++++++------- freqtrade/commands/arguments.py | 2 +- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/docs/hyperopt.md b/docs/hyperopt.md index 55fe8f008..c9ec30056 100644 --- a/docs/hyperopt.md +++ b/docs/hyperopt.md @@ -40,13 +40,15 @@ pip install -r requirements-hyperopt.txt ``` usage: freqtrade hyperopt [-h] [-v] [--logfile FILE] [-V] [-c PATH] [-d PATH] [--userdir PATH] [-s NAME] [--strategy-path PATH] - [-i TIMEFRAME] [--timerange TIMERANGE] + [--recursive-strategy-search] [-i TIMEFRAME] + [--timerange TIMERANGE] [--data-format-ohlcv {json,jsongz,hdf5}] [--max-open-trades INT] [--stake-amount STAKE_AMOUNT] [--fee FLOAT] [-p PAIRS [PAIRS ...]] [--hyperopt-path PATH] [--eps] [--dmmp] [--enable-protections] - [--dry-run-wallet DRY_RUN_WALLET] [-e INT] + [--dry-run-wallet DRY_RUN_WALLET] + [--timeframe-detail TIMEFRAME_DETAIL] [-e INT] [--spaces {all,buy,sell,roi,stoploss,trailing,protection,default} [{all,buy,sell,roi,stoploss,trailing,protection,default} ...]] [--print-all] [--no-color] [--print-json] [-j JOBS] [--random-state INT] [--min-trades INT] @@ -89,6 +91,9 @@ optional arguments: --dry-run-wallet DRY_RUN_WALLET, --starting-balance DRY_RUN_WALLET Starting balance, used for backtesting / hyperopt and dry-runs. + --timeframe-detail TIMEFRAME_DETAIL + Specify detail timeframe for backtesting (`1m`, `5m`, + `30m`, `1h`, `1d`). -e INT, --epochs INT Specify number of epochs (default: 100). --spaces {all,buy,sell,roi,stoploss,trailing,protection,default} [{all,buy,sell,roi,stoploss,trailing,protection,default} ...] Specify which parameters to hyperopt. Space-separated @@ -146,7 +151,9 @@ Strategy arguments: Specify strategy class name which will be used by the bot. --strategy-path PATH Specify additional strategy lookup path. - + --recursive-strategy-search + Recursively search for a strategy in the strategies + folder. ``` ### Hyperopt checklist @@ -867,10 +874,12 @@ You can also enable position stacking in the configuration file by explicitly se As hyperopt consumes a lot of memory (the complete data needs to be in memory once per parallel backtesting process), it's likely that you run into "out of memory" errors. To combat these, you have multiple options: -* reduce the amount of pairs -* reduce the timerange used (`--timerange `) -* reduce the number of parallel processes (`-j `) -* Increase the memory of your machine +* Reduce the amount of pairs. +* Reduce the timerange used (`--timerange `). +* Avoid using `--timeframe-detail` (this loads a lot of additional data into memory). +* Reduce the number of parallel processes (`-j `). +* Increase the memory of your machine. + ## The objective has been evaluated at this point before. diff --git a/freqtrade/commands/arguments.py b/freqtrade/commands/arguments.py index 1e3e2845a..fc3eda14d 100644 --- a/freqtrade/commands/arguments.py +++ b/freqtrade/commands/arguments.py @@ -28,7 +28,7 @@ ARGS_BACKTEST = ARGS_COMMON_OPTIMIZE + ["position_stacking", "use_max_market_pos ARGS_HYPEROPT = ARGS_COMMON_OPTIMIZE + ["hyperopt", "hyperopt_path", "position_stacking", "use_max_market_positions", - "enable_protections", "dry_run_wallet", + "enable_protections", "dry_run_wallet", "timeframe_detail", "epochs", "spaces", "print_all", "print_colorized", "print_json", "hyperopt_jobs", "hyperopt_random_state", "hyperopt_min_trades",