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

 
Maxim Dmitrievsky:

I wrote above. The basic model on one half of the pieces, the second correcting model on the other half

Then 5-10 fouls will be enough, or even more.

What you wrote above is clear.

I just don't understand what "5-10 fouls" means.

 
Aleksey Vyazmikin:

What was written above - I understand.

I just don't understand what "5-10 fouls" means.

split dataset into equal parts, let's say 5 pcs.

Combine 1,3,4 and teach the main model on them

combine 2,5. Train the 1st model on them, get results.

Train the 2nd model on these 2.5 using the results of the 1st model and correct unprofitable trades.

Run both models on the whole dataset and on new data and see the results.

 
Aleksey Vyazmikin:

What exactly should I recalculate?

As usual in a portfolio - weights (assets, systems). In your case it could be, for example, 0 - virtual trading on the signal sheet, 1 - real and you can add -1 - signal reversal. Each portfolio corresponds to a vector of sheet length of 0, 1 or -1. Optimization goes, for example, for each last month by profit with penalties for drawdown and portfolio volume.

 
Maxim Dmitrievsky:

divide dataset into equal parts, let's say 5 pcs.

combine 1,3,4 and train the main model on them

combine 2,5. Run the 1st model on them, get results.

Train the 2nd model on these 2.5 using the results of the 1st model and correct unprofitable trades.

Run both models on the whole dataset and new data and see the results

Ah, now I see, I just meant to mix up the sample and teach the second model where the first one was not taught, as if to finish training. I need to think how this can be implemented, but probably in this project is not how, unless to teach the second model in 2019, but then there will be no place to check the results outside of training.

 
Aleksey Nikolayev:

As usual in a portfolio - weights (assets, systems). In your case it could be, for example, 0 - virtual trading on the signal sheet, 1 - real and you can add -1 - signal reversal. Each portfolio corresponds to a vector of sheet length of 0, 1 or -1. Optimization goes, for example, for each last month by profit with penalties for drawdown and portfolio volume.

The question is the frequency of coefficient change, if it is rare, then we lag behind the trend, and if it is frequent, then it will be a horrible adjustment, because the strategy itself allows drawdowns, while the sheet may never give a signal during a quarter, which complicates this approach.

 
Maxim Dmitrievsky:

I think I fixed the tester, it is not peeking anywhere, the results:

EURUSD train+valid, 10k bars


EURUSD test 50k bars

Same model trained on EURUSD but tested on GBPUSD, 50k bars

The same model for USDCHF

It seems to make sense. There is a growth trend so to speak.)

Maybe I didn't take something into account, but on the fly, it's clearly better than the forest of alglib (although I added a lot of other things to improve it)

It runs fast, there are a lot of signals, we can try to create a portfolio. What is the timeframe of the sample?

 
Aleksey Vyazmikin:

It runs fast, there are a lot of signals, you can try to make a portfolio. And what is the time range of the sample?

About a year and a half on 15-minutes.

I have to clean the drawdown and everything else, that's what I'll do

 
Maxim Dmitrievsky:

A year and a half on 15 minutes or so.

It's a trial, I need to clean up the drawdowns and everything else, and that's what I'm going to do.

It seems that there are a lot of deals, as if the spread is not eating everything up... In any case, the potential is there - good luck!

 

I decided to look a little bit at the dynamics of changes in the metric indicators of models during splitting, took 1, 20 and 48 steps (the last processed), got such a summary table.

Indicators from the sample, on which the training was performed.

I find the results interesting, first of all it should be noted that we are working with trees that give only 52%-53% Accuracy, which is very low for the model as a whole.However we are not interested in the whole model, because for trading it is more important to enter in the right direction than to miss an entry and therefore we should be interested primarily in the accuracy of classification and we can see that accuracy of classes "-1" and "1" at a certain moment increased by 4% and 3% compared to the initial version, while "0" lost only 1-2% of accuracy, but at the same time the completeness of classes "-1" and "1" decreases but the completeness of "0" grows together with it.

At this stage, approximately 10% of the root predictors have been removed from the sample - one at each step, but the model has not collapsed and even the individual, important for us, indicators have become better.

Of course, more information about the dynamics can be obtained by processing all 48 splits, perhaps there are gaps in the indicators, or on the contrary, all the indicators are moving in the selected vector. But the main thing, I think, is that trading needs its own method of model creation, the principle of which is not to try to describe the whole structure, but to understand part of the structure better than other parts, and now a good model, in all methods I know, the model is estimated by entropy or logloss, ie for learning the whole model is estimated - knowledge of zero and one, if you like, while we just need to know more about one.

Well, as I showed earlier, the tree by leaves, and my method of selection by leaves, improves the classification accuracy on the training sample, compared to the conventional model, by 20%-25%.

The question is, how can we speed up the process, I'm looking for interested people with whom we can work together to rethink the operation of the R script, which now generates trees, and think about improving and speeding up the methodology.

 
Aleksey Vyazmikin:

I decided to look a little bit at the dynamics of changes in the metric indicators of models during splitting, took 1, 20 and 48 steps (the last processed), got such a summary table.

Indicators from the sample, on which the training was performed.

I find the results interesting, first of all it should be noted that we are working with trees that give only 52%-53% Accuracy, which is very low for the model as a whole.However we are not interested in the whole model, because for trading it is more important to enter in the right direction than to miss an entry and therefore we should be interested primarily in the accuracy of classification and we can see that accuracy of classes "-1" and "1" at a certain moment increased by 4% and 3% compared to the initial version, while "0" lost only 1-2% of accuracy, but at the same time the completeness of classes "-1" and "1" decreases but the completeness of class "0" increases together with it.

At this stage, approximately 10% of the root predictors have been removed from the sample - one at each step, but the model has not collapsed and even the individual, important for us, indicators have become better.

Of course, more information about the dynamics can be obtained by processing all 48 splits, perhaps there are gaps in the indicators, or on the contrary, all the indicators are moving in the selected vector. But the main thing, I think, is that trading needs its own method of model creation, the principle of which is not to try to describe the whole structure, but to understand part of the structure better than other parts, and now a good model, in all methods I know, the model is estimated by entropy or logloss, ie for learning the whole model is estimated - knowledge of zero and one, if you like, while we just need to know more about one.

Well, as I showed earlier, the tree by leaves, and my method of selection by leaves, improves the classification accuracy on the training sample, compared to the conventional model, by 20%-25%.

The question is, how can I speed up the process, I'm looking for interested people with whom I can work together to rethink the operation of the R script that generates trees now, and think about improving and speeding up the methodology.

so you have a logloss of ~1, i.e. the model is in awe of what's going on

You want to find a separate logloss for a separate input? I.e. the amount of information between sheet values and target values?

the "don't do anything" class is obviously unbalanced in relation to the others, which is what I wrote above, that there could be such a problem because of the 3-class model. Other indicators are depressing.

Reason: