a trading strategy based on Elliott Wave Theory - page 215

 
Yurixx 11.01.07 19:09
There is a time series of prices X[i], where i=1,...,N
There is a sample of this series Y[k], where k=i1,i2,...,iM
There are two indicators BR[i] (strength of bears) and BL[i] (strength of bulls) defined on the whole number series.
Correspondingly, there are sets of values for each of them on the sample Y[k].

The hypothesis to check and if it is confirmed, determine the statistical validity:
The probability of the price direction from the point Y[k] is determined by the pair of values BR[i] and BL[i].

How it is determined is the next question. Maybe a simple condition BR[i]>BL[i] is enough,
or maybe not. But you can deal with it later.

Or maybe you don't have to deal with it at all ? Maybe on the plane of values (BR,BL) it's enough to
to find regions where statistical superiority of one direction of motion over the other is not less than
a given level ?

So, the solution of this problem seems to me as follows:
Let's plot points in coordinates a*BL and BR corresponding to indicator readings on historical data. Coefficient a allows us to put the points of "equilibrium" of the market on the diagonal of the square, which is the median of the angle of the experimental data points. We estimate the value of the opening of the angle using the known methods, thus defining the spheres of bulls and bears influence. It makes sense to distinguish the areas of "noise" and "credibility", the first one being determined by the stat-insignificant events and the second one - by the stat-insignificant events. Thus, on the phase plane we can distinguish two areas (see fig.) where it is advisable to buy or sell the asset. A specific analytical expression for making a decision can be obtained knowing analytical equations for the boundaries of the corresponding areas.
It is thought as follows.
 
Yurixx 11.01.07 19:09

2 North Wind, Neutron
Dear Experts in Mathematical Statistics, if you're not a bore, please help me correctly set the problem.

I have a time series X[i] where i=1,...,N
There is a sample of that series Y[k] where k=i1,i2,...,iM
There are two indicators BR[i] (strength of bears) and BL[i] (strength of bulls) defined on the whole numerical series.
Correspondingly, there are sets of values for each of them on the sample Y[k].

The hypothesis to be tested and, if it is confirmed, to determine the statistical validity:
The probability of the direction of price movement from the point Y[k] is determined by the pair of values BR[i] and BL[i].

How it is determined is the next question. Maybe a simple condition BR[i]>BL[i] might be enough,
but maybe not. But you can deal with it later.

Or maybe there is no need to handle it at all? Maybe on the plane of values (BR,BL) it is enough to
to identify regions where statistical superiority of one direction of motion over another is not less than
a given level ?

Not quite sure what is needed, but I think Neutron has already written.
In general, you have several combinations of parameters BR[i] and BL[i] and their respective probabilities. Most likely you will not be able to get any more or less significant statistical dependence in the form of regression equation. One of the common methods one tries to use is cluster analysis and the like. It's a very broad topic and it's impossible to deal with it quickly. As an express variant I can suggest to use what is described in Bulashev's book mentioned here more than once - Statistics for Traders, starting from chapter 13 - Mechanical Trading Systems. You can simply think of your problem as an mtz with a fixed single win and loss and use the methods outlined in the chapter.

solandr 11.01.07 21:42
Simply converting one distribution into another. In principle, this is a fairly well-known thing, and the methods are not new. In the same Excel, you can convert uniformly distributed data to normally distributed data, etc. by standard means.

I can say that for me the fact of existence of transformation of one distribution into another is almost a discovery! I could not find any explanations in books. Perhaps I searched badly or simply looked in the wrong books? I suspect that it may have something to do with statistical radio engineering, with some sort of filtering of the input signal (data) by a bandpass filter. And here how it could be applied to our quotations you could result any references to the required information since it is rather known thing, but of which I have no idea and consequently have no idea where to look for information about it? Thanks in advance!

About eksel also interesting to know how it is done - conversion of uniform distribution to normal?

PS: http://www.oglibrary.ru/data/demo/3843/38430429.html Here, judging by the description there is something about what is required. But it requires some kind of payment to view the book itself. Can't something be found in the public domain (it's not about money at all, it's about expediency)? Maybe that's not what's required at all???

I do not have relevant literature at hand, but I can tell you that this kind of problem, transformation of distribution functions is often considered in sections related to generation of pseudorandom numbers. But there are of course other applications as well. In Excel, I used the function =NORMINV(rand(),mean, standard deviation) to convert a uniform to a normal distribution. There are other similar functions, with other distributions.

But I would like to warn you, this task is quite specific and it is not easy to implement it in trading, i.e. its applicability is very limited. Personally I used it as a research tool. Besides, normally distributed from real quotes can be obtained easier, using moving average (centered), just subtract values from MA. The residuals should have a normal distribution.

Neutron 12.01.07 07:17
to North Wind.
If you have materials on Shiryaev and Pastukhov dissertations, I'd be grateful if you could share them, or provide links to them.

Shiryaev's lecture on life in general and Pastukhov's thesis http://www.investo.ru/forum/viewtopic.php?t=127600, somewhere at the end of the thread Bandarlog has attached a text with pictures.
Pastukhov's dissertation http://forex.kbpauk.ru/showflat.php/Cat/0/Number/142956/an/0/page/0#Post142956 and the article there.
There is also some material on the forums, but you will have to search for it yourself.
 
2 Neutron

Thanks, got the general outline, but I'll deal with the details and ask silly questions. :-)

I have an article by Pastukhov "On Certain Probability-Statistical Methods in Engineering Analysis". Published in the journal "Probability Theory and its Applications" vol. 49, issue 2, 2004. (260 Kb)
There is also his dissertation under the same title from the collection of RGB (4 Mb). I can send it to you by e-mail if you give it to me.

There is also Shiryaev's paper "Mathematical Formalization of Japanese Candlesticks".

What program do you use to make your pictures? I do not have enough of Exel tables, I need visualization. And your pictures don't seem to be from Excel.

2 Northwind

Also much appreciated. Bulashev is available, but haven't looked into it in a while. I'll have a look.
 
<br/ translate="no"> Neutron

Sergey, I'm shocked by what I saw in the pictures you cited! If it's not a bug in the code (when a "future bar" is handled in a hidden way), then you have solved the main trading problem.
You have analyzed the hour bars, consequently, the forecasting horizon of your TS is 200-300 hours (see figure), at this lag the instrument volatility is 150-250 pips on average. The error of forecasting does not exceed 20%. From this height, you don't care about spreads, slippages, and, perhaps, the brokerage company itself.
I think you have solved all your problems :-)
Or maybe I do not understand something in these pictures and you are making a one-hour forecast for each current bar? Well, then the forecast error exceeds 100% and it is not good for anything :-(
Come on, give us a more detailed explanation of the algorithm (within the limits of decency of course).


Hi all! Sergei, no, this is not a bug in the code and the future bar is not handled in any way. It would be stupid to cheat yourself and dishonest to cheat others :o). The possibility of this bug is completely ruled out by the following: In MathCAD I have:

1. The M60 array, which includes all the EURUSD history pumped out of MT.
2. I randomly assign a bar symbolizing the current bar and denoted in the system as CB (Current Bar.
3. The system pumps data to array DATA from the beginning of history to CB.
3. Then the algorithm of searching the trend finds the starting bar - SB (Start Bar) on DATA
4. I create a sample of Y(), in which I load data from SB to CB. Further all the work is done with this sample only.
All these conversions are done to exclude similar errors and increase processing speed ("twisting" a huge array of historical data is somehow not reasonable, in my opinion, MathCAD is a good system, but still not a professional database)

What you see on pictures is array FACT, which includes data from start bar to the accepted current bar and also a similarly long piece to "future" (very seldom system makes a forecast more than 2*(CB-SB)). In the CANAL array there are only estimated points of the future price.

Now for the main point! I didn't set the task to calculate the future price by points - I'm not able to do it and I don't even know how. My task was as follows:
1. To find the reliable channel, along which the price will develop from the current bar (from "today")
2. Find the reversal zone of this channel (the minimum task)
3. Find the channel/channels where the price will develop in the future after it passes the turning point (maximum task)

Accordingly, the points themselves are not the final goal, but only a "semi-finished product". On their basis, the channels will be built, the RMS of these channels and the turning points will be estimated. I am not going to run a forecast on every bar. In this example, the forecast is on average 420 samples (let me remind you that the number of bars for the forecast is determined not by me but by the system and can be 30, 100 or 3000 samples), which is about two weeks for a clock. All you need to do is to make sure the forecast is correct, then wait 2 weeks and control the process quality (using North Wind's terminology :o)

Three pictures in 5 samples was made just for possibility demonstration that if "similar structure" exists, the forecast won't lie in 5, 10, 15 ... samples. It is not "lying" that should be evaluated by specific points. They will always be slightly different, but the channels - they practically do not change after calculation. I could have made more screenshots, but I thought it would be enough. Especially as there will be more pictures.

Sad as it is, I haven't solved my "problem" yet. I can't tell if there is a "similar structure" to future movements in a particular sample. As I wrote earlier, the forecast is also able to lie, and badly, if there is no "correct fractal" in the story, I'm being honest about that.

And it is very important for me to solve the problem of determining the trend correctly, because a lot depends on it...

PS: I will write more about the algorithm later.
 
2 Yurixx 12.01.07 13:31
There is also a dissertation by the same name from the collection of the Russian State Library (4 Mb). I can email it to you if you give it to me.
There is also Shiryaev's paper "Mathematical Formalisation of Japanese Candlesticks".

What program do you use to make your pictures? I do not have enough of Exel tables, I need visualization. I don't think your drawings are from Excel.

Thank you Yuri, I have already downloaded all the articles. I work and draw pictures in Mathcad, and I recommend it to you.

P.S. I feel good. I started reading Pastukhov's dissertation.
Join us, there will be something to talk about!
 
P.S. I feel good-o-o-o... I've started reading Pastukhov's dissertation. <br / translate="no"> Join in.

Can't. Urgently searching for Mathcad online. But I'm jealous.
 
Also started reading, great stuff! Thanks :o)


P.S. Мне хорошо-о-о... я начал читать диссер Пастухова.
Присоединяйтесь.

Can't. Urgently searching for Mathcad on the net. But I'm jealous.


Yuri, I advised you to switch to MathCAD long ago, preferably to 13. It's too fast... :o)
 
http://fileswehave.33.com1.ru/soft/2006.02/MathSoft_MathCAD_v13-0-Enterprise-Edition-ISO.zip

I won't download it myself until this evening, so I can't judge whether it's cracked or not.
 
Yuri, I've long advised you to switch to MathCAD, preferably to 13. It works very fast... :o)


Sergey, you have to back up advice with practical help. Admit it, where do you download it?
And 13, because one knowledgeable person recommended it to me. :-))

At that time, long ago, there was no need for it. And now it has arisen. That's life.

2 Jhonny
Glanced at the link, you can download it from there too. If you do it before me, let me know the details.
 
Юрий, а я давно Вам советовал перейти на MathCAD, причем желательно на 13. Уж больно быстро он работает… :о)


Sergei, you have to back up your advice with practical help. Where do you download it from?
And exactly 13. A knowledgeable person recommended it to me. :-))

At that time, long ago, there was no need. And now it has arisen. Such is life.



Criticism accepted :-). I can give you my distribution somehow. But I'll be able to organize it only at weekend. If, there is no site where you can lay out a large volume, let me know, or in the evening or tomorrow morning will definitely lay out. Unless, of course, the link Jhonny will not work, I mean, the crack will not crack.