Random Flow Theory and FOREX - page 39

 
Mathemat >> :

There's nothing easier when you use MS XL.

I don't get it, it's Excel.

 

Neutron

Вот и я тоже, всё время задаю такие вопросы Prival-у: ну с какого он решил, что законы рынка укладываются в систему ньютоновских дифференциальных уравнений? С чего это вдруг, цена должна быть похожа на самолёт на экране радара и двигаться как массивное тело под действием вынуждающей силы?! Пусть он даст обоснование своего подхода... До сих пор не дал. Просто, делает вид, что не замечает (не понимает) и только приводит красивые картинки и вопрошает о Матрице.

I thought I had answered.

Here is the simplest model of motion, note that there is no mass in the equations, it doesn't matter what moves there (even a fly, even a currency). The equations have only the first and second derivatives + noise

In words, the derivative of velocity equals acceleration (throw a stone at me if not )). But with the second equation it's a bit more complicated, if you remove

then it will be Wiener noise (and I think you will agree that it is). And addition of shows that there is correlation time, that the market may move in a certain direction for some time.

For more details on how this model is derived you can read Singer's "Real time performance evaluation and selection of tracking filters for tactical weapon systems". The article is attached.

There are better models that take into account controllability + this model can easily be extended to multivolume. Derived from the first currency, from the second, etc., accounting for their mutual correlation.

There is a pitfall here if alpha was a constant, I would have eaten all this forex by now -) but there are areas where alpha is almost a constant. Its value can be calculated using the ACF.

If something is not clarified, ask, I will try to answer. (Only tomorrow I am leaving for a month in a sanatorium, I will not be on the forum).

I already have almost everything, I can't do trapshaping, I can't change arrays dimension in MQL, or at least I can't pass arrays from functions.

Files:
zp_72_01.rar  174 kb
 

Eh, too bad you're leaving - I'm going to get gutted by anti-managers :)


There shouldn't be a problem with transposition if you do it right. The transpose operation stores the number of elements. Hence, if all matrix operations operate on linear arrays rather than two-dimensional ones, all will be fine with transposition. And dynamic linear arrays are well supported in MQL4, unlike multidimensional ones.


P.S. Buy/rent a laptop and 3G modem and you'll hang out on the forum without leaving the sanatorium :)

 

May I go slowly, in view of my innate obtuseness?

So.

The description of the process by differential equations is based on the requirement of differentiability of functional dependences (as many multiples as may be required). In our case, you have to at least take the second derivative of the cotyr... But kotir is not a smooth function! And you can't even take the first derivative. The model is unsuitable for kotir!

Oh well, let's smooth out the price series with a muvin and we'll get a curve that can be differentiated as many times as we like. Now it is! All right... or is it? Probably not everything. There's a fucking phase lag, the bigger the smoother the curve. We'll have to predict beyond that horizon, which requires higher and higher order derivatives. And lo and behold, we get to the prediction horizon and we run out of smoothness in our curve. And it's always like that! Yes, it can't be otherwise, as we're trying to pull ourselves out of the swamp by our own hair.

Comment.

 

Well, that's right. That's why Prival doesn't work with cotiers, but with their 'score'. And this estimation is, roughly speaking, obtained by adaptive filtering of quotients. If a Kalman estimator is used, the adaptive filtering comes with the lowest quadratic error. Smoothness and phase delay depend on the order of the filter (which may depend on the system being modelled, can't remember already). That said, it should be noted that the work ends up with a linear model of the system.


In short it is not so good. But it is better, than nothing.

 

I'll try to go in order, too.

This is a model of a physical process, the price movement. The price itself is continuous, but the process of quoting it is discrete. I believe that the price exists between tick arrivals, so it can be differentiated. Otherwise it would mean that everything in the world has collapsed and there is no price.

It is also important, these equations can be written in a discrete form, you need to solve the matrix exponent, you can do it in 2 ways to find an analytical (exact solution), but you need MQL to understand SQRT(-1) or expand in power series formula (6), I attach the article, once very long ago made a presentation at a national seminar school on fast processes, suddenly came in handy (I think) here too.

In radiolocation the data come too discretely, that's why we switch to discrete time and solve in conditions, when the data (kotirs) come not regularly.

So there is no need to smoothen anything with a wand, I agree that it will only worsen the processing results.

Files:
stj.rar  52 kb
 
bstone писал(а) >>

There should be no problem with transposition if it is done correctly. The transpose operation stores the number of elements. Hence, if all matrix operations operate on linear arrays rather than two-dimensional arrays, all will be fine with transposition. And dynamic linear arrays are well supported in MQL4, unlike multidimensional ones.

Please make a procedure of transposition, I can't do it in MQL. Here is an example in Mathcadet. One condition: dimension m and n are not known beforehand and function must be inversal, i.e. I don't care which array to transpose, and of course, should be called multiple times and work correctly.

 

This is not right. In fact, pricing is discrete in nature, because a new price occurs when the balance between the sell and buy bids changes, which is not a continuous process. So we are dealing with a discrete process, or rather discrete in time observations of a discrete process.


But it is not a great trouble because, as with all discrete processes, we are saved by the fact that we have discrete readings at ticks and M1, and we can work at M30 and H1.

 
bstone писал(а) >>

This is not right. Pricing is in fact a discrete process in nature, because a new price occurs when the balance between the sell and buy bids changes, which is not a continuous process. So we are dealing with a discrete process, or rather discrete in time observations of a discrete process.


But it is not a great trouble, because as with all discrete processes we are rescued by the fact that we have discrete readings at ticks and M1, and can work at M30 and H1.

if the balance does not change - is there a price ? or is it just gone )

Kalman filtering allows to take into account that evaluation (quotation) can have errors at discrete points of time, they are called observation noise

 
Prival писал(а) >>

Please do the transposition procedure.

"Not for an answer, but a hint for a hint".

Wouldn't it be possible to work with a matrix as with a one-dimensional array whose dimension can be changed with ArrayResize function ? (I can't remember how they worked with matrices in Fortran 4 before :( and with the biblioteks mentioned somewhere earlier)

Reason: