“The Profit Magic of Stock Transaction Timing” by Hurst J.M. – Fourier Spectral Analysis in Excel

Here is an excel spreadsheet to calculate the spectral analysis approximation of a price time series. The approximation is that by Fourier as explained in “The Profit Magic of Stock Transaction Timing” by Hurst J.M. Download and open it with Microsoft Excel, it uses macros.

Fourier approximation of a price time series with detrend

I wrote the macros to calculate harmonics and build the chart coding the method cited in the original work of Hurst J.M. titled “The Profit Magic of Stock Transaction Timing”.

In the excel spreadsheet you can paste your data, choose some parameters of the spectral decomposition, such as which part of data to consider as inputs, if the data are to be detrended, if to plot on the resulting chart also the remaining data overlapped with the approximation. The input data must be odd in number. The result, as shown in the image above is the list of the major frequencies present in the input data by which using the reconstruction is made and then replicated after the end of the input series.

Fourier approximation of a price time series with NO detrend

Above is another image of the Fourier approximation of the same price series of the previous image, but this time no detrend of the input data has been made.

As you can see by the periodicity of the output series, in both the case the input data are the first 344 prices.

Leave a Reply

Your email address will not be published. Required fields are marked *