From 4537a48988e4a8f6a2703ad4276d7dd564fe5545 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Mar 2021 05:32:17 +0000 Subject: [PATCH 1/2] Bump arrow from 0.17.0 to 1.0.2 Bumps [arrow](https://github.com/arrow-py/arrow) from 0.17.0 to 1.0.2. - [Release notes](https://github.com/arrow-py/arrow/releases) - [Changelog](https://github.com/arrow-py/arrow/blob/master/CHANGELOG.rst) - [Commits](https://github.com/arrow-py/arrow/compare/0.17.0...1.0.2) Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index d17070e34..1508e2abe 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,7 +7,7 @@ cryptography==3.4.6 aiohttp==3.7.4 SQLAlchemy==1.3.23 python-telegram-bot==13.3 -arrow==0.17.0 +arrow==1.0.2 cachetools==4.2.1 requests==2.25.1 urllib3==1.26.3 From 2083cf6ddf859ade1a9fb5e4c6f89ea5d4ad5c99 Mon Sep 17 00:00:00 2001 From: Matthias Date: Mon, 1 Mar 2021 08:57:57 +0100 Subject: [PATCH 2/2] Fix mypy errors introduced by Arrow update --- freqtrade/optimize/backtesting.py | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/freqtrade/optimize/backtesting.py b/freqtrade/optimize/backtesting.py index 3186313e1..25ec3299d 100644 --- a/freqtrade/optimize/backtesting.py +++ b/freqtrade/optimize/backtesting.py @@ -443,16 +443,14 @@ class Backtesting: data, timerange = self.load_bt_data() - min_date = None - max_date = None for strat in self.strategylist: min_date, max_date = self.backtest_one_strategy(strat, data, timerange) + if len(self.strategylist) > 0: + stats = generate_backtest_stats(data, self.all_results, + min_date=min_date, max_date=max_date) - stats = generate_backtest_stats(data, self.all_results, - min_date=min_date, max_date=max_date) + if self.config.get('export', False): + store_backtest_stats(self.config['exportfilename'], stats) - if self.config.get('export', False): - store_backtest_stats(self.config['exportfilename'], stats) - - # Show backtest results - show_backtest_results(self.config, stats) + # Show backtest results + show_backtest_results(self.config, stats)