Added timerange above multiple strategy backtest result summary table
This commit is contained in:
parent
f3684e0051
commit
c99ae3b419
@ -660,9 +660,13 @@ def show_backtest_results(config: Dict, backtest_stats: Dict):
|
|||||||
show_backtest_result(strategy, results, stake_currency)
|
show_backtest_result(strategy, results, stake_currency)
|
||||||
|
|
||||||
if len(backtest_stats['strategy']) > 1:
|
if len(backtest_stats['strategy']) > 1:
|
||||||
|
backtest_timerange = f"{next(iter(backtest_stats['strategy'].items()))[1]['backtest_start']} -> " \
|
||||||
|
f"{next(iter(backtest_stats['strategy'].items()))[1]['backtest_end']}"
|
||||||
|
|
||||||
# Print Strategy summary table
|
# Print Strategy summary table
|
||||||
|
|
||||||
table = text_table_strategy(backtest_stats['strategy_comparison'], stake_currency)
|
table = text_table_strategy(backtest_stats['strategy_comparison'], stake_currency)
|
||||||
|
print(backtest_timerange)
|
||||||
print(' STRATEGY SUMMARY '.center(len(table.splitlines()[0]), '='))
|
print(' STRATEGY SUMMARY '.center(len(table.splitlines()[0]), '='))
|
||||||
print(table)
|
print(table)
|
||||||
print('=' * len(table.splitlines()[0]))
|
print('=' * len(table.splitlines()[0]))
|
||||||
|
@ -993,4 +993,5 @@ def test_backtest_start_multi_strat_nomock(default_conf, mocker, caplog, testdat
|
|||||||
assert 'BACKTESTING REPORT' in captured.out
|
assert 'BACKTESTING REPORT' in captured.out
|
||||||
assert 'SELL REASON STATS' in captured.out
|
assert 'SELL REASON STATS' in captured.out
|
||||||
assert 'LEFT OPEN TRADES REPORT' in captured.out
|
assert 'LEFT OPEN TRADES REPORT' in captured.out
|
||||||
|
assert '2017-11-14 21:17:00 -> 2017-11-14 22:58:00' in captured.out
|
||||||
assert 'STRATEGY SUMMARY' in captured.out
|
assert 'STRATEGY SUMMARY' in captured.out
|
||||||
|
Loading…
Reference in New Issue
Block a user