Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trouble with getNYSEdays function #50

Open
andrelfpinto opened this issue Mar 5, 2014 · 1 comment
Open

Trouble with getNYSEdays function #50

andrelfpinto opened this issue Mar 5, 2014 · 1 comment

Comments

@andrelfpinto
Copy link

The documentation of the getNYSEdays function says that it creates a list of timestamps between startday and endday (inclusive). With endday being the last day to consider.

As I see, the list is not inclusive:

import QSTK.qstkutil.qsdateutil as du
import datetime as dt

dt_start = dt.datetime(2012, 1, 3)
dt_end = dt.datetime(2012, 1, 4)
dt_timeofday = dt.timedelta(hours=16)
ldt_timestamps = du.getNYSEdays(dt_start, dt_end, dt_timeofday)
ldt_timestamps

[Timestamp('2012-01-03 16:00:00', tz=None)]
@emoen
Copy link

emoen commented Oct 26, 2016

still isnt inclusive. Work around is:

ldt_timestamps = du.getNYSEdays(dt_start, dt_end + datetime.timedelta(days=1), dt_timeofday)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants