Fourier-based hypothesis - page 7

 
Urain >> :

That already sounds like a ToR. Is that all (what you need to be happy)?

I won't remake Lapak, because it has the object-oriented approach in MQL-5,

but on the 4 is just a load of crap, it's easier to rewrite.

The http://alglib.sources.ru/matrixops/ seems to have everything in C. Accordingly, it is easy enough to port to MQL4.

 
Reshetov >> :

If we use the properties of linear inertia, then:

Thank you for the detailed description, but there are questions. Please don't hit with a candelabra. Firstly, why do I need all 10k bars? I am interested in a window of some size, e.g. for FFT it would be 256. 256 is chosen taking into account that the largest interesting period for intraday trading on M15, where there are 96 readings in a day, is limited to 256 (>2*96) and does not need more. Well, let it be 1024 to account for weekly fluctuations as well. But in any case, as it was rightly noted before, in a total spectrum of 10 thousand bars the influence of recent changes will nullify, so the idea of a relatively small window seems to be justified. Secondly, concerning the extraction of a linear trend and its subsequent recovery, I do not perform this operation as I calculate TF not for the initial series but for increments of prices. For a given range of bars, the sum of deltas will automatically reach the point corresponding to the slope between the first and the last bar. What do you think?

 
Ilnur >> :

Here, I gave an example of implementation of a matrix inversion algorithm in MQL (taken from the source code of the LAPACK library).

found, that's one of the things that's not clear.

// Вычисляем LU-разложение матрицы
    dgetf(n,n,a,ipiv,info);

Where do we get the info and ipiv values from? Or is the function supposed to return these values to us, and we just pass the parameters where to return? Next

// Вычисляем обратную матрицу, заданным LU-разложением
    dgetri(n,a,ipiv,info);

Did we pass the ipiv with the calculated LU matrix and get the inverted matrix rewritten into the same array? Ah, not judging by

// Сохраняем обратную матрицу для отображения
    sM = sM+MatrixPrint(a,n,n);

saved in a[][]...


I've got a lot of questions like this, it's another programming style, I hardly understand it, or rather don't understand it at all. Also I couldn't find the answer part. Where are the tricky functions? And the speed of calculations, and the dimensionality of matrices? Fortran may do it, but what about MQL?

 
grasn >> :

found, that's one of the things that's not clear.

Where do we get the info and ipiv values from? Or is the function supposed to return these values to us, and we just pass the parameters where to return? Next

Did we pass the ipiv with the calculated LU matrix and get the inverted matrix rewritten into the same array? Ah, not judging by

saved in a[][]...


I have a lot of such questions, I have a different style of programming, I hardly understand it, or rather don't understand it at all. Also, I couldn't find the response part. Where are these tricky functions? And the speed of calculations, and the dimensionality of matrices? Fortran may do it, but MQL?

Don't get complex about it, colleague.

All this rubbish heap called LINPACK-LAPACK was written in 1970s by pure PHYSICIANs in Fortran. They had no idea (and didn't want to know) about structured programming and other "unnecessary things". Then these sources were translated to Ce with the help of F2C debilitator, and then the trainee student put it into texts.

Although formally it works, it is impossible to use it, because it is impossible for a normal person to understand the logic of interaction between the modules of all these "scientific" programs. In fact, that is why former physicists and mathematicians who wrote MatLab-e make money - at least you can use it, instead of spending years trying to understand someone else's stoned Martian logic.

 
grasn >> :

found, that's what's not clear among other things.

Where do we get the info and ipiv values from? Or is the function supposed to return these values to us, and we just pass the parameters where to return them? Next

These arrays are used for internal needs of Forthran functions and also to report the result of execution.

The function returns some intermediate data in them to pass to the next function. If you use

the compiled version of the clapack.dll library, it uses a similar working scheme.


grasn wrote >>

Did we pass the ipiv with the calculated LU matrix and get the inverted matrix rewritten into the same array?

The inverted matrix is returned in the original matrix a[][] which was passed as a function parameter.

grasn wrote >>

Also, I couldn't find the response part. Where are those tricky functions? And the speed of calculations, and the dimensionality of matrices? Fortran can do it, but MQL?

I don't quite understand the question. These functions are given in the lapack.mqh file attached to the post.

I didn't test speed of calculations, but I used compiled version of the library for my needs - it was easier that way.

I didn't notice any noticeable delays in running these functions, although the dimension of my matrices didn't exceed [10 10].

 

to AlexEro

Не вздумайте комплексовать по этому поводу, коллега.


I'm trying to hang in there. It's important to puff out my cheeks. :о)))


to Ilnur

The inverted matrix is returned in the original matrix a[][], which was passed to the function as a parameter.

Yes, I figured that out, just below :o)

I don't quite understand your question. These functions are given in the lapack.mqh file attached to the post.

That's what absent-mindedness means, I hadn't noticed that, geez, I'm sorry. ok, I'll try it a second time in a heartbeat, (but secretly hoping for Urain:o). My grumbling can easily be explained - in a sense it is not very convenient (I emphasize that this is not a complaint, not in any way, or else misunderstood), ie it is not a library in the full sense of the term, and a person not experienced difficult to use. I understand that no one has brought it to this level because it is not needed. A pity, of course.

 
grasn >> :

My grumbling can easily be explained - in some ways it is not very convenient (I emphasize that this is not a complaint, by any means, otherwise people will misunderstand), i.e. it is not a library in the full sense of the term, and a person not experienced find it difficult to use. I understand that no one has brought it to this level because it is not needed. It's a pity, of course.

I agree that the library interface is not user-friendly. But, when I needed functions to work with matrices,

In particular the handling operation, I couldn't find a better one at the time. So I had to use it.

 
YUBA >> :

1. The market is not a closed system. Any extrapolation is possible in the absence of external influences.

[...]

3. What is the length of the transition process in the market, the response to the impact? Do you know? How do you calculate it then? The 1st segment is one impact, the 2nd is completely different, and we kind of add them up here. :)

It means that it is possible to predict anything only in the segment between influences and no further.

1. Yeah, it's not closed at all. And it is described, probably, by some complicated diphurk like a non-linear parametric oscillator (an oscillator, of course, in the sense of theorophysics) - for one instrument. Energy to the system is communicated via a change in the diffurcation parameters (stepwise). Then there is a transient process, until a new jump in the parameters.


3. Moreover, the influences themselves must set new constants of these transients, which may even define the character of these transients (a damped or undamped sine wave or a real exponent).


P.S. To all colleagues living on a desert island, hello. This is roughly what we are going to talk about next.

 
Mathemat >> :

1. Yeah, it's not closed at all. And it is described, probably, by some not simple such diphurk of a nonlinear parametric oscillator type (oscillator - of course, in the sense of theorophysics) - for one instrument. Energy to the system is communicated via a change in the diffurcation parameters (stepwise). What follows is a transient process, until a new jump in the parameters.


3. Moreover, the influences themselves must establish new constants of these transients, which may even determine the nature of these transients (a damped or undamped sine wave or a real exponent).


P.S. To all colleagues living on a desert island, hello. This is roughly what we are going to talk about next.

Yep, plus noise, which is comparable to, and sometimes higher than, the signal level. And I suspect something like 1/f, or 1/f^2. :)

 
VladislavVG писал(а) >>

Then I would also add - there is someone to read ;) .

What else needs to be pointed out - that PF can be applied where the process can be represented by a parabolic diff. (second order with only even derivatives). Since the Fourier series is a general solution of this diffeomorphism in trigonometric form (there are also complex ones). Diffusers of this type describe potential systems (oscillatory loops without exchanges with the external environment) - that is such systems in which dissipation (energy dissipation) can be neglected and in which a solution with a good approximation is obtained. Radio engineering/radiolocation deals mainly with such systems. If the exchange cannot be neglected - then terms with odd derivatives (first order - hysteresis, for example) appear. For most types of such problems there is no solution in analytical form. And the Fourier series is no longer a solution in general form - that is what is important. And now a question - are you sure that the mass of money, "thrown" in the Forex market and moving the price is constant during a day, trading session? If so, then feel free to use Fourier.

...

My memory is not so sharp, but not so long ago (on a neighboring forum, in a thread started by Alex), someone calculated the potential energy in Forex. :о)