quantlab.label.forward#

A label made by shifting a factor forward in time.

A label is the value a model learns to predict. Forward turns any factor into one: the label at bar t is the factor at bar t + delay + span, where span is how many bars the label accumulates over and delay how many bars pass before the first of them (one, because a signal formed at bar t fills at bar t+1’s open). delay + span is the label’s lookahead: the label at t is known only once bar t + lookahead has closed.

The wrapped factor must use only bars up to t for its value at t; Forward relies on that and cannot check it.

Classes

Forward

A factor shifted delay + span bars earlier, used as a label.