Random Flow Theory and FOREX - page 2

 

MathCad can be downloaded from here, it's a working version, I don't see any glitches with it http://torrents.ru/forum/viewtopic.php?t=311208

 

Thanks, Prival, for the link. I'll download it at home, as I'm sure they'll tear me apart at work for 700 meg...

I want to explain with an example a thought, which is probably trivial for you.

Let's take a stationary random process with values distributed according toprobability density law f(x) = 1/(1+x^2) * 1/Pi. It is already normalized to one. Such a process can be invented, right?

What is the expected payoff? Well, it's simple - integral with infinite bounds from x*f(x). The trouble is that it converges (to zero) only in symmetric bounds, i.e. in the sense of the principal value, because at infinity the integrand behaves as 1/x. Already expectation of that random variable is an undefined statistic! Naturally and obviously it is a distribution with thick tails, i.e. with sharp jumps of values very far from the central one. Maybe this is the uncertainty Peters is alluding to when he talks about infinite m.o.?

What to say about the variance (integral of x^2*f(x)), which simply equals infinity, regardless of the method of integration...

My point is that the spikes (thick tails) themselves don't say anything about non-stationarity.

P.S. For fans of severity: absence of m.o. seems to indicate non-stationarity of the process. OK, let then degree will be equal not to 2, but 2.5, and from magnitude before exponentiation the modulus is taken. I will not normalize by one, I am lazy. M.o. is now finite and equals zero, but the variance is still infinite!

 

That would confuse us altogether. I propose to stop at the conclusion that the process under study is non-stationary, i.e. R.O. and ACF depend both on the time interval chosen for analysis and on the difference of the arguments. The relationship between the selected analysis time interval and r.o. and ACF most likely cannot be found. But there are some short time segments where the flow may be stationary - visually it is a trend or a flat (it does not matter) - these segments alternate and stationarity is broken at the transition moments.

I think the analysis of ACF will help us to determine the extent of these intervals and the points of stationarity breaking. The main thing is to see how it looks and changes over time. A visual analysis is needed. I can do it in 30 min in Matcad, but in MQL4 it will take me a month at best :(

I will try to show what to do with it on the example of a trailing Kalman filter. The statistical analysis of ACF parameters is very important for its design. I will surely post the example as soon as it is done.

 

This is what you get in a hurry. This is what the simulated process looks like.

The first impression is very similar. For a more accurate simulation, we need the ACF parameters of the process. I am attaching the file. How to filter this process subject to noisy conditions with Kalman filter (has minimum RMS error, since MNA was used for its output), I will post a bit later.

Files:
mod_dvigen.zip  26 kb
 

Here is the mathematics behind this model. I am attaching the Word, as it takes a long time to draw the formulas here.

Files:
 
to Prival


Interesting topic. But MathCAD files are not readable, probably version 14.0 is used. If it is not difficult, you can save it in 13.0/13.1 format and lay it out again (and if it is not difficult at all, lay out in the further in the specified versions). Or use any functions which are absent in 13.0/13.1? A, then put the 14 version does not want.

PS: Although I'm skeptical about such experiments, but still, curious :o)

 
to Prival

Here, I forgot to ask the first few stupid questions:

Существует поток объектов (событий в мире) который непосредственно наблюдению не доступен, наблюдается статистически связанный с ним поток измерений (текущий курс допустим EUR/USD). Из­мерения осуществляются в дискретные моменты времени и возможен пропуск измерений (событие в мире произошло, но курс не изменился).

There is a certain correspondence between observed parameters of objects ... and parameters of observed measurements ...: the area of ... values of parameter ... corresponds to the area of S values of parameter y.

OK, an object is some events in the world. And what are the parameters of an event? Does it mean, for example, that it is an interest rate, or something else of that sort. It's no coincidence that I'm asking this question, because I see that these parameters largely determine the proposed model.

There is a stream of events and a corresponding stream of measurements. Is the correlation between the event and measurement streams required for the theory to be "workable"?

At the output of a measuring device (MT-terminal) along with measurements which are generated by signals from objects () there appear measurements generated by fluctuational noise and different kinds of noises, i.e. false measurements.

I am not a big DSP specialist, but I have more or less an idea of what we are talking about. In this regard, I disagree that what is being measured includes noise. Maybe there is no noise at all? After all, if a bar is clearly out of "sort of signal" range, why should it be considered noise? Within this bar you can perform a deal, buy or sell. But in a signal that, depending on filter's specifications, can pass much lower or higher than the streams of bars, you will be politely declined the deal, because the "real signal" is in the other place. But that's just a philosophy rather than a question, backed up by practice in the nearby "stochastic resonance" thread :о)

 
tried to save in version 13 if it fails to open again tell me
Files:
akf_1.zip  49 kb
 

grasn

I have noted in brackets, in my humble opinion, it is possible to interpret it this way. I don't know and I don't have all the answers. I just tried to imagine that this curve is driven more by fundamental events (interest rates and other things), it is probably impossible to reflect them all on the same scale. Now about the postulate that the current price reflects everything. But remember the mysticism in The Master and Margarita "Annushka spilled the oil..." - will it reflect on the price chart? Probably not, i.e. it may miss an event, which could play an important role later.

Just the theory of flows seems to fit very well, there is a flow of events, and we can observe only a flow of measurements connected somehow with the first flow. Regarding noise, usually if there are measurements, then there are errors and they are related to noise. If there were no noise, life would be much easier. Metrologists would really lose their job :-).

There is a certain amount of noise, if it is noise. Here is a graph. It is the energy which causes the movement of currency. It is also a guess, but it fits together very nicely. If WE look at the graph, it is always moving, like any movement has parameters of velocity and acceleration (first, second derivative, etc.) and there is energy that causes this movement.

It's indented, the envelope is not smooth, perhaps it's a manifestation of noise. But there is one property of this indicator that it is leading, which confirms the energy hypothesis that has been put forward!!!!

Files:
pvr42.mq4  3 kb
 
Prival:

Just the flow theory seems to fit very well, there is a flow of events and we can only observe a flow of measurements connected in some way to the first flow. Regarding noise, usually if there are measurements, there are errors and they are related to noise. If there were no noise, life would be much easier. Metrologists would really lose their job :-).

There is a certain amount of noise, if it is noise. Here is a graph. It is the energy which causes the movement of currency. It is also a guess, but it fits together very nicely. If WE look at the graph, it is always moving, like any movement has parameters of velocity and acceleration (first, second derivative, etc.) and there is energy that causes this movement.

It is rugged, the envelope is not smooth, perhaps it is the manifestation of noise. But there is one property of this indicator it is leading, which confirms the hypothesis about energy!!!


IMHO, the theory of flows offers a fairly clear and logically sound model. Reasonable in the sense that hardly anyone in their right mind would argue that forex is unrelated to the flow of world economic, political, etc. events. Or that the flow of quotes is not a flow of measurements. However, apart from these pros, there are quite a few "buts". Even if there was a system of quantitative estimations of all events, influencing Forex, it would not allow to apply the theory of flows to Forex. Forex is not a linear transducer of incoming signals. Moreover, it is not even a non-linear transducer. And hence, the basic premise of the theory that "there is a certain correspondence between the area of parameter values and the area of measurement values" does not correspond to reality.

Why? Because forex is a system which has its own state. As a result, the same inputs, depending on the current state, can lead to completely different results. This involves the system memory, expectations, etc. You can take the response to nonfarms as an example. The last publication, which was much better than expected, resulted not in a strengthening, but in a steep fall of the dollar.

Therefore, if we are going to model forex, we should model its internal structure besides the incoming flow. From my point of view, it can be divided into two completely different subsystems: speculative, which has (with some limitations) positive feedback, and financial and economic, with negative feedback. They differ greatly from each other also in other parameters: speed and strength of reaction to events, relaxation time, etc. If I was asked to build a theory out of all this, which would be able to predict somehow, I would shoot myself on sight. :-))

By the way, about energy. I too like the use of this concept to analyse movements in forex. But you seem to forget that forex is an open system and its energy cannot be considered constant under any circumstances. If we do not rely on that assumption, but investigate the dynamics of energy changes, it may give interesting results. For example, conclusions about the continuation or termination of a trend, about its strength. But all this is post factum, or at best for the moment. Therefore I think that your statement about the indicator being ahead of the time is too optimistic.

Try taking an ordinary MACD, its histogram (without signal) is very similar to your indicator. I understand that they are different things, but the quality picture they give is close. And no one considers MACD to be leading. In general MACD corresponds to the first derivative. Therefore it (and probably your indicator) is coincidental, which is good compared to the lag of various MAs. But it is not so easy to take advantage of it. :-(