factor_agent.segments.Segments.scored#

Segments.scored(segment, calendar, lookahead)[source]#

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

Parameters:
segmentSegment

The segment.

calendarpd.DatetimeIndex

The trading days, covering the segment.

lookaheadint

Bars past t the label at t reads (lookahead_bars()).

Raises:
ValueError

If the purge leaves the segment no date.