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

 
Aleksey Vyazmikin:

Yes, the basic settings are well given there, especially if you start in python right away. But this is not enough for me.

But it's not enough for me.

 
Maxim Dmitrievsky:

It's true, Anna Veronica is a better narrator, and she also dances.

I do not know, I do not pay attention to it, I watch it in accelerated mode usually.

In any case, there are questions that require an answer from the creators, and how to ask them, I do not know, in terms of where to ask them.

 
Aleksey Vyazmikin:

I do not know, I do not pay attention to it, I look in an accelerated mode usually.

In any case, there are questions that require an answer from the creators, and how to ask them I do not know, in terms of where to ask them.

on githab maybe

 
Maxim Dmitrievsky:

On githab, I guess.

Everybody there is so English-speaking - I don't know where I am :)

 
Aleksey Vyazmikin:

Everyone there is so English-speaking - where do I go :)

it seems that you need to pump R instead of python. Renat wrote that soon there will be a direct link without crutches

i.e. you will be able to launch catbust in 1 line from mt5

 
Maxim Dmitrievsky:

it looks like we need to pump R instead of python, Renat wrote that soon there will be a direct link without crutches

i.e. you will be able to run catbust in one line from mt5

In general, I was not able to run catbust under R.... Maybe my hands are not good enough. If it will be bundle, it's good, but it will not allow to run optimization and the speed of response is also questionable...

 

Completed a study of the effect of splitting the sample into training and validation samples (the one by the indicators of which the training stops and model selection takes place).

I used a sample from 2014 to 2018, every 20% equals about 1 year. The methodology is as follows, took the total sample and began to increase the validation sample by 10 percent, reducing the training sample by the same 10 percent, there were 9 sets of samples. For each sample a model was created with Seed from 1 to 200, i.e. a total of 200 models per sample, totaling 1800 models.

The models were tested on a fixed sample - 2018, which was not involved in the training.

The instrument is a glue of the futures contract Si.

The table below shows the indicators that allow to judge the results of models - the left part is financial indicators, as we are used to see in the terminal, and the right part is indicators on the balance of error (I call it so - I do not know how to call it correctly, if anyone uses it at all), that is, if the target 1 was determined correctly, then +1, if not correctly, then -1, it allows to evaluate exactly the quality of classification over the entire sample. In light green color I marked the best indicators according to the average value.

Below are the metric indicators of the models

According to the results, we can clearly see that the training for 2014 (80%-90%) gave the worst results, and the failure from 70% is significant, and this rather indicates not that the sample size was small, but that the patterns of 2014 almost never occur, ie, the market has changed significantly, and therefore theoretically this period can be removed from the training at all.

Now I use the following criterion for selection of models in the test (exam) sample

if(t==2)if (FinRez>1000 && DD_Balans_Proc_DMM<30 && Proc_Max_Balans> 70 && Proc_Min_Balans<30 && Pribolnost_Balans> 10 && ProfitFaktor_Balans>1.2)Filter_03=1;

Here is the data on the number of models satisfying this criterion

Below is a table showing the number of models selected, taking into account parameters of all three samples, by the following criteria

if(t==0)if (FinRez>10000 && DD_Balans_Proc_DMM<30 && Proc_Max_Balans> 70 && Proc_Min_Balans<30 && Pribolnost_Balans> 10 && ProfitFaktor_Balans>1.2)Filter_01=1;
if(t==1)if (FinRez>3000 && DD_Balans_Proc_DMM<30 && Proc_Max_Balans> 70 && Proc_Min_Balans<30 && Pribolnost_Balans> 10 && ProfitFaktor_Balans>1.2)Filter_02=1;
if(t==2)if (FinRez>1000 && DD_Balans_Proc_DMM<30 && Proc_Max_Balans> 70 && Proc_Min_Balans<30 && Pribolnost_Balans> 10 && ProfitFaktor_Balans>1.2)Filter_03=1;


Here we must take into account that the criterion of profit is fixed, while the time of reaching this profit is different for different sets (probably, we should lower the figures for the sake of comparison to be correct).

And what conclusion can be drawn? It seems that the optimal volume is 60%-70% of the validation sample, i.e. training should take place on a smaller sample than the model validation. But it is impossible not to emphasize the breakdown by 30%, there as well the results by all indicators are not bad, and failures quite next to 40% and 50%. I do not even know what affects the volume of the sample or its content more, and how to set it ...

And what is your opinion about the results of this experiment, maybe I am misinterpreting the results? Any ideas for a change in methodology or any other suggestions for resolving this issue of the proportion of training and selection samples?

Added:

Regarding the averages at 80%-90%, there are a lot of zeros (there were no input signals at all from the models) and because of this there is distortion, this can be seen in the StDV_K_Korrekt_Balans indicator

Histogram for StDV_K_Korrekt_Balans 90%


histogram for StDV_K_Korrekt_Balans 70%


Histogram for StDV_K_Korrekt_Balans 30%

And this is how the histograms look like (the histograms are clickable, so as not to annoyingly flicker)

30%


40%


50%


60%

 

And I also note that training always goes on data that are older than those on which the control learning - perhaps they should be switched places, and see what happens...

Attention is drawn to the average small Recall - perhaps it is necessary to train models further, and not to stop training in the absence of improvement after 100 trees, or stable patterns are not as many as we would like.

It is necessary to see how much the models overlap, with low Recall there is a chance that there will be models with little correlation, but equally profitable, then they are ideal for combining into one pool.

 
Aleksey Vyazmikin:
And I'll also note that training always goes on data that are older than those on which the control of training - perhaps they should be switched places, and see what happens...

All that was above, cool and very informative, but here is the "control training", what does it mean???

That is, for example, you train the system on a sample of 2014 data, and then you give a sample for 2015 and want to see the probability of patterns? If so, then you don't need to swap anything, everything is correct. Only I don't see the problem here that the control gives some other results than expected, it will always be so.

 

If we proceed from practical application of MO in your case, we should proceed, in my opinion, from the following.

Since it is simply not realistic to get a 100% probability of the true outcome, then go by a simple method, for example, the ratio of true to false results, if it is in the region of 50/50, then again we must understand what profits you get with these results, if 50% of the profit is an average of 100 points and the remaining 50% losses are on average 50 points, then I think your system is already suitable for practical use.

Reason: