mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-19 11:22:06 +08:00
MAINT: Use Timestamp instead of Delorean for tradingcalendar end.
Instead of Delorean, use pandas `today` behavior for Timestamp.
This commit is contained in:
@@ -19,12 +19,10 @@ import pytz
|
||||
|
||||
from datetime import datetime, timedelta
|
||||
from dateutil import rrule
|
||||
from delorean import Delorean
|
||||
|
||||
start = datetime(1990, 1, 1, tzinfo=pytz.utc)
|
||||
end_dln = Delorean(datetime.utcnow(), pytz.utc.zone)
|
||||
end_dln.shift('US/Eastern').truncate('day').shift(pytz.utc.zone)
|
||||
end = end_dln.datetime - timedelta(days=1)
|
||||
end_dln = pd.Timestamp('today', tz='UTC')
|
||||
end = end_dln - timedelta(days=1)
|
||||
|
||||
|
||||
def canonicalize_datetime(dt):
|
||||
|
||||
Reference in New Issue
Block a user