a trading strategy based on Elliott Wave Theory - page 279

 
Dear solandr and Yurixx - thanks for your interest!

I'll try to go into more detail about wavelets. I apologize in advance for a long post - I can't make it short, the topic is too rich.

A small digression. When I saw quotation charts for the first time, I was struck by their similarity to curves I had been processing and studying for many years. Of course, they were from another area, and now I'm once again convinced that the nature is the same. At that time wavelets helped a lot, and I just liked them. Now I want to apply them to price series and see what I get and what benefits they may offer for building a good TS.

Let's proceed in order.

1. Why Wavelets?

A wavelet analysis is a special case of the multyscale analysis, which is used with great success for studying non-linear, non-stationary, fractal and quasi-periodic objects. And this is exactly what the financial market is like! And everyone seems to agree with it. It seems to me that wavelets are just what the doctor ordered.

2. Which methods should I use?

There are many different methods of wavelet transform and analysis and at a glance we can count at least ten well-known ones and many more exotic ones. We have to choose something. So far, it seems to me that three old, now classical, methods will do very well here. However, I am not ruling out the idea of trying something new and exotic later.

Here are the three methods:

- discrete wavelet transform (DWT), Mull algorithm;
- continuous wavelet transform (CWT);
- wavelets on interval and lifting algorithm (LA).

I don't want to talk about what a wavelet (wavelet function, scaling function etc.) is here - it would take too much space and time, and it seems to me that many of you here already know it. In principle, there is plenty of literature on this topic on the Internet. The trouble is that you can simply drown in this information. Those who are seriously interested in this question, I can recommend MATLAB's Help for primary acquaintance with wavelets - everything is clear and detailed there. When I read it, I liked it. Although it was in English only then - may be it has been translated now, I don't know. Yes, one more thing... I have several overview articles on the subject in Russian and just a lot of materials in English. If anyone interested, let me know - I'll send it to you by e-mail.
Sorry... I got distracted...
Each of these methods has its own charms and hidden nasties. And I put them together for a reason. As a set, they can compensate for some of each other's shortcomings.
Another important thing. There are a lot of different wavelets (not methods), and, as you know, not all yoghurts are equally useful. The problem of choice is not an easy one, and the result may strongly depend on it. But this is lyric, let's move on...

3. Why the hell do you need all of this in FOREXe?

I like to explain everything in different ways. I can't refrain from doing it here. Let's move on to the methods...

- DWT. A very simple and fast calculation algorithm. We sequentially decompose the series under study into successively shorter and shorter series, thereby coarsening it. At each step we pass the original function through two decomposition filters - a low-pass and a high-pass filter. (The coefficients of these filters are well known for each particular wavelet). Then we simply drop every second value from the sequences obtained. What we got after the first filter is put in one pile - approximations will lie here, what we got after the second one is put in another pile - these are details. Then let's take the last approximation from the first pile and do the same with it. And so on... Until the process finishes - i.e. one value remains. That's all. Of course, I've omitted some minor details here, but they're not essential.
Anyone can say like "and what's so interesting here?"
And here's the thing...
Firstly, DWT has the property of perfect reconstruction.
Simply speaking - did conversion there and then back - you got what you had without losing anything.

Second, the amount of information in DWT coefficients (and their number itself) is exactly the same as in the initial sequence. We haven't lost or added any bits. That is, they are two sides of one medal. You may want to analyze initial price series, or you may want to analyze its wavelet representation. Who likes what.

In principle, all the same can be said about the Fourier transform. But!!! There's a big but! A wavelet function is a compact medium and therefore by looking at the wavelet coefficients, we can always relate the visible features to the original series. Roughly speaking, we don't lose temporal resolution, which is not the case with Fourier. This is fundamental, and it is in the third.

Fourth, we can make all sorts of fun of the wavelet coefficients in details. We can reduce them, zero them out, at all scales, or selectively, and then do the reverse transform. Basically - "Sir, what do you want?" It's a powerful filtering tool.

OK, enough of the generalities...

What exactly have I been doing with price series using DWT?
Two issues in particular have been intensively discussed in this thread - what is a trend and how better to look for it, and approximation of trends by a parabola. I got interested.
I took the EURUSD price series, hourly chart of closing prices (for what period I don't remember, and it's not important), two spline wavelets - one piecewise linear, the other piecewise quadratic. I made a DWT, and then on the same plot I drew approximations for both wavelets (seems to be A6, but you can try others). It is clear, that these will be lines, consisting of straight line segments in the first case and pieces of parabolas (and the whole curve in this case turns out to be piecewise-smooth) in the second. It turns out to be interesting.
Of course one may argue if and how much the line segments correspond to trends and what parabolas correspond to anyway. Sorry, I'll post a picture a bit later (when I've learned how to do that) separately, because I've already written so much here. Having looked at all that, it seemed to me that the two curves obtained with such an ease may be used as a starting approximation for more accurate trend localization and trend forecasting already using statistical methods (ANC and regression, autocorrelation, Hirst, etc. - have been talked about a lot here). It also seemed that combining these two curves it is possible to obtain a good trend indicator, at least not worse than many others. But I'm not sure, I haven't tested it. I have it in my memory and will check it later.

- CWT. For me this is the best of all wavelet methods. There are some results and very promising ideas (as far as I am concerned).
........................
But gentlemen, excuse me, my hands are tired of typing. I have written too much... A chatterbox is a spy tool.
However, when you write and in your head everything is better packaged.

Allow me to postpone further narrative (at least until tomorrow).
In general, if people want, to be continued.


Good luck to all and good trends!

PS. Sorry, that turned out to be a lot of simple theory. If bored, I will correct myself and adjust the level and style of exposition.
 
Colleagues, hi all!

To Andre69, thanks for interesting introductory material on wavelets. I am waiting for the sequel.
I searched my storerooms and found excellently collected and comprehensible material on the theory and practice of wavelet transforms. Anyone interested, feel free to link to it:
https://c.mql5.com/mql4/forum/2007/06/1.zip
https://c.mql5.com/mql4/forum/2007/06/2.zip

P.S. I haven't gone anywhere.
So far I've been working with Kagi strategy according to Pastuhov's version, slowly moving towards my goal. In the meantime, routine work has been done to improve TC. Now I automatically scan more than fifty symbols to choose the most profitable at the moment and use them for trading using MTS. Changing of the leaders among the instruments takes place once a day. Average Cagi H-strategy return is about 10% per month. I will most likely open a real account next week for testing the TS. Interestingly, the analysis of the H+ (!) strategy on the already accumulated tick history, shows its potential applicability to some currency pairs!!! If this fact is verified by testing in the real account, then we can talk about a breakthrough. The matter is that using the H-strategy we have to stick to the principle of "limit the profit and let the loss grow", this in turn leads to the potential possibility of taking a loss of 5-7 H and as a consequence, the need to work with a leverage of not more than 5 with H around 30-50 points. Exploitation of H+ strategy does not contradict to the principle "limit losses and let profits grow", which allows us to use leverage up to 20 and as a consequence, have more profitability compared to the H+ strategy.
Here is a summary of what I have achieved in the reporting period and what I am currently working on.
 
Greetings esteemed assembly!
I think I'll do a status report too :)
I think I've managed to find an invariant - it's nothing but the R/S ratio for the sites selected according to a certain procedure. At least since 1999 on euro minutes the distribution by years is almost constant, although quite wide. I think this should be dealt with more thoroughly. So you may see, I'll start counting Hurst again, after I've circled it. That'll make him happy :)

2 Neutron:
I skimmed over Pastuhov and my preliminary summing up: He doesn't offer any new strategy, we are speaking about well-known breakout or rebound tactics. But he offers a method to determine the suitability of an instrument to play these tactics.
I further conclude the following: Provided he has done it correctly, if liquid instruments suitable for such a game existed, there will now be none left. The illiquid ones can remain, who needs them :). Fortunately, for playing with DC on a small one the liquidity of the instrument doesn't seem to matter. Nevertheless, I did not delve further into its operation.
 
2 Andre69
Thanks, it was an interesting start.
Gentlemen, I'm sorry, my hands are tired of stomping on the keyboard. I've written too much... A chatterbox is a spy's catch phrase. <br / translate="no"> However, when you write and in your head everything is better packed.

Don't worry about the size of your posts. It is in the tradition of this thread to write long, logically connected, scientifically substantiated and well illustrated posts. :-)))
You shouldn't have any doubts about your level either. The audience here, though small, is very diverse. What one has long ago passed, the other hears for the first time. So...
Let you continue without any doubts.
 
I recommend starting with this file (in terms of wavelets):

http://grasn.narod.ru/tutorial.pdf
 
2 grasn
<br / translate="no">

Actually, I wanted Andre69 to share the practical aspects of the application.


That's right, I am not Andre69. Really, why did I get involved? It's all out of thirst for communication.


Sergei, don't exaggerate! The emphasis was not on the name, but on the practical aspects of use.
And you know it very well. :-)

Besides, I wanted to know how to apply wavelets in general, and not how to apply them to forex. I have the object for research and I've selected the tool. I just do not know how to use it. :-))

2 Neutron.
Thanks for the materials, I will have a look and analyze them.
 
to Yurixx

<br / translate="no"> Sergey, don't distort! The emphasis was not on the name, but on the practical aspects of application.
And you know it very well. :-)


I know, it was just a joke. :о)))


And besides I was interested in how to apply wavelets in principle, and not how to apply them for working at Forex. I have the object for research and I've selected the tool. I just do not know how to use it. :-))


And what tool, if not the trade secret? By the way, I recommend to pay attention to skeletons, useful thing, at least I calculate my coefficients on their basis.

PS: I remember about Hearst's calculation based on wavelet analysis, I just can't find materials. But I'm sure they were somewhere. As soon as I find them I will post them.

to Candid


I think I've found an invariant - it's nothing else but R/S ratio for sections selected by a certain procedure. At least since 1999 on euro minutes the distribution by years is almost constant, though rather wide. I think this should be dealt with more thoroughly. So you may see, I'll start counting Hurst again, after I've circled it. That'll make him happy :)


I'm already excited. :о)))) By the way, can't you tell us a bit more about the find?
 
Trying to insert a picture.



Oh, yeah! It worked. But not at the first time.

Blue curve - EURUSD, hourly close prices, taken from the history, for about 1.5 months.
The red curve - approximation of A7 obtained as a result of the wavelet transform using a piecewise linear spline wavelet. Anticipating possible questions - this wavelet in MATLABe is called bior2.2 .
The black curve is the same but the wavelet is different - piecewise-quadratic or bior3.3. Although it is not clearly visible in the picture, this curve consists of parabolic chunks. That's for sure!
 
Are all the approximations made ex post facto? That is, on a story that has already happened?