Merge pull request #826 from gcarq/fix/hyperopt-stake_currency

Fix stake_currency returned by Hyperopt  …
This commit is contained in:
Janne Sinivirta
2018-06-03 07:19:24 +03:00
committed by GitHub
4 changed files with 27 additions and 9 deletions

View File

@@ -104,8 +104,10 @@ def load_data(datadir: str,
result[pair] = pairdata
else:
logger.warning(
'No data for pair %s, use --refresh-pairs-cached to download the data',
pair
'No data for pair: "%s", Interval: %s. '
'Use --refresh-pairs-cached to download the data',
pair,
ticker_interval
)
return result

View File

@@ -480,16 +480,16 @@ class Hyperopt(Backtesting):
'result': result_explanation,
}
@staticmethod
def format_results(results: DataFrame) -> str:
def format_results(self, results: DataFrame) -> str:
"""
Return the format result in a string
"""
return ('{:6d} trades. Avg profit {: 5.2f}%. '
'Total profit {: 11.8f} BTC ({:.4f}Σ%). Avg duration {:5.1f} mins.').format(
'Total profit {: 11.8f} {} ({:.4f}Σ%). Avg duration {:5.1f} mins.').format(
len(results.index),
results.profit_percent.mean() * 100.0,
results.profit_BTC.sum(),
self.config['stake_currency'],
results.profit_percent.sum(),
results.duration.mean(),
)