factor_agent.session.SessionColumns#

class SessionColumns(dataset, graphs, classes, njobs=1, granularity=None)[source]#

Bases: Provider

The session columns of intraday graphs, filled for a daily factor from an intraday dataset.

graphs maps each session column to its intraday graph (Graph.to_json(), by the names stages.split gives them) and classes gives the class path of every operator they record (Vocabulary.class_paths). fill computes them with SessionFactor on dataset, the intraday dataset, over the days of the daily axes, and puts each session’s value on its day: a session’s label is its date, and a symbol is matched by its label as text, so the permatickers of an integer axis find the symbols of a text one. A day without a session (before the intraday data begins, say) and a symbol the intraday dataset does not hold are NaN. It reads no column of the daily dataset and needs no warm-up: an intraday graph sees its own session only.

The graphs run as one SessionFactor, so a subtree several of them hold is computed once, and in chunks of whole sessions through quantlab’s ChunkedBuilder: only one chunk’s bars are in memory at a time, beside the daily values. granularity is the chunks’ calendar period ("month", "day"…); None computes the days whole when they fit in the memory available (SessionFactor.cell_bytes) and otherwise in the coarsest period whose chunks do. The values do not depend on it. The dataset must read a store (stored_symbols), as a campaign’s intraday dataset does.

Inherited methods and attributes are documented on the base classes linked above.

Methods#

SessionColumns.compile

Compile the session columns' graphs as fill does, without reading the dataset.

SessionColumns.fill

The arrays of columns, on the axes of arrays (timestamps by symbols).