Skip to content

Trouble with getNYSEdays function #50

Open

Description

@andrelfpinto

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)]

Activity

  1. emoen commented on Oct 26, 2016

    @emoen

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions