For an event at with position side , widths and a horizon , the triple-barrier label settles at the first bar at which the position’s cumulative log return reaches (profit-taking), (stop-loss), or (the vertical barrier); it is the sign of the position’s return at . The widths are usually scaled by the volatility known at : (López de Prado, 2018).
firm.mlsynth.series, seed 1, through firm.labeling.triple_barrier.