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

 
Aleksey Vyazmikin:

And if you find branches with good probability and encode them into one predictor, and then give the tree to grind again, then the tree will think how to make an improvement from the results found (predictors should then like it, since they have a large percentage of correct solutions?

I don't know :) I did not perform such experiments with the tree. But for example all sorts of GBM models work like that - build a tree, then another one which will give you a better result compared to the previous one, then another one, etc.

 
Dr. Trader:

If you branch further, the accuracy on this data will of course increase. But most likely it will decrease on new data.

A certain optimum is reached here, when the tree has already learned something, but there is no overfit yet, and we can expect similar results on new data.

Hmm, but then again, if we compress this tree into a single predictor and keep looking for a solution? Just in fact my predictors are often already some kind of precalculations, classification of values and so on, i.e. if I gave raw data to the tree, the branching would stop earlier and with more error... And based on this branching in the right direction will give results, but this direction is not known, and how to determine it is the question.

 
Dr. Trader:

I don't know :) With the tree I did not engage in such experiments. But for example all kinds of GBM models work like that - they build a tree, then another one which will give improvement compared to the last one, then another one, etc.

Apparently I need to read about these GBM models... but where do they reproduce them (only R?)?

It remains to try filters - even my program gave at least some result there, maybe yours will give something interesting, because all predictors in fact are used in TS as filters.

 

Dr. Trader, I discovered that if we consider the combination ofLevl_first_H1, Levl_High_H1, Levl_Low_H1, Levl_Support_H1, Levl_Close_H1 as a separate whole rule, in general as originally intended, we get an interesting table


From the table it follows:

1. To describe two years of all the bars required a total of 6088 combinations, taking into account the target, and if you do not target, then even less than 4705, ie, one combination in the case of a uniform distribution describes the 86 lines for two years, but I think that there are more frequent combinations and less frequent.

2. The emergence of new unique rules from 2015 to 2016 was 41%, and with target 1 new rules 55%, i.e. 45% of the rules from 2015 remained and continued to operate, which I think is already good.

3. The 2015 and 2016 sample only uses 21% of all possible combinations, so either the rest are extremely unique or under-sampled.

Shouldn't we use these facts somehow when building the tree?

Added:

Then I did this experiment, I added rules of 2016 target 0 and 1 to 2015 target 1 and 0 cleared of duplicates, then I removed the repeating lines, and I got a depressing result that I can't make sense of

It turns out that the false rules on the target "1" - 81%, and on the target "0" - 38%, although I do not know what percentage of lines contains the percentage of error... It is possible that the ratio is different, otherwise new rules would be added exactly as many as they were detected in 2016, which is not the case, which means that the rules are not always satisfied and they just need additional conditions - predictors.

 

Aleksey Vyazmikin:


It follows from the table:

the rules are not always satisfied and they just need additional conditions - predictors.

Aleksey, I propose to make a matured NS-ka at once. We (MQL community) will not get far using only samples and forests.

Obviously, a working NS-strategy requires an analytical platform to make a decision as a trader - whether to enter the market to buy, sell or in general? Is it worth it to close positions to buy, to sell, or at all?

We have fantasized about it HERE with Maxim, please read it and confirm that it makes sense.

 
geratdc_:

Alexey, I propose to do a mature NS-type thing at once. We (MQL community) will not get far using only samples and scaffolding.

Obviously, a working NS-strategy needs an analytical platform to make a decision as a trader - whether to buy or sell in the market, or at all? Is it worth it to close positions to buy, to sell, or at all?

We had a little fantasy on this subject HERE with Maxim, please read it and confirm that it makes sense.

I'm just not sure there's a place for NS in the market...

 

Now pay attention. I decided this week to work on the Dock script and the email networks.

And now the most interesting and what can it be?????

With the maximum number of neurons equal to 200 (the default), the quality of learning was 0.6 as estimated by R-score. However by reducing the maximal number of hidden neurons to 30 I increased it to 0.85 (which is very good). However, I started to get copies of models by weights. I ALWAYS get the same weights. That's where the question comes in. Genetics stubbornly comes to the same minimum function. Is it possible that the data are so unambiguous that in the real numbers we get the same minimum with identical weights. Let's see how it works for weeks...

If to be exact Reshetov's optimizer last week gained a little more than ELMNN network, but to set them much faster, so I'll try to go to them, if will go from Reshetov while I will give up because of too capacious network installation in the work....

 
Aleksey Vyazmikin:

Apparently we need to read about these GBM models... and where do they reproduce them (only R?)?

There should be in Python, too.

Aleksey Vyazmikin:

It remains to try filters - even my program gave at least some result there, maybe yours will give something interesting, because all predictors are essentially used in TS as filters.

I will run the algorithm tonight, and show what has come out tomorrow

Aleksey Vyazmikin:

From the table it follows:

...

Achieving 100% accuracy and hoping that the model will work well is usually impossible in forex, it requires months of choosing predictors and even a target that will fit well together. Usually having reached an accuracy of a couple of tens higher than 50% the model starts to memorize training examples instead of finding logical patterns in them. And accordingly the result on new data will be worse and worse. With your data I got this optimum of about 60% - when the result on both training and test data is about the same, and with a more detailed tree breakdown and higher accuracy the forest is showing increasingly worse results on new data.

 
Mihail Marchukajtes:

With the maximum number of neurons equal to 200 (the default) the quality of learning was 0.6 according to R-score. However, by reducing the maximum number of hidden neurons to 30 I increased the score to 0.85 (which is very good).

Genetics tries to find the right parameters for a limited number of function calls. By narrowing down the number of variants of this parameter (30 instead of 200) genetics can investigate the region from 1 to 30 in more detail. And that's right, if you know the specific limits for finding some model parameter, it's better to give genetics that information right away.


Alternatively:

gaResult <- ga(type="real-valued",
               fitness = GaFitness,
               min = c(1,1,0),
               max = c(NHID_MAX, length(ACTFUN_NAMES), 1000),
               popSize = 500,
               monitor=plot)

Add this line (the green one) to the code, then the geneticist will have 500 individuals in the population instead of the default 50. And she will be able to check 10 times more models (but the script runtime will also increase by 10 times), being able to try as many combinations of model parameters as possible. Even with max 200 neurons I think genetics will also be able to find better result with 0.85, or at least get close to it.

 

Oh, it will be something to read, I forgot what it is. Or rather, I forgot the difference between GBM and XGboost... or didn't know

gbm like you can build any model, xgb like on trees

I know that boosting is a bit better than begging, through which the forest is built. I don't know how it is with overtraining.

https://habr.com/company/ods/blog/327250/

https://datascienceplus.com/gradient-boosting-in-r/

Открытый курс машинного обучения. Тема 10. Градиентный бустинг
Открытый курс машинного обучения. Тема 10. Градиентный бустинг
  • 2018.05.17
  • habr.com
Всем привет! Настало время пополнить наш с вами алгоритмический арсенал. Сегодня мы основательно разберем один из наиболее популярных и применяемых на практике алгоритмов машинного обучения — градиентный бустинг. О том, откуда у бустинга растут корни и что на самом деле творится под капотом алгоритма — в нашем красочном путешествии в мир...
Reason: