Target¶
Targets define how forward returns are turned into labels, and samplers select which observations to keep for training.
Labelers¶
signalflow.Target ¶
signalflow.FixedHorizon
dataclass
¶
Bases: Target
Label 1 if close rises by more than threshold after bars bars.
bars accepts a bar count (int, assuming 1-minute data for the default) or a
duration string ("1h") resolved against the dataset interval.
signalflow.TripleBarrier
dataclass
¶
Samplers¶
signalflow.Sampler ¶
Bases: ABC
Selects training points from a Dataset.
sample
abstractmethod
¶
Select training rows from data, returning their index, optional weights,
and a provenance stamp.
signalflow.SampleSet
dataclass
¶
SampleSet(index: DataFrame, weights: Series | None = None, provenance: Provenance = Provenance.FULL)
Result of a sampler: training points + weights + provenance.