mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
Add comment to clarify usage of trim_dataframes
This commit is contained in:
parent
9c1fea0e7b
commit
91bf8abf38
|
@ -1277,6 +1277,7 @@ class Backtesting:
|
||||||
preprocessed = self.strategy.advise_all_indicators(data)
|
preprocessed = self.strategy.advise_all_indicators(data)
|
||||||
|
|
||||||
# Trim startup period from analyzed dataframe
|
# 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)
|
preprocessed_tmp = trim_dataframes(preprocessed, timerange, self.required_startup)
|
||||||
|
|
||||||
if not preprocessed_tmp:
|
if not preprocessed_tmp:
|
||||||
|
|
|
@ -446,6 +446,8 @@ class Hyperopt:
|
||||||
preprocessed = self.backtesting.strategy.advise_all_indicators(data)
|
preprocessed = self.backtesting.strategy.advise_all_indicators(data)
|
||||||
|
|
||||||
# Trim startup period from analyzed dataframe to get correct dates for output.
|
# 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)
|
trimmed = trim_dataframes(preprocessed, self.timerange, self.backtesting.required_startup)
|
||||||
self.min_date, self.max_date = get_timerange(trimmed)
|
self.min_date, self.max_date = get_timerange(trimmed)
|
||||||
if not self.market_change:
|
if not self.market_change:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user