From 7e214d8e4c14fb640a1b4c417c78b07381aaa4b7 Mon Sep 17 00:00:00 2001 From: hroff-1902 <47309513+hroff-1902@users.noreply.github.com> Date: Sat, 28 Sep 2019 11:50:15 +0300 Subject: [PATCH 1/4] minor: change default stoploss space --- docs/hyperopt.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/hyperopt.md b/docs/hyperopt.md index 9542d5725..b31e515ab 100644 --- a/docs/hyperopt.md +++ b/docs/hyperopt.md @@ -425,7 +425,7 @@ Buy hyperspace params: Stoploss: -0.37996664668703606 ``` -If you are optimizing stoploss values, Freqtrade creates the 'stoploss' optimization hyperspace for you. By default, the stoploss values in that hyperspace can vary in the range -0.5...-0.02, which is sufficient in most cases. +If you are optimizing stoploss values, Freqtrade creates the 'stoploss' optimization hyperspace for you. By default, the stoploss values in that hyperspace can vary in the range -0.35...-0.02, which is sufficient in most cases. If you have the `stoploss_space()` method in your custom hyperopt file, remove it in order to utilize Stoploss hyperoptimization space generated by Freqtrade by default. From 45f5394d799190edf023bbe493bc3964cd0aebb2 Mon Sep 17 00:00:00 2001 From: hroff-1902 <47309513+hroff-1902@users.noreply.github.com> Date: Sat, 28 Sep 2019 11:54:26 +0300 Subject: [PATCH 2/4] Align example in the docs --- docs/hyperopt.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/hyperopt.md b/docs/hyperopt.md index b31e515ab..45528edab 100644 --- a/docs/hyperopt.md +++ b/docs/hyperopt.md @@ -422,7 +422,7 @@ Buy hyperspace params: 'adx-enabled': False, 'rsi-enabled': True, 'trigger': 'bb_lower'} -Stoploss: -0.37996664668703606 +Stoploss: -0.27996 ``` If you are optimizing stoploss values, Freqtrade creates the 'stoploss' optimization hyperspace for you. By default, the stoploss values in that hyperspace can vary in the range -0.35...-0.02, which is sufficient in most cases. From 2f005d6be96dcc8d98abcca813a9c10eb5a99eb9 Mon Sep 17 00:00:00 2001 From: hroff-1902 <47309513+hroff-1902@users.noreply.github.com> Date: Sat, 28 Sep 2019 11:56:19 +0300 Subject: [PATCH 3/4] Align example of ROI in the docs --- docs/hyperopt.md | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/docs/hyperopt.md b/docs/hyperopt.md index 45528edab..beef414bf 100644 --- a/docs/hyperopt.md +++ b/docs/hyperopt.md @@ -375,23 +375,12 @@ Buy hyperspace params: 'rsi-enabled': True, 'trigger': 'bb_lower'} ROI table: -{ 0: 0.10674752302642071, - 21: 0.09158372701087236, - 78: 0.03634636907306948, +{ 0: 0.10674, + 21: 0.09158, + 78: 0.03634, 118: 0} ``` -This would translate to the following ROI table: - -``` python -minimal_roi = { - "118": 0, - "78": 0.0363, - "21": 0.0915, - "0": 0.106 - } -``` - If you are optimizing ROI, Freqtrade creates the 'roi' optimization hyperspace for you -- it's the hyperspace of components for the ROI tables. By default, each ROI table generated by the Freqtrade consists of 4 rows (steps). Hyperopt implements adaptive ranges for ROI tables with ranges for values in the ROI steps that depend on the ticker_interval used. By default the values can vary in the following ranges (for some of the most used ticker intervals, values are rounded to 5 digits after the decimal point): | # step | 1m | | 5m | | 1h | | 1d | | From 6a397f579e449e40c18584d45ee318b1603ac7b5 Mon Sep 17 00:00:00 2001 From: hroff-1902 <47309513+hroff-1902@users.noreply.github.com> Date: Sun, 29 Sep 2019 00:43:27 +0300 Subject: [PATCH 4/4] Add description of usage --- docs/hyperopt.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/docs/hyperopt.md b/docs/hyperopt.md index beef414bf..1ca371e3d 100644 --- a/docs/hyperopt.md +++ b/docs/hyperopt.md @@ -381,6 +381,22 @@ ROI table: 118: 0} ``` +In order to use this best ROI table found by Hyperopt in backtesting and for live trades/dry-run, copy-paste it as the value of the `minimal_roi` attribute of your custom strategy: + +``` + # Minimal ROI designed for the strategy. + # This attribute will be overridden if the config file contains "minimal_roi" + minimal_roi = { + 0: 0.10674, + 21: 0.09158, + 78: 0.03634, + 118: 0 + } +``` +As stated in the comment, you can also use it as the value of the `minimal_roi` setting in the configuration file. + +#### Default ROI Search Space + If you are optimizing ROI, Freqtrade creates the 'roi' optimization hyperspace for you -- it's the hyperspace of components for the ROI tables. By default, each ROI table generated by the Freqtrade consists of 4 rows (steps). Hyperopt implements adaptive ranges for ROI tables with ranges for values in the ROI steps that depend on the ticker_interval used. By default the values can vary in the following ranges (for some of the most used ticker intervals, values are rounded to 5 digits after the decimal point): | # step | 1m | | 5m | | 1h | | 1d | | @@ -414,6 +430,17 @@ Buy hyperspace params: Stoploss: -0.27996 ``` +In order to use this best stoploss value found by Hyperopt in backtesting and for live trades/dry-run, copy-paste it as the value of the `stoploss` attribute of your custom strategy: + +``` + # Optimal stoploss designed for the strategy + # This attribute will be overridden if the config file contains "stoploss" + stoploss = -0.27996 +``` +As stated in the comment, you can also use it as the value of the `stoploss` setting in the configuration file. + +#### Default Stoploss Search Space + If you are optimizing stoploss values, Freqtrade creates the 'stoploss' optimization hyperspace for you. By default, the stoploss values in that hyperspace can vary in the range -0.35...-0.02, which is sufficient in most cases. If you have the `stoploss_space()` method in your custom hyperopt file, remove it in order to utilize Stoploss hyperoptimization space generated by Freqtrade by default.