factor_agent.aggregations.WithinSession#

class WithinSession(x, position, bars)[source]#

Bases: CompositiveOp

x on the bars at least bars bars into their session, NaN on the session’s first bars.

position is the bar’s position in its session (quantlab’s SESSION_POSITION). The stage split (factor_agent.gate.stages) wraps each window of the intraday stage in it, bars the bars the window reaches back, its inputs’ windows included, so the window is missing until it fits in the session; KunQuant decomposes it into a Select. Candidate code never calls it.

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

Methods#