From 4dec19de9f9ca55565c7972c62eb65afa33d1f48 Mon Sep 17 00:00:00 2001 From: Matthias Date: Tue, 6 Sep 2022 06:52:50 +0200 Subject: [PATCH] Add comment to explain why we use the non-trimmed DF --- freqtrade/optimize/hyperopt.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/freqtrade/optimize/hyperopt.py b/freqtrade/optimize/hyperopt.py index 4c8613a7a..3becf857f 100644 --- a/freqtrade/optimize/hyperopt.py +++ b/freqtrade/optimize/hyperopt.py @@ -421,8 +421,9 @@ class Hyperopt: preprocessed = self.backtesting.strategy.advise_all_indicators(data) # Trim startup period from analyzed dataframe to get correct dates for output. - processed = trim_dataframes(preprocessed, self.timerange, self.backtesting.required_startup) - self.min_date, self.max_date = get_timerange(processed) + trimmed = trim_dataframes(preprocessed, self.timerange, self.backtesting.required_startup) + self.min_date, self.max_date = get_timerange(trimmed) + # Real trimming will happen as part of backtesting. return preprocessed def prepare_hyperopt_data(self) -> None: