Discussion of article "Finding seasonal patterns in the forex market using the CatBoost algorithm"

 

New article Finding seasonal patterns in the forex market using the CatBoost algorithm has been published:

The article considers the creation of machine learning models with time filters and discusses the effectiveness of this approach. The human factor can be eliminated now by simply instructing the model to trade at a certain hour of a certain day of the week. Pattern search can be provided by a separate algorithm.

You can set in the function a list of hours to be checked. In my example all 24 hours are set. For the purity of the experiment, I disabled sampling by setting 'min' and 'max' (minimum and maximum horizon of an open position) equal to 15. The 'iterations' variable is responsible for the number of retraining cycles for each hour. A more reliable statistics can be obtained by increasing this parameter. After completing operation, the function will display the following graph:


The X-axis features the ordinal numbers of the hours. The Y-axis represents R^2 scores for each iteration (10 iterations were used, which means model retraining for each hour). As you can see, passes for hours 4, 5 and 6 hours are located more closely, which gives more confidence in the quality of the found pattern. The selection principle is simple — the higher the position and density of the points, the better the model. For example, in the interval of 9-15, the graph shows a large dispersion of points, and the average quality of models drops to 0.6. You can further select the desired hours, retrain the model and view its results in the custom tester.

Author: Maxim Dmitrievsky

 

Well done, Maxim!

To give you an example, here are charts from one of the Wizards who is haircutting cash on Forex. Here they are:

https://smart-lab.ru/blog/666149.php

Very much like this...

So, you are following approximately the same Road to the Grail.

Философия фундаментальных принципов движения цены
Философия фундаментальных принципов движения цены
  • smart-lab.ru
Рынок манит своими возможностями. Мозг большинства трейдеров отказывается мыслить рационально и заставляет как можно быстрее получить дозу адреналина. Какая альтернатива? Проверить формализованную идею на всей доступной истории и, осознав результаты, не торговать никогда. Что же мешает этому? тяга к игре на эфемерных неэффективностях нежелание...
 
Alexander_K2:

Well done, Maxim!

To give you an example, here are charts from one of the Wizards who is haircutting cash in Forex. Here they are:

https://smart-lab.ru/blog/666149.php

Very much like this....

So, you're following more or less the same Grail Road.

Well, it's not clear what it's about.

if you take machine learning in forex, there will always be insufficient data for training. This is a key point that needs to be circumvented.

In my articles, I partially circumvent it by generating new plausible samples, but we can develop the topic.
 
Maxim Dmitrievsky:

Well, it's not clear what it's about.

If you take machine learning in forex, there will always be insufficient data for training. This is a key point that needs to be circumvented.

Well, this Wizard is convinced that forex quotes are an artificial pseudo-random sequence distorted in time. Also works with time filters, if I understood His expressive speeches correctly.
 
Alexander_K2:
Well, this Wizard is convinced that Forex quotes are an artificial pseudo-random sequence distorted in time. Also works with time filters, if I understood his expressive speeches correctly.

It's time to take these wizards by the breast and to find out everything to the last drop :)

 

Read it. Nice syllable.)

The question arose, what filters, except for temporary ones, can be reasonable. Filters on increments, speed of price movement, candlestick or tick patterns are much more random than temporary ones. The assumption that at the same time the price behaves the same way)) than at other times looks logical. What can't be said about other signs.

Even news is released regularly, and this is time bound.

 
Valeriy Yastremskiy:

Read it. Nice syllable:)

The question arose, what filters, except for temporary ones, can be reasonable. Filters on increments, speed of price movement, candlestick or tick patterns are much more random than temporary ones. The assumption that at the same time the price behaves the same way)) than at other times looks logical. What can't be said about other signs.

Even news is released regularly, and this is time bound.

Filters on dispersion of increments work quite well, for a given depth of history. Maybe it makes sense to use entropy filters that estimate the regularity (predictability) of the current series. You could also use news filters, you'd have to download them from somewhere

If there are any other assumptions, they can be easily built in and checked in a couple of lines of code.
 
Maxim Dmitrievsky:

filters by increment dispersion work well for a given depth of history. You can also use news, you have to download it from somewhere

If there are any other assumptions, they can be easily built in and tested.

It is precisely the other assumptions that don't hold up to criticism. The increments should work, but there will be a higher percentage of false positives. If only we put a time filter on them).

With news it is difficult in terms of preparing data, ranking them and generally separating and understanding how to do it.

 
Valeriy Yastremskiy:

The other assumptions don't hold up to criticism. The increments should work, but there will be more false positives. If only we put a time filter on them).

With news, it is difficult in terms of preparing data, ranking them, and generally separating and understanding how to do it.

News is more difficult, yes, that's why I'm still not doing it

 
Maxim, do you take spread into account when testing in your python code? Say, if you put a model into mql5 bot, will it show the same or similar chart in MT5 tester ? I just wonder what expectation in five-digit points these models have. According to the charts there you have if you take the best first one, there 5 pips for 600 trades it turns out 50 pips in five digits for 600 trades and that 0.083 five-digit points per one trade. Or maybe I have misunderstood something ?
 
Evgeniy Ilin:
Maxim, do you take spread into account when testing in your python code? Say, if you put a model into mql5 bot, will it show the same or similar chart in MT5 tester ? I just wonder what expectation in five-digit points these models have. According to the charts there you have if you take the best first one, there 5 pips for 600 trades it turns out 50 pips in five digits for 600 trades and that 0.083 five-digit points per one trade. Or maybe I have misunderstood something ?

spread is taken into account in custom tester, then models are checked in MT5 tester (see the 1st article in the series).

i.e. the logic is easily (relatively) transferred to MT5, almost automatic.