0

I try to do an extrapolation with the FFT method thanks to this code: https://gist.github.com/tartakynov/83f3cd8f44208a1856ce

and i would like to knw how can i select only the highest frequencies of the data serie because this code don't give me good result.

bibio95100
  • 31
  • 5

1 Answers1

0

The basis vectors of an FFT are all circularly periodic, thus poorly model any edge transients or circular discontinuities between the beginning and end of a rectangular window which is the same length as the FFT (unless the full data set is purely integer periodic in FFT length, extremely unlikely for real financial data sets).

You could try windowing your data (with a non-rectangular window, such as a Von Hann, Tukey or Planck-taper window), possibly in conjunction with using a longer zero-padded FFT.

Another possibility is to use polynomial regression (perhaps somewhat underfit) on some portion of your data to generate an estimator, extend that polynomial into the region into which you wish to extrapolate, and then take the (windowed) FFT of that polynomial range instead of your original time series.

hotpaw2
  • 70,107
  • 14
  • 90
  • 153
  • Thank you but i did a polynomial regression, but the results are always bad... this is why i just want to take the highest frequencies and see what it gives – bibio95100 Aug 07 '18 at 18:58