Fourier Analysis
Principles of Fourier analysis
The core idea behind Fourier analysis is that any time series can be broken down into a sum of sine and cosine waves, each with a different frequency. This transforms your data from the time domain (values over time) into the frequency domain (how much energy sits at each frequency).
Why does this matter? Many time series contain cyclical patterns that are hard to see just by looking at a plot. Fourier analysis pulls those cycles apart so you can identify them individually. Think of seasonal patterns in retail sales, daily temperature swings, or business cycles in economic data.
- Represents a time series as a combination of sinusoidal (trigonometric) components
- Detects hidden periodicities and cyclical behavior that may not be obvious in the raw data
- Widely applied in signal processing, physics, engineering, and economics

Discrete Fourier transform application
In practice, you're working with sampled data (discrete observations at regular intervals), so you use the Discrete Fourier Transform (DFT) rather than the continuous version. The DFT converts a finite sequence of equally spaced samples into a set of complex-valued frequency components:
Here, is the time series value at time step , is the total number of samples, and is the frequency index. You can also go backwards: the inverse DFT reconstructs the original time series from its frequency components, so no information is lost.
Each frequency component is a complex number that encodes two things:
- Amplitude (): how strong that frequency is in the data. Larger amplitude means that frequency contributes more to the overall signal.
- Phase (): the timing offset of that frequency component. It tells you where in its cycle that wave starts relative to the beginning of your series.
Computing the DFT directly requires operations, which gets slow for large datasets. The Fast Fourier Transform (FFT) algorithm reduces this to , making Fourier analysis practical even for very long time series.

Periodogram
Periodogram for frequency identification
The periodogram estimates the power spectral density (PSD) of a time series. While the DFT gives you complex-valued frequency components, the periodogram boils those down to a single real number at each frequency: how much of the series' total variance lives at that frequency.
The formula is straightforward:
where is the squared magnitude of the DFT at frequency and is the sample size.
When you plot the periodogram (power on the y-axis, frequency on the x-axis), you're looking for peaks. A tall peak at a particular frequency means the data has a strong cyclical component at that period. For example, a peak at frequency in monthly data points to an annual cycle.
- Peaks reveal dominant frequencies, including the fundamental frequency and its harmonics
- Useful for detecting diurnal cycles, seasonal patterns, or any hidden periodic behavior
- Serves as a key exploratory tool before fitting more formal spectral models
Limitations of periodogram analysis
The raw periodogram has several well-known problems you should be aware of:
Spectral leakage. If your time series doesn't contain an exact integer number of cycles for a given frequency, the power from that frequency "leaks" into neighboring frequency bins. This smears peaks and can make it harder to distinguish close frequencies. The standard fix is to apply a window function (such as Hamming or Hann) to the data before computing the DFT. These windows taper the endpoints of the series toward zero, reducing leakage at the cost of slightly wider peaks.
Inconsistent estimation. The periodogram is a statistically inconsistent estimator of the true PSD. Its variance does not shrink as you collect more data. Even with a very long series, the periodogram remains noisy. To get a smoother, more reliable estimate, you can:
- Average power across adjacent frequency bins (Daniell smoothing)
- Use data tapering or multitaper methods
- Apply Welch's method, which averages periodograms from overlapping segments
Limited frequency resolution. The finest frequency difference you can resolve is:
where is the total duration of the time series. A longer observation window gives you finer resolution. You cannot improve resolution just by sampling faster; you need more total time.