factor_agent.evaluator.Evaluator.for_segment#

classmethod Evaluator.for_segment(segment, *, prices, label, scoring, reference=(), known=(), warmup_bars, njobs, purge_bars=5, vocabulary=None, intraday=None, store=None, store_key=None)[source]#

Return an evaluator of segment.

Parameters:
segmentSegment

The only dates it reads, besides warmup_bars bars before.

pricesquantlab dataset

The whole-market adjusted bars the graphs run on.

labelquantlab label

The forward return, read from its store; only the symbols it has a value for on a date are scored on that date.

scoringScoring

How candidates are scored and reference and known factors read.

referencesequence of quantlab factors

The reference set: every output enters the pool. A factor with a store is read as stored, any other is scored as a candidate is (Scoring.read).

knownsequence of quantlab factors

The known factors besides the reference set, read the same way on first use and kept only on the sampled dates; a candidate’s nearest one is in its metrics, and none enters the pool.

warmup_bars, njobsint

Warm-up bars and KunQuant executor threads.

purge_barsint

The fewest bars dropped at the end of the segment (segments.purge).

vocabularyVocabulary, optional

The vocabulary the graphs were recorded under, which splits a candidate of an intraday family into its stages and says how each lag column a graph may read is computed (Vocabulary.lag_columns; a lag reads the warm-up it needs when that is longer than warmup_bars); without it every graph is a daily graph reading no lag column.

intradayquantlab dataset, optional

The whole-market intraday bars the intraday graphs run on.

storePath, optional

The directory the columns joining the pool or the tried trials are kept in, and join reads; created when missing.

store_keymapping, optional

JSON-ready settings the stored columns depend on besides the segment and the scored frame (the data, the label, the scoring and the warm-up, say); a store written under others is emptied.