Fourier-based hypothesis - page 2

 
Reshetov >> :


2. PF is a spectral analysis of periodic functions. That is, if you get a Fourier series BP decomposition of 1000 bars, then for the next 1000 bars you will get an exact copy of the previous period of 1000 bars. Because PF is an approximation of periodic functions, not an extrapolation.



+100% - as well as for the previous 1000 - this 1000 bars will be the period of the function - with all that follows....

Good luck.

ZS this is not a reply to Yuri - he already knows that. Just a rejoinder.

 
VladislavVG >> :

+100% - as well as for the previous 1000 - this 1000 bars will be the period of the function - with all that follows....

Good luck.

ZS this is not a reply to Yuri - he already knows that. Just a rejoinder.

This also applies to the previous 2 posts.

Finally. People are talking without knowing what they're talking about.

However, I will add. :)

PF has long been used in many areas to predict the behavior of processes. But PF does not and cannot, by its definition, predict anything like that, directly.

How to use PF for prediction is a whole field of science, and different methods are used for different processes, and sometimes fundamentally different ones.


A completely free predictive suggestion is that when shooting at a moving target, the missile is not pointed at the target, but at the intended point of impact. The target in doing so changes coordinates and can manoeuvre. A new rendezvous point is calculated with the target parameters in mind, and the course is corrected to the new calculated rendezvous point.

The 2nd example is autopilot. Impacts are random and sometimes quite large, but the course of the vehicle is maintained quite successfully and with very high accuracy. Imagine the deal is the rudder position correcting for course deviation.

There you go. Very simplistic. :) However, it's a whole field of science, too, and it's complicated.

 
YUBA >> :

PF has long been used in many fields to predict the behaviour of processes. But PF does not and cannot, by its definition, predict anything directly.

How to use FFT for prediction is a whole science, and different methods are used for different processes, sometimes principally different.

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

What else needs to be pointed out - that TF 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 these problems there is no analytical solution. 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 the Fourier equation.

Good luck.

>> I tried to use my "fingers", maybe I don't understand it all... well, sorry....

 
YUBA >> :

Completely free predictive thinking - when firing at a moving target, the missile is not aimed at the target, but at the anticipated rendezvous point. The target will change coordinates and may manoeuvre. A new rendezvous point is calculated with the target parameters in mind, and the course is corrected to the new calculated rendezvous point.

The 2nd example is autopilot. Impacts are random and sometimes quite large, but the course of the vehicle is maintained quite successfully and with very high accuracy. Imagine the deal is the rudder position correcting the deviation from the course.

Like this. Very simple. :) However, it's a whole field of science too, and it's not simple.

IMHO - the analogy is not entirely appropriate - the property of inertia will break all plans. The methods applicable there (intercepts) won't work for diphires with brutal coupling ;) - the whole point is in error of which solution can be obtained - for missile it's enough to go to target area (error is usually high compared to target size) Moreover I can say as a former air defence officer (firing squad ;) )- such problem only theoretically always solved, or on simulator. Regarding the autopilot - analogous to getting additional insider information.... Airport side illumination, active radar, weather report data - all deterministic ;)...

By the way, I'm not saying that it's impossible to get the information you need from quotes - but there's no need for Fourier analysis there ;).... Everything is much simpler...

>> Good luck with that.

 
VladislavVG >> :

SZY 2 all who still haven't given up Fourier - start with studying the basics of methods, instead of rushing straight into the wilds - you can save quite a lot of time ;)...


I want to make a small correction. It's not necessary to dive into FFT or any other method if you have already prepared libraries. I prefer to find all routine algorithms, even those that may be lying around on a disk somewhere since the old days, in a ready-made form, already transferred to MT4, for the same reasons of time saving.

Reshetov wrote (a) >>.

All one can do to extrapolate, for example, is to decompose two previous periods by N bars into spectral analysis. Then, to extrapolate further (not yet existing) N bars, take the arithmetic mean of harmonic amplitudes and shift the phase of each harmonic by exactly as many radians as the difference of the corresponding harmonics in the two previous periods under study.

I've done that too ;-). The idea is of course naive, so nothing came out the first time. The codes are waiting for the second try. The filters somehow went relatively better.
 
marketeer >> :

I would like to make a small correction. You don't have to dive into the maze of FFT or any other method when you have ready-made libraries.

I actually meant using unsuitable methods to solve problems.

There is a library - the question is not about that. The question is that the Fourier method is not intended for this class of problems - you need to understand the limitations that will inevitably be achieved when applying this method to a class of problems not suitable for it.

>> Good luck.

 
VladislavVG >> :

IMHO - the analogy is not entirely appropriate - the property of inertia will break all plans. Methods applicable there (interception) will not work for diffusers with severe coupling ;) - the whole point is in error of which solution can be obtained - for missile just go to target area (error is usually high compared to target size) moreover I can say as a former air defence officer (firing squad ;) )- such problem only theoretically is always solved, or on simulator. Regarding the autopilot - analogous to getting additional insider information.... Airport side illumination, active radar, weather report data - all deterministic ;)...

By the way, I'm not saying that it's impossible to get the information you need from quotes - but there's no need for Fourier analysis there ;).... It's much simpler...

Good luck.

Hello colleague :), from no less than former developer of these very systems.

The miss of even a purely inertial system has long been 30-50m at 30km. This is without taking into account active guidance.

The market also has inertia and quite a large inertia and the reaction to the impact is far from instantaneous. In other words, the system has a transient characteristic, but it changes from instrument to instrument, and in time as well.

Similarly as control systems are built on the basis of controlled object models, before starting to build a trading system it is not bad to build a market model. And to know its, models, limitations of applicability. Without it, IMHO, no wizards and Butterworth etc. will help.

And the market has a spectrum of course, I've checked it. ;) Like 1/f, or 1/f^2. Something like that. It's quite smooth on a large interval. You cannot make a fur coat.)

We should also remember about the noise, which, in our case, can be at the level or even the real signal.

 

If we use the properties of linear inertia, then:


Let us have a section of history A from 1999 bar to 9999 bar.

Suppose we have a section of history B from 9999 bar to 0.

Let us have an inertial extrapolation on a future section C from 0 to -999 bar.


Then we obtain a set of amplitudes for segment A: AMPa[0] - AMPa[n] and phases PHa[0] - PHa[n] (where 0 - n are harmonic numbers)

For plot B: amplitudes AMPb[0] - AMPb[n] and phases PHb[0] - PHb[n]

Hence for plot C (i.e. extrapolated future) due to inertia, each i-th harmonic's amplitude will be: AMPc[i] = 2 * AMPb[i] - AMPa[i] and phase respectively: PHc[i] = 2 * PHb[i] - PHa[i]


Note that if the magnitude for any harmonic is negative, you must subtract PI from the phase of that harmonic or add PI, i.e. after subtracting or adding, the phase value must be in the range 0 - 2*PI


Besides, inertia supposes that trend movements increase or decrease linearly (or stand still if it is a sideways trend) for this purpose in the time series the trend slope should be considered that is calculated using the formula


d[i] = Close[1999] + (Close[0] - Close[1999]) * (1999 - i) / 1999, where i is the bar number


Correspondingly, before the BP spectral analysis we need to normalize it, i.e. subtract the corresponding value of d[i] for sections A and B from the price value on each i-th bar and subject the obtained function to the harmonic PF analysis. Conversely, on plot C, after the OPF extrapolation, add d[i] for the value of each bar. The amplitude of the 0th harmonic in the reverse transform does not need to be taken into account (its value should be 0), since the correction d[i] already takes into account the inertial linearity of the trend.

 

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: Fixed the length of the W window, e.g. for certainty let it be 300 counts (bars)
  • Step 2: Traverse by this window from some historical point backwards by N samples (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 an array, we got a matrix NxW (columns represent KP at some point and rows represent conversion frequencies)
  • 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 is the predicted cosine of the signal image. All that remains is a known formula to reconstruct the future signal.


There are a few subtleties and tricks with identification - but I can't seem to remember which ones. 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)

 
Reshetov >> :

If we use the properties of linear inertia, then: ......

I didn't dig deep into the maths, but let's assume it's true.

However.

1. The market is not a closed system. Any extrapolation is possible in the absence of external influences. If there are no influences, see low liquid securities. This is what will happen. :)

2. In the absence of influences, the system tends to an equilibrium state. i.e. the extrapolation would be something tending towards 0 or a constant.

3 And what is the duration of the transition process in the market, the response to the impact? Do you know? And then how to count? The 1st interval is one impact, the 2nd one is completely different, and we kind of add them up here. :)

I.e. You can only predict something in the area between the influences and no further.

Reason: