Machine learning in trading: theory, models, practice and algo-trading - page 433
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I remember before such convolution "patterns" seemed to me nothing but a grail, hrenFx even laid out such an indicator 10 years ago, I also made my own version, but... it does not work very well, at least the simple variants with voting convolution of different TFs.
Yes, it is clear that it can not do itself - there are signals to enter the history and there are a number of indicators, which should be classified, but the result of the work of NS will not be a confirmation of the signal, but the generation of the signal. Sorry, maybe this is stupid, but with my poor knowledge in this subject I do not see the reason why it is not possible - after reading your article.
I don't understand about the SZ - usual SZ shows the current extremum...
And again RZ is for signal generation, not for its confirmation - i.e. there is always a signal - to sell when the market is rising, but the NS should confirm it, based on the picture of past variations.
I understand correctly that the advantage of NS is that the signal can be confirmed or rejected by a number of patterns, which are collected on the history, must not contradict each other and are checked when the trading signal?
It's a long explanation, in general ZZ does not fit. I can tell you that for sure. And one more thing:
We must decide what we want to do. Predict or classify. The approaches are absolutely different, but have the same goal....
Take another look at the article. The basic strategy is needed only to determine the point in time, when we analyze the market. That is, the event occurred, we begin the analysis. The event can be anything.
Suppose the machines crossed, the event took place and we started the analysis.
In some way you are right. The National computer itself gives the signals, but taking into account that it works at the time of the signal formation of the basic strategy. It turns out that the NS is a confirmation or refutation of the signal of the underlying strategy. So it's like this ....
I first load the 375000 bar history (for M1 it's a year) into an array, i.e. in RAM (about 30-60 sec), then it takes 30 to 700 ms to pass through it depending on the depth of the pattern.
Once again I say how you need to approach this problem. I think there are fish there....
But we will train the network for one pattern. We will label those patterns that caused market growth as 1, and those that caused market decline as 0.
In my experience, it is better not to do so. If you know the price increments for the next bar, then it is better to use them as a target for the neuronics. After all, the increments are also some information that may be useful in training, compared to only two classes 0 and 1. Even if then the regression predictions still lead to two classes (buy/sell), then it's better to round regression result than to throw out some information at the training stage.
For example, my one more or less working regression model for forex completely breaks down if the model is replaced with a classification model (in R the transition between classification and regression is actually very simple, classification is usually enabled by itself if all targets are rounded to 0 and 1, or if the target type is factor).
I created an indicator that searches for similar patterns in history, here is the current reading at M1 EURUSD. The 10 most similar ones for the year. I slightly reworked the example from the article https://www.mql5.com/ru/articles/197 - there instead of one most similar variant I take N most similar ones and average the answer barwise. For searching for the pattern I use not only one Close price, but the channel where the price was during this period, i.e. Low and High. I raise Low by the value of spread.
As can be seen, this pattern in the history gave both downward and upward movements (gray and dark red lines). The average price movement (white and red lines) is almost zero (slightly wider than the spread), we should not trade with such a prediction, spread, swap and commission will make us lose. Sometimes there are patterns with a good prediction to one side, but on the next bar the prediction may be reversed. If in this case the first position is reversed, then the spread and commission will again make the first trade unprofitable.
The indicator prediction can be compared to a regression NS, but it is easy to make a classifier from the regression. In addition to Low and High you can add any indicators.
If I understood correctly neural networks essentially do the same thing as this averaging indicator, i.e. they look for similar predictor readings (in my case just the price) on history (for example a year) and make average forecast.
Does it make sense to use NS if we can simply walk through the history? What is their advantage?
SAR
Well the fact that the price went in both directions with the same pattern can be considered either a random process or a puppet tricks which tries to break strategies of both pattern finders directly on charts and users of NS in order to make worse predictions, or rather to reduce the forecast to be about zero, as in the figure.
Are the patterns by correlation looked for? if so, empty
The current week of trading my NS (tests), about another month of tests and it will be possible to transfer to normal money. In total: I wrote a simple robust NS in a month.
Are the patterns by correlation searched? if yes, then blank
I do not see other options for comparing 2 price charts. What other options are there...?
This is the main thing I teach my students, a man is principled, not to bend, if he decides, then to death. I had one student (Maxim) who did not have the strength, he lacked character, he was too feminine, he trembled, but you will succeed, you are a man!
By correlation, namely by the difference between the price on each bar of the sought pattern. Let's call it an error on the bar, then sum up the errors for all the bars, sort and find the N best, - the most similar variants, according to the final error.
I do not see other options for comparing 2 price charts. What other options do you have...?
As a minimum, it is necessary to make affine transformations of charts, because patterns go at different slope angles (self-affine structures), and secondly, search on different timeframes. But all this does not help when using correlation - it finds very dissimilar patterns. Convergent NS (computer vision) would be better suited for this purpose.
I wanted to experiment, but I haven't gotten to that yet.
On the subject of prediction, it's quite an interesting topic. So, we have a paternoster, found in the back of history. Exactly the same as it is now. However, the market reaction to this pattern is not unambiguous. There is up and there is down.
Moreover, as can be seen from the charts, the same pattern has been found several times, so we have several possible outcomes. This is where we need to turn on the Classification. But we will train the network for one pattern. We will label those patterns that caused the market growth as 1, we will label those that caused the market decline as 0. When this pattern appears, we will feed the input values at that moment and NS will say whether it is a pattern for growth or for decline of the market.
It is already impossible to divide the obtained N patterns from the history, because they are maximally similar to the desired pattern and have minimal differences between them.
If you want to minimize the differences, you should search not 10, but 2-3 most similar templates, but prediction for 3 patterns will have prediction error = 33%, for 10 patterns 10%, for 100 patterns 1% approximately (I think in error calculation should include error degree of each found pattern from original).
The question of finding the optimal number of templates, by which to build a prediction, can be left to the optimizer.
You cannot divide the N patterns from the history, because they are as similar as possible to the desired pattern and have minimal differences between them.
If you want to minimize the differences, you should look for 2-3 most similar templates, but predicting by 3 will have prediction error = 33%, for 10 patterns 10%, for 100 patterns 1% approximately (I think in error calculation should include error in each pattern found from original).
The question of finding optimal number of templates, by which to build the prediction, can be given to optimizer.