Add comment to clarify usage of trim_dataframes

This commit is contained in:
Matthias 2023-07-21 20:19:58 +02:00
parent 9c1fea0e7b
commit 91bf8abf38
2 changed files with 3 additions and 0 deletions

View File

@ -1277,6 +1277,7 @@ class Backtesting:
preprocessed = self.strategy.advise_all_indicators(data)
# Trim startup period from analyzed dataframe
# This only used to determine if trimming would result in an empty dataframe
preprocessed_tmp = trim_dataframes(preprocessed, timerange, self.required_startup)
if not preprocessed_tmp:

View File

@ -446,6 +446,8 @@ class Hyperopt:
preprocessed = self.backtesting.strategy.advise_all_indicators(data)
# Trim startup period from analyzed dataframe to get correct dates for output.
# This is only used to keep track of min/max date after trimming.
# The result is NOT returned from this method, actual trimming happens in backtesting.
trimmed = trim_dataframes(preprocessed, self.timerange, self.backtesting.required_startup)
self.min_date, self.max_date = get_timerange(trimmed)
if not self.market_change: