Add option to show sorted pairlist

Allows easy copy/pasting of the pairlist to a configuration
This commit is contained in:
Matthias
2021-10-30 10:50:40 +02:00
parent 0f3809345a
commit f472709438
5 changed files with 36 additions and 42 deletions

View File

@@ -736,17 +736,12 @@ def show_backtest_results(config: Dict, backtest_stats: Dict):
print('=' * len(table.splitlines()[0]))
print('\nFor more details, please look at the detail tables above')
def show_backtest_results_filtered(config: Dict, backtest_stats: Dict):
stake_currency = config['stake_currency']
for strategy, results in backtest_stats['strategy'].items():
show_backtest_result(strategy, results, stake_currency)
if len(backtest_stats['strategy']) > 1:
# Print Strategy summary table
table = text_table_strategy(backtest_stats['strategy_comparison'], stake_currency)
print(' STRATEGY SUMMARY '.center(len(table.splitlines()[0]), '='))
print(table)
print('=' * len(table.splitlines()[0]))
print('\nFor more details, please look at the detail tables above')
def show_filtered_pairlist(config: Dict, backtest_stats: Dict):
if config.get('backtest_show_pair_list', False):
for strategy, results in backtest_stats['strategy'].items():
print("Pairs for Strategy: \n[")
for result in results['results_per_pair']:
if result["key"] != 'TOTAL':
print(f'"{result["key"]}", // {round(result["profit_mean_pct"], 2)}%')
print("]")