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

 
SanSanych Fomenko:

For the appetizer.

A run of the same Expert Advisor with the same settings as above, but with a longer time interval.


This is the whole value of all these nice pictures.


The picture should prove the idea whose meaning is ONLY about the future behavior of the Expert Advisor.

Sanych, don't jump to conclusions, you've screwed something up.

The number of transactions over a longer period of time is less

 
Yuriy Asaulenko:

That's why I use my tester, not the MT tester - for some reason it has a lot of grails. In your tester, at least you know reliably - what and how it does. Yes, and information from the test can get much more and any, and easier.

In my opinion, it's not very good to write such things on MT forum, considering that the backtester in MT is one of the main problems, that binds people to mql and the entire terminal.

 
Renat Akhtyamov:

Sanych, don't jump to conclusions, you messed up something.

The number of deals for a longer period of time is less

I have run it twice more: the graph is similar, but the numbers are a bit different.

 
SanSanych Fomenko:

I ran it two more times: the graph is similar, but the numbers are slightly different.

Conclusion

Making a decision to buy or sell at random will not provide a stable profit

 

Found a problem with the classification:
For example, if 2 columns = 0, trying to do a softmax of them gives random classes:
m=matrix(0,ncol=2,nrow=100)
max.col(m)
[1] 1 2 2 2 2 1 2 1 2 2 2 2 1 1 1 2 1 1 2 2 1 2 1 1 2 2 2 2 1 1 2 2 1 2 2 1 2 1 1 1 1 2 1 2 1 1 1 2 1 2 1 1 2
[54] 2 2 1 2 2 1 1 2 2 2 2 1 1 1 1 1 2 2 2 2 2 1 2 2 2 2 2 2 2 1 2 2 2 1 2 1 2 2 2 1 1 1 2 1 2 1 1
It's in R.

I stumbled upon it by accident when it turned out that the prediction results all = 0.

It is better to do so (in case the 1st column means "expectation" and not trade command)

max.col(m,ties.method = "first") # by default ties.method = "random"

[1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

>

Better yet, if the classes have equal value, then refuse to classify. And just in case, it's better to do it line by line.

 
elibrarius:

Found a problem with the classification:
For example if 2 columns = 0, trying to do a softmax of them gives random classes:
m=matrix(0,ncol=2,nrow=100)
max.col(m)
[1] 1 2 2 2 2 1 2 1 2 2 2 2 1 1 1 2 1 1 2 2 1 2 1 1 2 2 2 2 1 1 2 2 1 2 2 1 2 1 1 1 1 2 1 2 1 1 1 2 1 2 1 1 2
[54] 2 2 1 2 2 1 1 2 2 2 2 1 1 1 1 1 2 2 2 2 2 1 2 2 2 2 2 2 2 1 2 2 2 1 2 1 2 2 2 1 1 1 2 1 2 1 1
It's in R.

I stumbled upon it by accident when it turned out that the prediction results all = 0.

It is better to do so (in case the 1st column means "expectation" and not trade command)

max.col(m,ties.method = "first") # by default ties.method = "random"

[1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

>

Better yet, if the classes have equal value, then refuse to classify. And just in case it is better to do it line by line.

Afternoon

The problem may not appear if the data are properly prepared. When and in what calculations did you have this problem? I wonder. Or it is an artificially created condition?

Good luck

 
Vladimir Perervenko:

Good afternoon

The problem cannot appear if the data are prepared correctly. When and in what calculations did you have this problem? I wonder. Or is it an artificially created condition?

Good luck

I tried different predictors and came across that NS did not learn anything and gave all zeros at the output. And the predictions were not zero due to randomness during the conversion.
As SanSanych said: garbage in input = garbage out. I also added zeros, which then got canceled.
Well, I made a correction to keep zeros as zeros, for similar cases in the future.
 
elibrarius:
Predictors are different, so I came across that the NS did not learn anything and gave all zeros at the output. And predictions due to randomness in the conversion turned out to be non-zero.
As SanSanych said: garbage in input = garbage out. I also added zeros, which then got canceled.
Well, I made a correction to keep zeros as zeros, for similar cases in the future.

I see. Good luck

 

Questions from a newbie. Please advise on methods of applying machine learning. For example, a trader has found a certain pattern in the market. Suppose it is a GP (head-shoulders) pattern. Variants:

  1. Traded hands and has a history of profitable and losing trades.
  2. Found this pattern on the history on the charts and can mark the entry/exit points.
Can I use this history/statistics for machine learning in variants 1 and 2? How can this be done? Approximately how many trades are needed for training (minimum/maximum)? Will the algorithm recognize patterns only on the TF it is trained on? Will the MO algorithm "understand" that the trader's deals were made on the GP pattern, and if it "understands" it how? How many bars deep into the history before the position opening will the MO analyze?

 
Grigori.S.B:

Questions from a newbie. Please advise on methods of applying machine learning. For example, a trader has found a certain pattern in the market. Suppose it is a GP (head-shoulders) pattern. Variants:

  1. Traded hands and has a history of profitable and losing trades.
  2. Found this pattern on the history on the charts and can mark the entry/exit points.
Can I use this history/statistics for machine learning in variants 1 and 2? How can this be done? Approximately how many trades are needed for training (minimum/maximum)? Will the algorithm recognize patterns only on the TF it is trained on? Will the MO algorithm "understand" that the trader's deals were made on the GP pattern, and if it "understands" it how? How many bars deep into the history before the position opening will the MO analyze?

Machine learning is built on signs (patterns/features) that will distinguish the event. Accordingly, you need to specify what you should look at, and the MO algorithm will try to find some regularities in what is shown and to work out the rules of behavior. All the answers to the other questions follow from here. And accordingly, the more observations, the more accurate the rules will be on a longer period of history.

Reason: