Help with Fourier - page 10

 
ANG3110 писал (а):
for (int k=0; k<=N; k++)
{
sum_cos=0.0;
sum_sin=0.0;
for (int i=0; i<T; i++)
{
sum_cos+=(Close[i]-b-a*i)*MathCos(w*k*i);
sum_sin+=(Close[i]-b-a*i)*MathSin(w*k*i);
}
ak[k]=sum_cos*2/T;
bk[k]=sum_sin*2/T;
}
ak[0]=ak[0]/2;
Hmmm strange...
So you are building a Fourier series for the interval [T,0]... But in this case if you reconstruct fx[i] using Fourier series coefficients you will get that fx is periodic with the period T! That is, fx[-i]=fx[T-i]. (fx[-i] is the predicted future).

Or am I misunderstanding something!?
 
shobvas писал (а):

Hmmm strange...
So you build a Fourier series for the interval [T,0]... But in this case if you reconstruct fx[i] from the coefficients of a Fourier series then it turns out that fx is periodic with period T! That is, fx[-i]=fx[T-i]. (fx[-i] is the predicted future).

Or am I misunderstanding something!?

Yes quite right, the pattern repeats itself. What was behind is drawn forward. And the trajectory in terms of amplitude does not coincide in most cases. And the timing of the U-turns, on the contrary, is more often the same than not.
 
ANG3110, you're still torturing poor Fourier, he didn't set out to look into the future, he wasn't interested in it :) Believe me, I spent 6 years at the institute studying him. You have already written "What was behind is drawn forward", which in itself denies the theory of prediction. So move away from the typical scheme of working with frequencies, get out of this deadlock, rack your brains, look for another solution.
 
lsv писал (а):
ANG3110, you're still torturing poor Fourier, he didn't set out to look into the future, he wasn't interested in it :) Believe me, I spent 6 years at the institute studying him. You have already written "What was behind is drawn forward", which in itself denies the theory of prediction. So move away from the typical scheme of working with frequencies, get out of this deadlock, use your brain, look for another solution.

You seem to have studied at the institute, but you still haven't learned how to behave. Haven't you noticed that putting pressure on someone is not the best, if not the worst, way to handle a relationship. Besides, you don't know where I went to school and worked, otherwise you probably wouldn't have allowed yourself such foolishness.
And if you've noticed, I'm just helping those interested to figure out how to build it all from a programmatic point of view. Looking through the thread, it seemed to me that you yourself are only "pondering", but you haven't really done anything. Or am I wrong?
 
ANG3110 писал (а):
You've been to university, but you don't seem to have learned how to behave. You haven't noticed that putting pressure on someone is not the best, if not the worst, way to have a relationship. Besides, you don't know where I studied and worked, otherwise you probably wouldn't have allowed yourself such foolishness.
And if you notice, I'm just helping those interested to understand how to build it all from a programmatic point of view. Looking through the thread, it seemed to me that you yourself are only "pondering", but you haven't really done anything. Or am I wrong?
I'm sorry! I just wish you would get out of this impasse. You are thinking in the right direction, yes the whole market can be described by one function f(t) = A0 + A1*sin(B1*t +C1) + A2*sin(B2*t +C2) + ..., an infinite series of sines. But you stopped at Fourier, thereby leading yourself into a dead end. I want you to look for other solutions instead of stopping only on this one.

About my solutions, yes, I went a little further, but I hit the next dead end. I once tried to give you advice, i.e. showed you the direction I went, but you didn't take it.
 
lsv писал (а):

I'm sorry! I just want you to get out of this impasse. You are thinking in the right direction, yes the whole market can be described by one function f(t) = A0 + A1*sin(B1*t +C1) + A2*sin(B2*t +C2) + ..., an infinite series of sines. But you stopped at Fourier, thereby leading yourself into a dead end. I want you to look for other solutions instead of stopping only on this one.

About my solutions, yes, I went a little further, but I hit the next dead end. I once tried to give you advice, i.e. showed you the direction I went, but you didn't take it.
I don't really like the moralistic tone of "absolute truth" with which you refer to me, because once again, you don't know my level of education and practice, and probably can't give me any constructive advice, but okay, that's your problem. The probability of waves repeating in the market is very high, I checked it and I don't care who or what anyone says about it. Besides, I can see variants of further possible solutions, in which the accuracy of coincidence of predicted "repeats" may not be very relevant. And one more thing - the Fourier transform is a small part of what I do and what I've already done. You may see as an example this work 'at PR+SQ-e', from which I hope it will be clear that a dilettante in this field could hardly do it.
 
lsv писал (а):
I'm sorry! I just want you to get out of this impasse. You are thinking in the right direction, yes the whole market can be described by one function f(t) = A0 + A1*sin(B1*t +C1) + A2*sin(B2*t +C2) + ..., an infinite series of sines. But you stopped at Fourier, thereby leading yourself into a dead end. I want you to look for other solutions instead of stopping only on this one.

About my solutions, yes, I went a little further, but I hit the next dead end. I once tried to give you advice, i.e. showed you the direction I went, but you didn't take it.

lsv, share your experience. Be more specific. I, for example, don't deny that if you torture yourself with Fourier for a long time, something will work out. The idea of ANG3110 to Fourier series of price deviation from the trend line is quite interesting.
 
No, that the Fourier series will repeat is obviously wrong! Then you don't have to build a Fourier series to repeat the past!
 
lsv писал (а):
I'm sorry! I just want you to get out of this impasse. You are thinking in the right direction, yes the whole market can be described by one function f(t) = A0 + A1*sin(B1*t +C1) + A2*sin(B2*t +C2) + ..., an infinite series of sines. But you stopped at Fourier, thereby leading yourself into a dead end. I want you to look for other solutions instead of stopping only on this one.

About my solutions, yes, I went a little further, but I hit the next dead end. I once tried to give you advice, i.e. showed you the direction I went, but you didn't take it.

Give me a hint! =)
Not by the way I suspect that the solution of f(t) still includes decaying eXponents =)

At least give me a hint what direction it is, because I pestered ANG3110 with questions, and it turned out in vain.
Only he and I wasted time =)
 
shobvas писал (а):
Give me a hint! =)
Not by the way I suspect that the solution of f(t) still includes decaying eXponents =)

At least give me a hint what direction it is, because I pestered ANG3110 with questions and it turned out to be worthless.
Only he and I lost time in vain =)

The decaying exponent is the same harmonic series, the problem is that this series is infinite.


If we do the Fourier transform we will get frequency series starting from f0, but in order to look into the future at least a little bit, i.e. to see the trend direction, we should make the minimum analyzed frequency to be at most 2 times less than f0 (fmin<=f0/2). But if we want to use Fourier to obtain fmin, we will have to increase the analyzed series by a factor of 2, which contradicts the condition. Conclusion: Fourier is not appropriate here. Exit: Find another algorithm, method, solution.