The model is not created from a Fourier transform, and Fourier transforms (at least the common Fast Fourier Transform) are not good choices for modeling prices according to John Ehlers' "
Rocket Science for Traders: Digital Signal Processing Applications."
This method models asset prices as a parabolic trend (often close to linear) plus a cyclical part (sum of a few sinusoids). To create the function, I choose the window of data (89 closing prices in my example) and the number of sinusoids (3 in my example). Then software finds the remaining parameters through genetic optimization to attempt to get a good fit. The number of sinusoids is small to keep the fit fairly smooth.
Another example this time for MDYV SPDR S&P 400 Mid Cap Value ETF for 89 calendar days from 20210107 through 20210405 using data adjusted for dividends and splits and interpolating close prices between non-trading days has a raw chart
View attachment 256288
The fitted function for the close prices is
Code:
y = 56.4195823669 + 0.1046799496 * x + 0.0002184126 * x^2
+ 1.0908385515 * cos(twopi / 28.9732589925 * x + 4.5311441422)
+ 0.8659873009 * cos(twopi / 64.9392941518 * x + 0.3379080296)
+ 0.7130651474 * cos(twopi / 16.9317009049 * x + 0.6330339909) ;
View attachment 256289
The prices and fitted curve with the parabolic trend subtracted are
View attachment 256290
This suggests going long tomorrow 20210406 and exiting on 20210416 to capture the next cyclic segment predicted to rise.
The three cyclical parts are
View attachment 256291
Notice there is no single, dominant cycle (Conventional cycle analysis often assumes there is one). And the cycle with the largest period (64.9392941518 calendar days) is more than half the data size (89 calendar days). A Fourier transform would not be able to find a period more than half the data size.
I haven't been using this method very long. And like everything else, it works -- sometimes.