Update hyperopt.py

zero pad wins/draws/losses (W/D/L) column to preserve alignment in console pretty print
This commit is contained in:
Allen Day 2020-09-07 23:26:55 +08:00 committed by GitHub
parent 4c34934258
commit f63a378967
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -574,7 +574,7 @@ class Hyperopt:
'wins': wins, 'wins': wins,
'draws': draws, 'draws': draws,
'losses': losses, 'losses': losses,
'winsdrawslosses': f"{wins}/{draws}/{losses}", 'winsdrawslosses': f"{wins:04}/{draws:04}/{losses:04}",
'avg_profit': backtesting_results.profit_percent.mean() * 100.0, 'avg_profit': backtesting_results.profit_percent.mean() * 100.0,
'median_profit': backtesting_results.profit_percent.median() * 100.0, 'median_profit': backtesting_results.profit_percent.median() * 100.0,
'total_profit': backtesting_results.profit_abs.sum(), 'total_profit': backtesting_results.profit_abs.sum(),