factor_agent.segments.Segments#

class Segments(training, confirmation=None, validation=None, holdout=None, purge_bars=5)[source]#

Bases: object

The training, confirmation, validation and hold-out segments, in that order, and the purge between them.

Parameters:
trainingSegment

The segment the campaign evaluates.

confirmationSegment, optional

The later part of the training data: a candidate is evaluated there too and must hold there to be accepted, and no prompt shows a statistic of it (AdmissionConfig.confirm_t).

validation, holdoutSegment, optional

The segments Acceptance reads; each starts after the one before ends.

purge_barsint

The fewest trading days dropped at the end of a segment.

Methods#

Segments.open_holdout

Record an open of the hold-out in the lock at lock_path and return the lock.

Segments.scored

The first and last dates of segment whose label lies inside it.

Attributes#

Segments.confirmation = None#
Segments.holdout = None#
Segments.purge_bars = 5#
Segments.validation = None#
Segments.training#