From b2c87c359118f90d17f2d040a29f40e991787696 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Jun 2023 16:05:34 +0000 Subject: [PATCH 1/4] Bump numpy from 1.24.3 to 1.25.0 Bumps [numpy](https://github.com/numpy/numpy) from 1.24.3 to 1.25.0. - [Release notes](https://github.com/numpy/numpy/releases) - [Changelog](https://github.com/numpy/numpy/blob/main/doc/RELEASE_WALKTHROUGH.rst) - [Commits](https://github.com/numpy/numpy/compare/v1.24.3...v1.25.0) --- updated-dependencies: - dependency-name: numpy dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 6a2ae6318..fd0c52927 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -numpy==1.24.3 +numpy==1.25.0 pandas==2.0.2 pandas-ta==0.3.14b From e6db5bd193184cae25739403ad80fd5766f9deba Mon Sep 17 00:00:00 2001 From: Matthias Date: Thu, 6 Jul 2023 20:52:51 +0200 Subject: [PATCH 2/4] Pin numpy for python < 3.8 --- requirements.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index fd0c52927..788faa4cd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,5 @@ -numpy==1.25.0 +numpy==1.25.0; python_version > '3.8' +numpy==1.24.3; python_version <= '3.8' pandas==2.0.2 pandas-ta==0.3.14b From 5c0f5588a6a87c0ff92f9618f19ab4f6e73a2186 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 8 Jul 2023 09:49:01 +0200 Subject: [PATCH 3/4] Simplify sort_values in PerformanceFilter Avoids potential regression in numpy 1.25.0 - which doesn't keep prior sort order in chained sort_values calls. --- freqtrade/plugins/pairlist/PerformanceFilter.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/freqtrade/plugins/pairlist/PerformanceFilter.py b/freqtrade/plugins/pairlist/PerformanceFilter.py index 06c504317..b45259605 100644 --- a/freqtrade/plugins/pairlist/PerformanceFilter.py +++ b/freqtrade/plugins/pairlist/PerformanceFilter.py @@ -89,10 +89,10 @@ class PerformanceFilter(IPairList): # Sort the list using: # - primarily performance (high to low) # - then count (low to high, so as to favor same performance with fewer trades) - # - then pair name alphametically + # - then by prior index, keeping original sorting order sorted_df = list_df.merge(performance, on='pair', how='left')\ - .fillna(0).sort_values(by=['count', 'prior_idx'], ascending=True)\ - .sort_values(by=['profit_ratio'], ascending=False) + .fillna(0).sort_values(by=['profit_ratio', 'count', 'prior_idx'], + ascending=[False, True, True]) if self._min_profit is not None: removed = sorted_df[sorted_df['profit_ratio'] < self._min_profit] for _, row in removed.iterrows(): From c4b0f24cd727c046ad94a03f0ad26eb99e9e2674 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 8 Jul 2023 13:26:23 +0200 Subject: [PATCH 4/4] Use USD for kraken tests, as it has more volume. --- tests/exchange/test_ccxt_compat.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/exchange/test_ccxt_compat.py b/tests/exchange/test_ccxt_compat.py index c1967abcd..51f373108 100644 --- a/tests/exchange/test_ccxt_compat.py +++ b/tests/exchange/test_ccxt_compat.py @@ -93,8 +93,8 @@ EXCHANGES = { }] }, 'kraken': { - 'pair': 'BTC/USDT', - 'stake_currency': 'USDT', + 'pair': 'BTC/USD', + 'stake_currency': 'USD', 'hasQuoteVolume': True, 'timeframe': '1h', 'leverage_tiers_public': False,