factor_agent.session.SessionColumns#
- class SessionColumns(dataset, graphs, classes, njobs=1, granularity=None)[source]#
Bases:
ProviderThe session columns of intraday graphs, filled for a daily factor from an intraday dataset.
graphsmaps each session column to its intraday graph (Graph.to_json(), by the namesstages.splitgives them) andclassesgives the class path of every operator they record (Vocabulary.class_paths).fillcomputes them withSessionFactorondataset, 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’sChunkedBuilder: only one chunk’s bars are in memory at a time, beside the daily values.granularityis the chunks’ calendar period ("month","day"…);Nonecomputes 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#
Compile the session columns' graphs as |
|
The arrays of |