202601140934
Status: #reference
Tags: Financial Machine Learning, Labeling
State: #nascient

Triple-Barrier Labeling Method

It is a labeling method proposed in Advances in Financial Machine Learning by Prado which claims to solve one main issue, give a price-path dependent alternative to the standard Fixed-Time Horizon Method commonly used in finance that essentially just checks for the return after a given time horizon h, and based on whether we are above, below or in the ball of a given threshold τ and based on that gives a sign {1,0,1}.

So why does this suck? Well, he brings forth two main arguments. The first issue is the fixed threshold which is a folly in markets when using Time Bars since they display strong heteroscedasticity. You can fix this first issue by using Volume Imbalance Bars (VIBs), Dollar Imbalance Bars (DIBs) or the vanilla version which don't use imbalances, still another issue remain.

Price path. The Fixed-Time Horizon Method doesn't account for the price path taken during the horizon h, which is extremely unrealistic as in real life, you'd either get stopped out by the exchange, stopped out by a margin call, stopped out by your stop-loss or pull the trigger yourself because you lack the cojones to ride the wave. This means, the returns are wholly unrealistic and couldn't be reproduced.

This is where the triple-barrier labeling method comes in. It sets a dynamic stop-loss and take-profit level based on a dynamic standard variation estimated as an ema of the standard deviation over a given period.

Then, the method is simple, you box the price from time t by those two barriers, plus a third vertical barrier at t+h which represents the expiration of the trade. Whichever one the price hits first represents the sign for that trade. Thus, if we hit the take-profit we have a 1, if we hit the stop-loss, we have 1 and if we hit h, Prado himself usually prefers assigning the sign as whether or not if we closed the position at this point we'd take a profit or a loss, but alternatively we can set it as 0.

He reckons that there are times where 0 is useful, so YMMV.

File Folder Last Modified