use pandas own min and max for column sorting

This commit is contained in:
Janne Sinivirta 2018-07-25 17:04:25 +03:00
parent 0b3190552e
commit 4b38c8b11d

View File

@ -77,7 +77,7 @@ class Backtesting(object):
:return: tuple containing min_date, max_date
"""
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()
]
return min(timeframe, key=operator.itemgetter(0))[0], \