# How many cycles are required to model seasonality?

How many cycles should I have in my time series to model the seasonality component of it so that I can get rid of it and just look at the trend?

Let's say you have $N$ years of monthly data. Think of FFT (fourier analysis). Your bin resolution is $F/N$, where $F$ - sampling frequency, so we get $12/(12N)=1/N$

So, if your $N=1$, i.e. you have 12 observations, you bin size is 1. This means that your precision is approximately 1. Basically, this is garbage. If you analysis tells you there's one annual cycle, then it's [0,2] range, really.

If you have $N=5$ years of data, then the bin size is $0.2$, i.e. cycle one would be in range [0.8,1.2] - much better.

• So what precision is enough? Suppose I want to model daily and weekly seasonality to get rid of it using R ... How many weeks worth of data should I collect? Sep 20 '16 at 17:33
• @user2253546, you did not specify how do you measure the precision and what's your tolerance: these will determine how much data you need. When you say "daily" seasoinality do you mean the cycle length is a day? If that's the case, then you need a few days worth of data sampled at at least 12 hour frequency. Sep 20 '16 at 17:44

As @Ben_Bolker says, this is a "how long" question.

In my experience (mostly with marketing and sales data), 3 cycles is minimal, and usually sufficient if the seasonality is consistent. But who cares about the experience of a person who doesn't even post under his own name? What about a citation?

Checking a popular textbook [John E. Hanke and Dean W. Wichern, Business Forecasting, 9th edition, 2009, Pearson] I see the following recommendations in table 3.6, page 80, for minimum data requirements:

Seasonal exponential smoothing [Holt-Winters]: 2 cycles (seems too short to me; that's a lot of parameters to fit in two cycles)

This is a "how long is a piece of string" question, i.e. one that can't be given an objective, quantitative answer without more context. @Aksalal has a nice technical explanation, but your question is effectively the same as "how many data points do I need to characterize the population mean?" - i.e., it depends how noisy your data are and how precise you need the answer to be. The only thing we can say with certainty is that you need $N>1$. Any rule of thumb you're given will depend on what levels of noise are expected in "typical" data in a particular field, and what levels of precision are useful. If you showed us a graph of a time series people here might be willing to give you subjective answers, but you're unlikely to get a hard-and-fast answer.