From e8aec967ddb9ab7d33cee93254201c8330e41a92 Mon Sep 17 00:00:00 2001 From: Nicolas Papp Date: Sun, 24 Apr 2022 17:42:52 -0300 Subject: [PATCH] Update on note --- freqtrade/data/btanalysis.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/freqtrade/data/btanalysis.py b/freqtrade/data/btanalysis.py index 6911941e6..5f5ced053 100644 --- a/freqtrade/data/btanalysis.py +++ b/freqtrade/data/btanalysis.py @@ -446,7 +446,8 @@ def _calc_drawdown_series(profit_results: pd.DataFrame, *, date_col: str, value_ max_balance = starting_balance + max_drawdown_df['high_value'] max_drawdown_df['drawdown_relative'] = ((max_balance - cumulative_balance) / max_balance) else: - # This is not completely accurate + # NOTE: This is not completely accurate, + # but might good enough if starting_balance is not available max_drawdown_df['drawdown_relative'] = ( (max_drawdown_df['high_value'] - max_drawdown_df['cumulative']) / max_drawdown_df['high_value'])