Fix some tests

This commit is contained in:
hroff-1902
2019-11-27 22:52:43 +03:00
parent c3d7411668
commit 8f9b5095b5
2 changed files with 47 additions and 10 deletions

View File

@@ -181,7 +181,7 @@ class Hyperopt:
"""
Display details of the hyperopt result
"""
params = results['params_details']
params = results.get('params_details', {})
# Default header string
if header_str is None:
@@ -335,6 +335,11 @@ class Hyperopt:
'end_date': max_date,
}
)
return self._get_results_dict(backtesting_results, min_date, max_date,
params_dict, params_details)
def _get_results_dict(self, backtesting_results, min_date, max_date,
params_dict, params_details):
results_metrics = self._calculate_results_metrics(backtesting_results)
results_explanation = self._format_results_explanation_string(results_metrics)