factor_agent.session.SessionFactor#

class SessionFactor(config)[source]#

Bases: FactorKunQuant

Intraday graphs, each ending in a session aggregation, on an intraday dataset; see the module docstring.

The graphs, name to Graph.to_json(), are config.kwargs["graphs"] and the class path of each operator they record config.kwargs["classes"] (Vocabulary.class_paths). config.data_columns must hold the dataset columns they read (data_columns). Batch mode only: the session inputs are computed from a whole panel.

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

Methods#

SessionFactor.cell_bytes

Return the bytes one bar of one symbol takes: at peak, and as output; see Factor.cell_bytes.

SessionFactor.compute

Compute as FactorKunQuant does, a resample to "1d" with "last" taking each session's last bar.

SessionFactor.data_columns

The dataset columns the recorded graphs read besides the session inputs, and the price, sorted.