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

 
Yuriy Asaulenko:
I.e. sort of momentum. That is how it works.

It is possible to convert back to quotes, here the meaning is that for regression problems not to take bare quotes, because models cannot extrapolate and it is necessary to predict, for example, oscillator readings on non-quotes. or simply increments.

 
Dmitry Fedorchenko:

Tortured for half a year with different predictors, including the increments of anything to anything, the number of predictors. And I used different models. And RF, and SVM, and MLP... I even tried the higher times and went all the way down to M1. The maximum I could achieve with a validation sample is 53% of accuracy; when using the training sample, the accuracy was 100.0%. This is not enough for trading. In order to be in the black, I need at least 57% of accuracy. I don't know if it's my hands or what. Has anyone achieved better results? I am just curious.

I should say 50% of correct predictions is actually not bad for trading. For example, profit/loss ratio = 2/1. It depends on how you calculate it.)
 
Sergey:

Hello.


Some advice, please. How to integrate into metatrader an already prepared model (the model was created in python using xgboost)?

The only option I was able to google is to save the model to a text file in python and then load it into mql using R.

Are there any other options? Do you have any examples of implementation?


Thanks in advance!


I chose Named Pipes as the simplest and most versatile solution. I.e. now mt and python script communicate with each other as a client-server. Sending requests/responses to each other.

 
Maxim Dmitrievsky:

It is possible to convert back to quotes, the point here is not to take bare quotes for regression problems, because models cannot extrapolate and it is necessary to predict, for example, oscillator readings on non-quotes.

I see, but you can't predict anything with Momentum because new data arrival and old data exit have equal weights and that with a lag of -50. That is, we do not know for sure what has changed, from what arose Delta - whether the tail has fallen, or the nose has risen...
 
Maxim Dmitrievsky:

It is possible to convert back to quotations, here the point is not to take bare quotations for regression problems, because models cannot extrapolate and it is necessary to predict, for example, oscillator readings on non-quotations. or simply increments.


+ I just checked the model for adequacy, otherwise SanSanych calls it a rattle.

It is clear that there is an error, but the general form of the increments is preserved. And this is not an error of the model itself but because it is built according to predictors and there is an error of its own.


 
Maxim Dmitrievsky:

+ just checked the model for adequacy, because SanSanych keeps calling it a rattle

It is clear that there is an error of course, but the general view of the increments is preserved. And this error is not the error of the model itself, but because it is built on predictors and there is an error of its own.

Well, it's understandable.

If I'm not an expert in RF, but NS simply quotes the market prices perfectly, it is better to pronormalize them. I mean, maybe in Russia it's not so bad.

I mean that maybe I should tighten something in Russia (expert's opinion)).

 
Yuriy Asaulenko:

Well, it's understandable.

I'm not familiar with RF, but NS is fine just eating quotes, but it is desirable to pronormalize them.


It's very important how to normalize... and NS will also go wrong if it exceeds sampling limits, I sent a link to the article... with RF it's the same in essence, but even worse, it just goes to a constant. It's only relevant for regression tasks, when classifying it doesn't matter.

And it is also very useful to normalize the sample to some sign, for example to remove the last noise... it is much easier to learn it at once and faster. And you can deliberately set a high threshold of normalization and filtering ranges, here a whole branch of strategies may turn out to be separate

 
Maxim Dmitrievsky:

It is very important how to normalize... and NS also fails if it exceeds sampling limits, I sent a link to the article... with RF it is the same in essence but even worse, it just goes to the costant. It's for regression tasks only relevant, in the classification it doesn't matter.

It will not go beyond the range, if you ration intelligently, not stupid).

By the way, Maxim, do you really believe that any stable forecasting in the market is possible?

 
Yuriy Asaulenko:

(It won't go beyond the range if you ration it correctly, not stupidly).

By the way, Maxim, do you really believe that any kind of stable forecasting in the market is even possible?


In certain markets yes, almost certainly... or in certain market phases... it is possible, but not always, you need good filters at least

the way I see it, if you adjust to a certain long term market cycle... which exist a priori. But how to do this automatically is the question.

 
Maxim Dmitrievsky:

in certain markets yes, almost certainly... or in certain market phases... maybe, but not always, you need good filters at least

Filters again. And who will make the filters? And what are these certain phases? How do you detect them? -By algorithmic detection? This is not a tsar's job.

So I guess: left to the DM - let him identify everything himself.

Reason: