Merge pull request #1072 from freqtrade/datesorting-backtest-fix

Use pandas own min and max
This commit is contained in:
Matthias 2018-07-25 22:45:24 +01:00 committed by GitHub
commit 78f8c6566e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -77,7 +77,7 @@ class Backtesting(object):
:return: tuple containing min_date, max_date :return: tuple containing min_date, max_date
""" """
timeframe = [ timeframe = [
(arrow.get(min(frame.date)), arrow.get(max(frame.date))) (arrow.get(frame['date'].min()), arrow.get(frame['date'].max()))
for frame in data.values() for frame in data.values()
] ]
return min(timeframe, key=operator.itemgetter(0))[0], \ return min(timeframe, key=operator.itemgetter(0))[0], \