Updated Strategy Summary table to match other backtesting tables (#2864)

This commit is contained in:
Yazeed Al Oyoun
2020-02-06 06:58:58 +01:00
committed by GitHub
parent 9639ffb140
commit 5b00eaa42d
4 changed files with 12 additions and 12 deletions

View File

@@ -441,7 +441,7 @@ class Backtesting:
print()
if len(all_results) > 1:
# Print Strategy summary table
print(' Strategy Summary '.center(133, '='))
print(' STRATEGY SUMMARY '.center(133, '='))
print(generate_text_table_strategy(self.config['stake_currency'],
self.config['max_open_trades'],
all_results=all_results))

View File

@@ -121,9 +121,9 @@ def generate_text_table_strategy(stake_currency: str, max_open_trades: str,
floatfmt = ('s', 'd', '.2f', '.2f', '.8f', '.2f', 'd', '.1f', '.1f')
tabular_data = []
headers = ['Strategy', 'buy count', 'avg profit %', 'cum profit %',
f'tot profit {stake_currency}', 'tot profit %', 'avg duration',
'profit', 'loss']
headers = ['Strategy', 'Buy Count', 'Avg Profit %', 'Cum Profit %',
f'Tot Profit {stake_currency}', 'Tot Profit %', 'Avg Duration',
'Wins', 'Losses']
for strategy, results in all_results.items():
tabular_data.append([
strategy,