Fourier-based hypothesis - page 5

 

Ha-ha-ha! Again?

Same mistakes?

One has to wonder how the participants understand each other: everyone has his own vocabulary, semantics, usus, no cause-and-effect relationship between the phenomena being described and between words, and no ability to use search either on the forum or on the Internet.

This thread is not for mathematicians or traders, but for psychiatrists. They'll have a lot of work to do here.

 
NEKSUS_ писал(а) there is already an implementation of this idea, "bpf by montecarlo"

Yes, alas, you can't draw many conclusions from today's picture - whether up (more arrows) or down... We'll see tomorrow - check it ))

And the graph above uses a Fourier series as the extrapolation function?

 

yep, it's Fourier, but you'd better ask the author of this miracle for details: njel

yesterday's picture

 

I am taking advantage of a free minute to post the promised material. I investigated this method about four years ago, maybe five. I couldn't find archive with this project, I had to reconstruct results from memory, thanks to simple algorithm and MathCAD considerably reduces time. The concept, if that word is appropriate for this method, is classical - we take apart the "complex" into simple components and work with each one separately, i.e. instead of forecasting extremely complex series by their characteristics and behavior, we proceed to forecasting "simple" series, but in a big amount. We use cosine decomposition and some useful properties of coefficients of the said decomposition.

As an example to demonstrate the results of the method, I've taken the first available segment with the following input parameters:

Assembling the pattern matrix

We take a historical series as input for the system and measure its length. We pass a fixed sliding window from the beginning of a sample to its end, taking into account the length of the window itself. On each sample, we calculate the cosine transformation (CP). The results are summed up in an array:

  • columns, KP at some interval
  • transform frequency rows (I will use numbering of frequencies, from 0 to w-1)


A row of such a matrix is essentially the dynamics of the KP coefficient on the taken history. Strange as it may seem, such series are stationary and have a lot of advantages. Here are a few samples for example:

Frequency 0:


Frequency 5:


Frequency 10:


Frequency 110:

Forecast

So, each such row in the matrix (I have as many as there are counts in the sliding window) I predict using AR model, for some horizon. The important thing is that it should be less than the length of W. Since the series is almost stationary, you can use some AR model identification techniques. Without special comments on the choice of parameters and description of the model itself, I'm going to attach as an example a forecast by an AR model of 110 frequencies for a length of 500 counts (for visualization):


In the loop, I perform a prediction for each row of the calculation matrix (for each frequency):


The example uses one order of AR model for each frequency, which is not quite correct. Identification should be done for each frequency. But this is a separate topic in general, and in addition we have a part of the signal known, so it can be used for identification as well. All in all, there's a lot going on here.

Series reconstruction

Having obtained the forecast matrix, we select the desired signal image (the rightmost column in the matrix) and perform the signal reconstruction:

Check

Check with the fact. According to the conditions, all samples higher than 2*tau are predicted.

What you see is not illusion and not a lie, method is strictly scientific (well, nearly so :o)), it works, at least sometimes it REALLY works :o)), all true is buried in identification, we need additional studies and all that, we may bring it to a stable industrial version.

PS: Colleagues, by the way, if anyone is interested, take up the idea and bring it to a victorious end (about five years ago, other, not less revolutionary ideas were taken aside, quite in another direction :o)). As I see it, the approach is promising enough, it allows forecasting in a statistical sense, and that's no small thing. And me, I will get my function. I'll help with it, but not in MQL, I don't know it :o).


PS: our mathematicians - what will you say scientific novelty :o)))?

 
AlexEro >> :

Ha-ha-ha! Again?

Same mistakes?

One has to wonder how the participants of this discussion understand each other: everyone has his own vocabulary, semantics, usus, they are completely missing the cause-and-effect relationship between the phenomena being described and between words, they cannot use the search either on this forum or on the Internet.

This thread is not for mathematicians or traders, but for psychiatrists. They'll have a lot of work to do here.

Would you like to talk about it? :о)

 
grasn >> :

Why doesn't your FFT sliding window equal 2^n ?

 
Urain >> :

Why does your FFT sliding window not equal 2^n ?

I wrote, I used cosine transformation. Moreover (if you take the Fourier transform) - such a requirement is only for the fast transform scheme, i.e. for the transform (as you correctly wrote), which I don't use in the model at all. It is not needed there. don't need it there. And why should I take such a long window in that case?

 
grasn >> :

I wrote I used cosine transformation. Moreover (if you take the Fourier transform) - such a requirement is only for the fast transform scheme, i.e. for the transform (as you correctly wrote), which I don't use in the model at all. It is not needed there. don't need it there. And why should I take such a long window in that case?

There is an FFT library in codebase which also includes cosine transform library, and if you are going to use these libraries in MQL, you must remember that the window there must be equal to 2^n (16,32,64,128,256,512,1024...).

 
Grasn: Thank you! I'm going on holiday today - I'll try to repeat the calculations. What if it's the Grail? )))
 
Urain >> :

Codebase has an FFT library which also includes cosine conversion library, and if you are going to use these libraries in MQL, you should remember that the window must be equal to 2^n (16,32,64,128,256,512...)




This is not something I intend to use. This is a restriction only for fast conversion algorithms. And I need the library for linear algebra. By the way, you promised to help :o)