quantlab.factor.kunquant#

KunQuant backend of the factor layer: FactorKunQuant.

A FactorKunQuant describes a factor as a KunQuant operator graph; KunQuant compiles that graph to native code and runs it either over the whole history (batch mode) or one bar at a time (streaming mode, for live data). Subclass it and implement _get_factor_func. Shipped factor sets are in quantlab/factor/predefined.

Classes

FactorKunQuant

Factor backend that compiles a KunQuant op graph to native code.

Functions

run_batch_graph

Compile function for a whole range (through compile_graphs) and run it over arrays.

shared_executor

Return the process-wide KunQuant multi-thread executor for num_threads.