quantlab.label.config.ForwardConfig#
- class quantlab.label.config.ForwardConfig(*, factor, span, delay=1, name=None)[source]#
Bases:
FrozenConfigConfig of a
Forwardlabel: the factor it shifts and by how much.The label at bar t is
factorat bar t +delay+span. AForwardowns no store, so the config has no path or warm-up of its own; the wrapped factor keeps its config.factoris a component field, soto_dict()nests the factor’s config dict under it andForward.from_configrebuilds it.Examples
With
factora factor built earlier:>>> cfg = ForwardConfig(factor=factor, span=5) >>> cfg.span, cfg.delay (5, 1)
- delay = 1#
Bars between the bar a signal forms on and the first bar the label counts; 1 because a signal at t fills at t+1’s open.
- factor#
The factor shifted forward to make the label.
- name = None#
Dotted import path of the label class; filled by the config setter.
- span#
Bars the label accumulates over, such as the n bars of an n-bar forward return.