From 3338fdece3a352e6341d9e3e4627266a65f69112 Mon Sep 17 00:00:00 2001 From: Matthias Date: Tue, 16 Apr 2024 20:34:07 +0200 Subject: [PATCH] Relative profit should be relative cumulative profit --- freqtrade/data/metrics.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/freqtrade/data/metrics.py b/freqtrade/data/metrics.py index ee4c769ff..43a33fa0d 100644 --- a/freqtrade/data/metrics.py +++ b/freqtrade/data/metrics.py @@ -62,7 +62,7 @@ def combined_dataframes_with_rel_mean( df_comb = df_comb.iloc[(df_comb.index >= fromdt) & (df_comb.index < todt)] df_comb['count'] = df_comb.count(axis=1) df_comb['mean'] = df_comb.mean(axis=1) - df_comb['rel_mean'] = df_comb['mean'].pct_change().fillna(0) + df_comb['rel_mean'] = df_comb['mean'].pct_change().fillna(0).cumsum() return df_comb[['mean', 'rel_mean', 'count']]