Merge pull request #4838 from Antreasgr/fix-encoding-issue
Fix bug in running hyperopt in windows 10
This commit is contained in:
commit
7bfe935e37
@ -289,7 +289,7 @@ Given the following result from hyperopt:
|
||||
```
|
||||
Best result:
|
||||
|
||||
44/100: 135 trades. Avg profit 0.57%. Total profit 0.03871918 BTC (0.7722Σ%). Avg duration 180.4 mins. Objective: 1.94367
|
||||
44/100: 135 trades. Avg profit 0.57%. Total profit 0.03871918 BTC (0.7722%). Avg duration 180.4 mins. Objective: 1.94367
|
||||
|
||||
Buy hyperspace params:
|
||||
{ 'adx-value': 44,
|
||||
|
@ -491,7 +491,7 @@ Given the following result from hyperopt:
|
||||
```
|
||||
Best result:
|
||||
|
||||
44/100: 135 trades. Avg profit 0.57%. Total profit 0.03871918 BTC (0.7722Σ%). Avg duration 180.4 mins. Objective: 1.94367
|
||||
44/100: 135 trades. Avg profit 0.57%. Total profit 0.03871918 BTC (0.7722%). Avg duration 180.4 mins. Objective: 1.94367
|
||||
|
||||
# Buy hyperspace params:
|
||||
buy_params = {
|
||||
@ -532,7 +532,7 @@ If you are optimizing ROI (i.e. if optimization search-space contains 'all', 'de
|
||||
```
|
||||
Best result:
|
||||
|
||||
44/100: 135 trades. Avg profit 0.57%. Total profit 0.03871918 BTC (0.7722Σ%). Avg duration 180.4 mins. Objective: 1.94367
|
||||
44/100: 135 trades. Avg profit 0.57%. Total profit 0.03871918 BTC (0.7722%). Avg duration 180.4 mins. Objective: 1.94367
|
||||
|
||||
# ROI table:
|
||||
minimal_roi = {
|
||||
@ -587,7 +587,7 @@ If you are optimizing stoploss values (i.e. if optimization search-space contain
|
||||
```
|
||||
Best result:
|
||||
|
||||
44/100: 135 trades. Avg profit 0.57%. Total profit 0.03871918 BTC (0.7722Σ%). Avg duration 180.4 mins. Objective: 1.94367
|
||||
44/100: 135 trades. Avg profit 0.57%. Total profit 0.03871918 BTC (0.7722%). Avg duration 180.4 mins. Objective: 1.94367
|
||||
|
||||
# Buy hyperspace params:
|
||||
buy_params = {
|
||||
@ -629,7 +629,7 @@ If you are optimizing trailing stop values (i.e. if optimization search-space co
|
||||
```
|
||||
Best result:
|
||||
|
||||
45/100: 606 trades. Avg profit 1.04%. Total profit 0.31555614 BTC ( 630.48Σ%). Avg duration 150.3 mins. Objective: -1.10161
|
||||
45/100: 606 trades. Avg profit 1.04%. Total profit 0.31555614 BTC ( 630.48%). Avg duration 150.3 mins. Objective: -1.10161
|
||||
|
||||
# Trailing stop:
|
||||
trailing_stop = True
|
||||
|
@ -1,6 +1,5 @@
|
||||
|
||||
import io
|
||||
import locale
|
||||
import logging
|
||||
from collections import OrderedDict
|
||||
from pathlib import Path
|
||||
@ -195,9 +194,9 @@ class HyperoptTools():
|
||||
f"Avg profit {results_metrics['profit_mean'] * 100: 6.2f}%. "
|
||||
f"Median profit {results_metrics['profit_median'] * 100: 6.2f}%. "
|
||||
f"Total profit {results_metrics['profit_total_abs']: 11.8f} {stake_currency} "
|
||||
f"({results_metrics['profit_total'] * 100: 7.2f}\N{GREEK CAPITAL LETTER SIGMA}%). "
|
||||
f"({results_metrics['profit_total'] * 100: 7.2f}%). "
|
||||
f"Avg duration {results_metrics['holding_avg']} min."
|
||||
).encode(locale.getpreferredencoding(), 'replace').decode('utf-8')
|
||||
)
|
||||
|
||||
@staticmethod
|
||||
def _format_explanation_string(results, total_epochs) -> str:
|
||||
|
@ -1,5 +1,4 @@
|
||||
# pragma pylint: disable=missing-docstring,W0212,C0103
|
||||
import locale
|
||||
import logging
|
||||
import re
|
||||
from datetime import datetime
|
||||
@ -640,9 +639,9 @@ def test_generate_optimizer(mocker, hyperopt_conf) -> None:
|
||||
'loss': 1.9147239021396234,
|
||||
'results_explanation': (' 4 trades. 4/0/0 Wins/Draws/Losses. '
|
||||
'Avg profit 0.77%. Median profit 0.71%. Total profit '
|
||||
'0.00003100 BTC ( 0.00\N{GREEK CAPITAL LETTER SIGMA}%). '
|
||||
'0.00003100 BTC ( 0.00%). '
|
||||
'Avg duration 0:50:00 min.'
|
||||
).encode(locale.getpreferredencoding(), 'replace').decode('utf-8'),
|
||||
),
|
||||
'params_details': {'buy': {'adx-enabled': False,
|
||||
'adx-value': 0,
|
||||
'fastd-enabled': True,
|
||||
|
Loading…
Reference in New Issue
Block a user