quantlab.dataset.nbbo.bars.NbboBarsSession#

class quantlab.dataset.nbbo.bars.NbboBarsSession(day, open, close, open_clock, close_clock, n_bars)[source]#

Bases: NamedTuple

One session’s bounds, as the server statement and the bar labels need them.

Attributes:
daydatetime.date

The session date.

open, closedatetime.datetime

The window’s open and close in naive UTC; bar k is labelled open + k * bar length.

open_clock, close_clockdatetime.time

The same instants as New York clock times, the clock of TAQ’s time_m.

n_barsint

How many bars the window holds.

Examples

>>> request = NbboBarsRequest("1m")
>>> request.session(request.calendar(), date(2024, 1, 24)).open
datetime.datetime(2024, 1, 24, 14, 30)
close#

Alias for field number 2

close_clock#

Alias for field number 4

day#

Alias for field number 0

n_bars#

Alias for field number 5

open#

Alias for field number 1

open_clock#

Alias for field number 3