Labels¶
Warning
These functions look at future prices by design – they build
supervised-learning targets (y), never features (X). Route
their output through a purged / embargoed split (fynance.data.split)
before training; never feed a label back into a model as an input.
The AFML (Lopez de Prado, Advances in Financial Machine Learning) labeling
stack: path-dependent triple-barrier labels (triple_barrier),
meta-labels for a secondary bet-sizing model (meta_labels),
and overlap-aware sample weights (label_concurrency,
uniqueness_weights).
Triple-barrier labeling¶
|
Path-dependent triple-barrier labels (AFML ch. |
|
Meta-label a primary side prediction against realized outcomes. |
Overlap-aware sample weights¶
|
Number of labels alive at each bar (inclusive |
|
Average-uniqueness sample weights for overlapping labels (AFML ch. |