Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Learn how to detect dominant cycles with spectrum analysis
Rating: 4.3 out of 5(27 ratings)
140 students

Learn how to detect dominant cycles with spectrum analysis

Using the Fast Fourier Transform and the DFT-Goertzel algorithm to detect cycles in noisy data sets (financial markets)
Last updated 11/2023
English

What you'll learn

  • This course explains the key elements of a Fourier-based spectrum analysis.
  • Understanding the basic computations involved in FFT-based or Goertzel-algorithm-based measurement.
  • Explaining the core background of FFT in layman terms and concentrate on the important aspects on “how to read a spectrum” plot.
  • Learn why the Goertzel algorithm outperforms classical Fourier transforms for the purpose of cycles detection in financial markets
  • Get the source code to implement the generalized Goertzel transform

Course content

5 sections11 lectures49m total length
  • Introduction - Example dataset with 3 cycles2:02

    We generate our sample dataset based on 3 cycles with different length and phase offsets. We keep the dataset as simple as possible to compare the basic resolution of each cycle detection method. We will compare the following algorithms in regards to their cycle length detection accuracy:


    a) FFT,

    b) improved, interpolated FFT,

    c) Goertzel alogorithm and

    d) generaltized Goertzel algorithm

  • Applying the Fast Fourier Transform “FFT” for cycle detection12:36

    We learn the basic terms required to read a spectrum plot. Using our test input signal, we perform a standard Fast Fourier Transform and plot the magnitude of each Fourier coefficient. We get N/2 Fourier integer coefficient. Each Fourier coefficient "k" represents a frequency bin. The FFT returns all k coefficients in one run. We can look for the peaks in the spectrum and use the k-th coefficient number/frequency to convert the frequency back to the time domain and derive the cycle length.

  • The Fourier index coefficient – time / frequency conversion1:10

    In our Market Analysis, we are interested in the length (and phase) of the cycle measures in the time domain of our input data. Therefore we always need to convert forth and back between the frequency domain. As we learned that the Fourier analysis works in the Frequency domain and delivers integer-spaced k-coefficient. The k-coefficient is also known as wavenumber. The wave number, k, is a measure of the periodicity of a cycle, i.e. the number of oscillations per length unit. In our case, the length unit is "bars" in the time resolution we used, e.g. days, hours or minutes. So a k-index 6 means that the cycle has 6 full oscillations in our measured input data with a total length of 800 bars.


    Therefore we can calculate the cycle length via Frequency conversion directly from the k index:


    cycle length = N / k

Requirements

  • Basic cycle and/or spectrum analysis knowledge is helpfull, but not mandatory.

Description

At the heart of almost every cycle analysis platform is a spectrum module.

Various derivatives of the Fourier transform are available. But which  application of Fourier is the "best" for use in economic markets? This course tries to provide an answer.

Therefore, the course focuses on explaining the essential aspects in layman's terms:

  • Fundamental aspects on "How to read a spectrum diagram" are at the center of the course.

  • Different Fourier spectrum analysis methods are compared in terms of their performance in detecting exact cycle lengths ("frequency" components). 

  • Learn what is important in detecting cycles in the financial markets.

  • Get the source code to implement for your own usage

Understanding the basic calculations involved in measuring cycle length, knowing the correct scaling, correct non-integer interpolation, converting different units (frequency vs. time), and learning how to read spectral plots are all critical to the success of cycle analysis and related projection.

Being equipped with this knowledge will allow you to have more success with your custom cycle analysis application.

There are many issues to consider when analyzing and measuring cycles in financial markets. Unfortunately, it is easy to make incorrect spectral measurements resulting in inaccurate cycle projections either on wrong phase or length gathered from the spectrum plot.

This course explains the key elements of a Fourier-based spectrum analysis.

You will learn why the Goertzel algorithm outperforms classical Fourier transforms for the purpose of cycles detection in financial markets.

Compared to an FFT, the Goertzel algorithm is simple and much more efficient for detecting cycles in data series related to financial markets. You will learn and understand why in this course.

Who this course is for:

  • Data-science and financial market analysts interested in applying digital signal processing to analyzing and measuring cycles in financial markets
  • Experts who want to understand the differences between standard Fourier and Goertzel algorithm (FFT vs. G-DFT)