Fourier-based hypothesis - page 3

 
grasn >> :

Ahem, that reminds me. I used a long time ago, though the cosine (but Fourier can be used) transform for prediction, but in a rather specific way. It worked even quite well, sometimes. The essence of the idea was the following: ...

...

There are some subtleties and tricks with identification - but I don't remember which ones. I should note that the lower frequencies are predicted practically 100%, they are quasi-periodic in a sense.


If anyone really needs it, I can dig in the archive and lay out a bit more details. But it seems to me - all is clear anyway :o)

We've been there. I lengthened the arrays by prediction length, and then performed inverse transformation taking into account the lengthening.

Used cosine, too, by the way. It turns out that trader's thought moves in parallel streams. I naively thought that I was the only one with such unscientific methods, and I was ashamed to go public with it.

 
Urain >> :

We know, we've been there. I lengthened the arrays by the prediction length and then did the reverse transformation with the lengthening already taken into account.

By the way, I also used cosine. It turns out that trader's thought moves in parallel flows. I naively thought I was the only one to use such unscientific methods and I was even ashamed to go public with it.

It's not about lengthening, it's about correctly identifying the model. Everything is much more complicated in this case.

 
grasn >> :

It's not about lengthening, it's about correctly identifying the model. It's much more complicated than that.

It's already been discussed on the forum somewhere,

>> The smooth window shift gives the illusion that the harmonics are changing smoothly, but in fact they're not.

 

to Urain

And I decided to develop my thought - using PF for such series is unscientific, while this approach is actually OK, not worse than Fibo and so on. :о) I think - there should be some dependence of AR model order for each frequency. Besides, it reconstructs part of existing series, so it can be used for signal identification, though parameters turn out to be of the same order.


Do you happen to have, so to speak, a "tuned" library of linear algebra for MT? Because I'm not strong in MQL. I need the classics and the rapidity of calculation:


I've searched for MQL, found it, but I've never understood how to use it :o( I'm not strong in functions and dll. I'd like to try and check one thing, but I can't do it without it :o(


Help, please :o))))

 
grasn писал(а) >>

Ahem, that reminds me. I used a long time ago, though the cosine (but Fourier can be used) transform for prediction, but in a rather specific way. It was even good, sometimes. The gist of the idea was as follows:

  • Step 1: W window length was fixed, e.g. for certainty let it be 300 counts (bars)
  • Step 2: I iterate through this window from some point in history some N counts backward (say, 1000) to the "current" bar (after it - the future :o)) And at each such iteration, it calculated a cosine transformation (CP). The results were summed up in array, we got matrix NxW (columns represent KP on some bar and rows represent frequencies of transformation)
  • Step 3: The row of such matrix is essentially the dynamics of KP coefficient on the taken history. And such series, oddly enough, are stationary and have a lot of advantages. So, I forecast each such series in the matrix (I have the same number of samples in sliding window W) using AR model for some horizon. The important thing is that it should be less than the length of W. Since the series is (ok) almost stationary, we can use some model identification techniques
  • Step 4: By making W forecasts for some horizon, let's say 100 samples ahead, I get a forecast matrix. I need the rightmost column in this matrix, which is the predicted cosine of the signal image. All that remains is a known formula to reconstruct the future signal.

There are some subtleties and tricks of identification - but I can't really remember them anymore. I should note that lower frequencies are predicted practically 100%, they are quasi-periodic in a sense.

If anyone really needs it, I can dig in the archive and lay out a bit more details. But it seems to me - everything is clear as it is :o)

Wouldn't hurt to see it all in code...

 
Urain >> :

This has already been discussed on the forum somewhere,

The smooth window shift gives the illusion that the harmonics change smoothly, but in reality they don't.

I was referring to the identification of the AR model itself, (row length and model order). They will be different for each frequency (or harmonic, which in this context is monopoietic). Predicting backwards works well, but only at low frequencies. But the first few frequencies can spoil the prediction

 
forte928 >> :

It wouldn't hurt to see it all in code...

I will be able to do it later, if Urain doesn't beat me to it :o). By the way, can you implement it in MQL, if it's interesting? It will be useful for you and I will get my "function". :о) The idea is not so bad ... :о))))

 
grasn >> :

I understand this matrix? (This issue, I think Prival last year, I thought it has already been solved).

If necessary, I can code (gratuitously), but describe it in words that do not guess that it means.

(I certainly understood, but still want uniqueness). Throw in a personal tech job get back the code is simple :o)

By the way on MQ-5 will be other methods of coding.

 
Urain >> :

I understand this matrix? (This issue, I think Prival last year, I thought it has already been solved).

If necessary, I can code (gratuitously), just describe it in words that do not guess that it means.

(I certainly understood but still want to be unequivocal). Throw in a personal tech job get back the code is simple :o)

In the 'world', it has long been decided, and he only wondered.


Ok, I think I'll be able to write it by the weekend, if not the ToR, then I'll be able to express it more clearly.


Stop!!! And how did you predict the dynamics of frequency changes by historical counts???? I'm an AR, more sophisticated stuff doesn't make sense to use here. Alright though, I'll write more about it at the weekend or sooner.

 
grasn >> :

Stop!!! And how did you predict the dynamics of frequency changes according to historical counts????

Phase shift.

OK, probably I'll be able to write only at the weekend, if not ToR, then to express it more clearly.

You have to go? Well, bye then.