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

 
Maxim Dmitrievsky:

Will it be possible to connect the trained neural network to SciLab mt-check?

That's what I'm doing. Of course I'll have to write a DLL.

By the way, the GUI and syntax of SciLab is very close to R.

Right now I'm looking through R neuro-packages and their descriptions. Imho, everything is much more complicated and less transparent than in SciLab. In SciLab, just started yesterday, I can already make a neuron, if only there was a training array.

There in the instances of sine prediction for 3 steps ahead.

It's elementary. The whole code, already trained:

x = 0:0.02:20;
P = sin(x);
T = 2.*sin(x - 0.2);
plot(x,P,x,T);

// Create and train a network to preduct T from P
Delay = 3;
[w,b,y,ee] = ann_ADALINE_predict(P,T,0.2,1,Delay);
figure(); plot(T); plot(y,'r');

w and b are parameters of trained neural network.

 
Maxim Dmitrievsky:

Do you have a good article on R and how to train simple neuronetworks, with examples?

Atacha has a neuron for Renat, but it will work for you as a simple example.

There is a good article by SanSanych Fomenko -https://www.mql5.com/ru/articles/1165
There it shows how to use one of the GUI for R, where you can process the data and train different models. After all the operations in the Log tab you can see the corresponding code, and then you can modify and execute it yourself to learn how to program in R.


I took eurusd and gbpusd m30 bar history from mt5, with its new function of exporting bar history to csv.

Then R trains the neuronc, its weights are saved in the file and these weights should be inserted into mql5 Expert Advisor. I trained neuronics on January 2017, it will not trade well in other periods.
The advisor can be run on eurusd or gbpusd.
It is not very good at trading both eurusd and gbpusd equally well, it probably needs more neurons. And in mql code there is another array of weights commented, they have been trained only for eurusd, respectively, the profit with those weights will be generally cosmic.


I trained neuronics only on eurusd. I used it for 3 months and it was trained only on one of them, in the middle, it clearly shows profit going up.


Случайные леса предсказывают тренды
Случайные леса предсказывают тренды
  • 2014.09.29
  • СанСаныч Фоменко
  • www.mql5.com
В статье описано использование пакета Rattle для автоматического поиска паттернов, способных предсказывать "лонги" и "шорты" для валютных пар рынка Форекс. Статья будет полезна как новичкам, так и опытным трейдерам.
Files:
nnet_example.zip  1926 kb
 
Yuriy Asaulenko:

That's what I'm doing. DLL's will have to be written, of course.

By the way, SciLab GUI and syntax is very close to R.

Right now I'm looking through R neuro-packages and their descriptions. Imho, everything is much more complicated and less transparent than in SciLab. In SciLab, just started yesterday, I can already make a neuron, if only there was a training array.

There in the instances of sine prediction for 3 steps ahead.

It's elementary. The whole code, already trained:

w and b are parameters of trained neuronics.

Yes, cool... I already have R, but... worked with it just a little, if sylab is better for some specific tasks, then maybe I can use it too... but I don't have them yet...

If you go back to the topic of the topic of time series prediction, I finally got to the end of this video, and what do you think... They started with regression analysis, then went on to complicated models like Arima and Garch, and finished with the slogan: screw these models, regression analysis does better :)) By the way, this was a very competent lecture, at least for me it clarified a lot. I also grasped the essence of arima and garcia, and found some confirmation of my intuitive ideas.

"There is no science behind it, in the end we came to the understanding that no science is needed as far as regression methods are concerned."


 
Dr. Trader:

Atacha has a neuron for Renat, but it will work for you as a simple example.

There is a good article by SanSanych Fomenko -https://www.mql5.com/ru/articles/1165
It shows how to use one of the GUI for R, where you can process the data and train different models. After all the operations in the Log tab you can see the corresponding code, and then you can modify and execute it yourself to learn how to program in R.


I took eurusd and gbpusd m30 bar history from mt5, with its new function of exporting bar history to csv.

Then R trains the neuronc, its weights are saved in the file and these weights should be inserted into mql5 Expert Advisor. I trained neuronics on January 2017, it will not trade well in other periods.
The advisor can be run on eurusd or gbpusd.
It is not very good at trading both eurusd and gbpusd equally well, it probably needs more neurons. If I look at the algorithm, I don't know whether it is correct or not.


I trained neuronics only on eurusd. I used it for 3 months and it was trained only on one of them, in the middle, you can clearly see the profit going up.



Cool, thanks :) My model, however, will be better in tests now... but it has not been tested in combat yet

By the way, I read this article by SanSanych, even started to do something, but then I gave up, because I had no time

 
Maxim Dmitrievsky:

Yes, cool... I already have R, though... worked with it just a little bit, if it is better for some specific tasks, then maybe I can use it... but I do not have them yet...

If you go back to the topic of the topic of time series prediction, I finally got to the end of this video, and what do you think... They started with regression analysis, then went on to complicated models like Arima and Garch and ended with the slogan: screw these models, regression analysis does it better :)) By the way, this was a very competent lecture, at least for me it clarified a lot. I have also grasped the essence of arima and garcia, and found confirmation of some of my intuitive ideas.

I don't know where (and in what?) did you see specificity in SciLab? It's just an ordinary network. By the way, there are dozens of different networks out there, for different tasks. An example is the predictive one. There are also classificatory ones.

Regression is great, of course. But if you trade using regression, you will have to build a new model every minute. The lecture says that the longer the forecasting interval, the larger the error, and at longer intervals the forecast will fall apart together with the model. Using methods described in the lecture, real-time rebuilding is impossible.

 
Yuriy Asaulenko:

I do not know where (and in what?) Do you see specificity in SciLab? An ordinary network. By the way, there are dozens of different networks for different tasks. An example is the predictive one. There are classification networks.

Regression is great, of course. But if you trade using regression, you will have to build a new model every minute. The lecture says that the longer the forecasting interval, the larger the error, and at longer intervals, the forecast would fail together with the model. Using methods described in the lecture, real-time rebuilding is impossible.


Not the specifics, but that some things are more convenient and faster to do there than in R, as you wrote
 
Maxim Dmitrievsky:

Not the specifics, but that some things are faster and more convenient to do there than in R, as you wrote

Yes, much more convenient, and faster to implement. But I don't understand what is meant by"if ssilab is better for some specific tasks,... ". Neuronica and Africa neuronica, and the only question is where it is easier, faster and with less cost to get the result.

Zy. I have seen examples of neuronki learning the multiplication table. Say it has 7 x 7, well, it works out to 48.7 or so. I saw an instance of a neuron learning the multiplication table, say, 7 x 7.

 
Yuriy Asaulenko:

Yes, much more convenient, and faster to implement. But I don't understand what is meant by"if ssilab is better for some specific tasks,... ". Neuronica and Africa neuronica, and the only question is where it is easier, faster and with less cost to get the result.

Zy. I have seen examples of neuronki learning the multiplication table. Say it has 7 x 7, well, it turns out somewhere around 48.7. I saw an instance of a neuron learning the multiplication table.


I mean it's more convenient for teaching NS, but in R, for example, there's a dataminer and there's already a way to combine it with MT
 
Maxim Dmitrievsky:

I mean, it's more convenient for teaching NS, but in R there's a dataminer and there's already a way to combine it with MT

SciLab also has Data Mining, including optimization and genetics. Yes, there is no DLL, you have to write it. But there is a C/C++ API, and it's not a problem to connect, but it will take some time, of course. However I have skills to write DLL, but no skills to work with neural networks, and I do not think that everything instantly and by itself will be done.

Although I have both R and SciLab on my computer and I work with both of them, but R is used much less often - R is better suited for its subject area - The R Project for Statistical Computing.

 
Maxim Dmitrievsky:

I mean, it's more convenient for learning NS, but in R, let's say, there's a dataminer and there's already a way to combine it with MT

Why are you picking on networks? They don't work and that's it, it's just a vogue of the last century, probably the first machine learning package that was available.

There are more promising ones: random forests, various ada. And in general caret shell package that has a couple hundred packages, including meshes, and you can do automatic selection between them.


PS.

Serious meshes that probably work here and here. The author is on the forum, cuts through the trade, links to MT4/5 terminals ...


PSPS

How can you seriously compare R to skylab? Some kind of rustic package, not in any rankings...


PSPSPS

And it's not about models at all, it's about datamining. You find predictors that relate to the target variable, you're golden.

Everything else is mind games.

Reason: