So suppose we have some sort of a time series model.

y_t = trend_t + cyclical_t + x_t + epsilon_t

So, I'm interested in obtaining the seasonal component. Here "x_t" refers to other potential covariates.

I can fit a trend with a moving average so now I have

y_t = y_t - trend_t

So now this is a stationary time series.

But now, I'd like to write some sort of a periodic function which will capture how this function varies seasonally.

Generally, we do that by computing some sort of a approximation of y using fourier series. This will have the property that our function is periodic, and we can limit how closely it matches "y" by limiting the number of terms in the function.

So then problem I run into is that most statistical programs for computing "fourier series" or "fast fourier transforms" or whatever don't seem to take the parameters I would expect the function to take as an input.

Specifically, I would expect any function of this sort to require "Periodicity" (ie, when the function repeats) and the number of terms in the fourier series (ie, how closely we're matching the original data).

Can anyone tell me what I'm missing?


  • $\begingroup$ For a start, you need to clarify your terms. Seasonal refers to pattern that are very periodic and fairly predictable -- like sunscreen sells more in the summer. Cyclical patterns are pretty much the opposite -- like the business cycle. In a classical decomposition of a time series, you will have trend, seasonal, cyclical, and error terms. $\endgroup$ – zbicyclist Mar 5 at 1:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.