align numbers in hyperopt print out (#119)
This commit is contained in:
parent
5deaebf0c2
commit
d88cc084e6
@ -23,8 +23,8 @@ logger = logging.getLogger(__name__)
|
|||||||
|
|
||||||
|
|
||||||
def format_results(results: DataFrame):
|
def format_results(results: DataFrame):
|
||||||
return ('Made {} buys. Average profit {:.2f}%. '
|
return ('Made {:6d} buys. Average profit {: 5.2f}%. '
|
||||||
'Total profit was {:.3f}. Average duration {:.1f} mins.').format(
|
'Total profit was {: 7.3f}. Average duration {:5.1f} mins.').format(
|
||||||
len(results.index),
|
len(results.index),
|
||||||
results.profit.mean() * 100.0,
|
results.profit.mean() * 100.0,
|
||||||
results.profit.sum(),
|
results.profit.sum(),
|
||||||
|
@ -94,7 +94,7 @@ def test_hyperopt(backtest_conf, mocker):
|
|||||||
# pylint: disable=W0603
|
# pylint: disable=W0603
|
||||||
global current_tries
|
global current_tries
|
||||||
current_tries += 1
|
current_tries += 1
|
||||||
print('{}/{}: {}'.format(current_tries, TOTAL_TRIES, result))
|
print('{:5d}/{}: {}'.format(current_tries, TOTAL_TRIES, result))
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'loss': trade_loss + profit_loss,
|
'loss': trade_loss + profit_loss,
|
||||||
|
Loading…
Reference in New Issue
Block a user