use pandas own min and max for column sorting
This commit is contained in:
parent
0b3190552e
commit
4b38c8b11d
@ -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], \
|
||||||
|
Loading…
Reference in New Issue
Block a user