Machine learning in trading: theory, models, practice and algo-trading - page 1195

 
Maxim Dmitrievsky:

Let's say we already have a curve like yours - an a priori probability distribution

by Bayesian formula you can update it after each trade, so the center will shift and get a new posterior distribution, i.e. roughly some shift factor that will be updated after each trade. This will slightly adjust the model to the new realities, although the model itself will remain the same.

How to do it right I'm not buying yet, in fact it should be easy, but I've never done it :)

It's not really model training, because we don't use new regularities, but change the interpretation of old ones - predictors in the model, splits in the trees remain the same. Here you need to get information on which regularities were entered - there is an array in catbust, where the regularities of all the sheets are, and, accordingly, make an edit to this array, shifting the regularity (the number for the interpretation of the regularity). The problem is that there will be a lot of leaves per input, and then it is necessary to distribute them proportionally, either to the leaves that were for the input - reducing them, or to those against - increasing them. The question is how many leaves, if there are 100 and there were 1000 deals, then it's possible to take into account statistics for each leaf.

 
Maxim Dmitrievsky:

And if we proceed from the assumption that because of the non-stationarity, it is not the patterns themselves that change, but the model simply shifts and does not give the right signals

We don't have to go under the hood all the time when we want to make a sharp turn, we just need to steer sometimes... and here I don't see much difference between modifying the model and modifying the distribution at the output... you can kill me :)


You still have to go under the hood, because the final answer is the sum of the leaf values and they are not all always used, but only when there are appropriate indicators for it. Therefore, one input can be used for 1 leaf, or it can be 100! So we cannot change the interpretation of the model by shifting the probability for all situations, or rather we can, but it is not logical, because some of the leaves can continue to classify correctly. So either the indicators change leaves, or make a separate additional interpretation of each leaf and sort of shift it depending on combinations with other leaves, but I'm not sure that this is productive.... That's why I prefer small models - if you combine them, it's easier to find the one that's lying and get rid of it.

If there are few leaves, then maybe you can still shift the probability barrier, but if there are a lot of them and use a small part of each input, it makes no sense logically.
 
Maxim Dmitrievsky:

but you just have to steer sometimes...

affine transformation can steer ;), here is an example in KB washttps://www.mql5.com/ru/code/9378

Affine Transform
Affine Transform
  • www.mql5.com
Построение по ценам закрытия. График в окне индикатора тот же, что и ценовой, но временнАя ось "наклонена" под углом трендовой линии Построение линий индикатора по экстремумам баров. Ограничение баров по первой точке трендовой линии Добавлено опциональное ограничение баров индикатора, их число задается параметром MaxBars. Чтобы отключить...
 
Maxim Dmitrievsky:

did a similar thing, but which way to steer then, how to understand? )

no way, only in the tester to check (((

 
Maxim Dmitrievsky:

Maybe a Kalman filter should be added )

google "kalman habrahabr", I read the article there long ago, the most valuable thing is in the comments, the author of the article in pooh.... as far as i understand, it will work like all - only on slowly changing data

PS: there were examples of Kalman in KB - what if? ;)

 
Maxim Dmitrievsky:

Maybe, it's not clear yet... until you try it )

It may be a bad leaf with unstable predictor was found in the correctly predicted combination and the task should be to get rid of this leaf. For example you can identify the combination by 80% of leaves participating in it - a sort of quorum, and if a new leaf with higher weight appears, then filter it out. I even wonder how many combinations there can be with this criterion per 1000 transactions... But I have no idea how to find out.

 
Maxim Dmitrievsky:

The importance chip... Zipf's law (exponential). And also demonstration that variables with larger variance (larger price lag) always have larger importance in tree models. There are a lot of similar features (500 in total), so the graph is not very demonstrative. I'll redo it later.

nice!

Question as an expert on Pythons, give me something in Python for experimenting, I've almost managed to work with Sharp, he has no problems with MT5, C# supports Python as well, I may start working in Python as well ;)

 
Igor Makanu:

Beautiful!

Question as an expert on Pythons, give me something in Python for experiments, I'm almost done with Sharp, it links with MT5 without any problems at all, C# and Python are supposedly supported, then I can move to Python ;)

I'm just learning python... well, what's there to learn, I mean, I haven't used it yet... what exactly do you want? Take an example from this site https://scikit-learn.org/stable/

like Random Forest, for example.

 
Maxim Dmitrievsky:

I'm just learning python... or rather, what is there to learn, I mean, I haven't used the MO models yet... what exactly do you want? take an example from here https://scikit-learn.org/stable/

like Random Forest, for example.

or gradient boosting, ready-made examples.


ok, thanks, i'll look into it tomorrow

 

The graphs here and here and even here were built with a mistake, the values in them are not from zero, so the probability of 0.5 will not be at point 5, but at point 6!

That's the kind of errors that happen when analyzing data and trying to make sense of it, technical errors, so to speak...

Reason: