I'm going through "Advances in Financial ML" book and I really like the ideas behind Triple Barrier Method and using a flexible horizontal threshold based on volatility. What bothers me is that an author doesn't mention a similar opportunity for the vertical horizon (time). It feels like, we're limiting ourselves by strictly checking the price's value in a specific amount of bars instead of trying to be more flexible about it. The simples idea would be to check the value in x, y and z bars and make some conclusions out of it. Unfortunately I haven't found anything in this direction neither in the book, nor in the articles based on it, nor just in google (i. e. searching "ml flexible horizon", "ml not fixed horizon" did not bring any results), so I'd like to verify if this idea even makes any sense and if it does, I would highly appreciate the keywords, references, articles that would help me go in the right direction


2 Answers 2


The idea for the Triple Barrier Labeling, I believe, is largely based on optimal bet sizing algorithms and classic financial engineering stochastic processes / random walks.

Regarding the optimal bet sizing literature: A fundamental algorithm in capital growth theory is the Kelly Criterion which relies on having the probability of success and the odds of a trade defined upfront. The triple barrier defines the take profit and stop loss levels upfront which is the odds. For example you may choose a TP SL ratio of 2:1 (which are the odds). Next you will need the probability of success which is provided by the meta labeling model which is a binary classifier. With both of those metrics, you will be able to start using Kelly inspired algorithms.

Regarding the vertical barrier. The core idea in the de Prado themed modeling framework is to make your observations as IID as possible. A good way to do this is to move away from trying to predict every single day's returns direction and instead try to predict how stock prices will evolve from a given event. A good example of this is to trade structural breaks (this idea is introduced in chapter 3 via the Symmetric CUSUM Filters).

So a trade event is triggered based on a structural break signal. A structural break indicates that information has entered the system and prices are tending towards a new price equilibrium. As it moves towards the new equilibrium it does so using a random walk / stochastic process (Example: Ornstein–Uhlenbeck Process).

The hope is that we can capture profits by setting TP and SL levels.

Here comes the key to your question regarding the vertical barriers: The vertical barrier is set based on the maximum amount of time it would take for prices to evolve to the new price equilibrium. If you set your duration too wide then new information will enter the system and you will no longer capture the original inefficiency as you intended. Thus it is recommended to set relatively short durations.

Keep in mind that you can have multiple concurrent positions active at any given point in time. I would recommend reducing that number to reduce the number of overlapping samples and thus the low average sample uniqueness (Chapter 4 Sampling Techniques helps to address this concern).


I'm also exploring this idea, specifically for bitcoin trading.

The way I was envisioning it, events could be triggered by the three barriers method with, say, a 10 days horizon, and horizontal barriers based on 10-days volatility.

In the context of the crossing SMA strategy, I guess this would also work better with longer windows for fast and slow moving averages (i.e. 50/200 for example).

The answer above is very clear: short durations should be favoured in the context of Dr. Prado's strategy. However, how short? Is 5 days short enough? 10 days? 1 month? This is what I would like to explore...


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.