What are Time Series Made of?
A time series is a special type of data composed of successive measurements of the same variable. These appear naturally in a variety of fields: the growth of an insect’s body over its lifetime, the fluctuations of sea levels over the tide cycles, or the evolution of Gross Domestic Product (GDP) for a given country over the 20th century. By their very nature, time series violate many assumptions required by standard statistical methods, leading to the development of a specific toolset to analyze them. Let’s have a quick look at what these series might look like:
Figure 1. Examples of Time Series
In this blog post, we discuss one such tool called the Decomposition of Time Series, which aims to break down a time series into different components, each with its own specific property. The most common decomposition has four components: A Trend component, which represents the overall direction of the series, a Seasonal Component, which consists of fluctuations that are predictable in terms of timing, a Cyclical Component, made of fluctuations that do not follow a specific pattern, and an Error (or Noise) component, which takes into account all variations not explained by the previous three components.
Let’s try to understand each component using a concrete example: GDP per capita data. In this particular example, the trend component would represent the long-term growth pattern for GDP. Isolating the trend component allows us to compare the economic performances of different countries over long time periods. One interesting example is that of Haiti and South Korea, which had similar GDP per capita levels in 1950, but have diverged substantially since then. In the graph below, we can see the GDP per capita in the two countries, including a line connecting the first and last observations, which in this case is a simplified version of what the Trend component would be. Next to it, we repeat this analysis but for log(GDP), which is a more natural unit to use when variables display exponential growth:
Figure 2. GPD and a Linear Interpolation Trend - South Korea vs Haiti
Figure 3. Log GPD and a Linear Interpolation Trend - South Korea vs Haiti
The seasonality component, on the other hand, reflects the fact that there are predictable movements in time series along a given period of time. For example, it is natural to expect that costs associated with heating increase during the Spring, hitting a peak during the winter months, and then decreasing during the fall. This cycle is predictable, as it follows an external phenomenon: weather seasons. Another example is expenditure on consumption goods; for example, jewelry, which always increases around Christmas, and then decreases after the holiday season is over. Below we can find graphs representing this phenomenon:
Figure 4. Illustration of Seasonality Components of Time Series
Measuring and controlling for the seasonality component is important, as otherwise one might confound these predictable movements with changes in trends or other cyclical components. For example, during a recession, one could (falsely) interpret the increase in consumption during December as a sign of economic recovery, just to be disappointed by a decrease in consumption in January (Bureau of Economic Analysis, 2006). Similarly, by understanding the seasonal component of consumption, a store manager can make better inventory and temporary hiring decisions, knowing that there will be additional demand during the holiday season, but that it is also expected that it will return to previous levels shortly after.
The cyclical component, as the name suggests, is also related to fluctuations in the data, but unlike the seasonality component, there is no well-defined period for these cycles. In our GDP example, the cyclical component corresponds to what we call a Business Cycle (National Bureau of Economic Research, n.d.). In Economics, we tend to break down a Business Cycle into four different parts: 1) A peak, which is the highest point attained in a given cycle, followed by 2) a recession, which is a decrease relative to the peak, until the series reaches its lowest point, 3) a trough, after which the economy enters 4) a recovery period, ending at a peak, which marks the start of the next Business Cycle. Below we can find a graph with the different business cycles for the US economy in the period, as marked by the NBER Business Cycle Dating Committee (National Bureau of Economic Research, 2023).
Figure 5. Business Cycles as dated by the NBER
A shadowed background indicates a recession. Note the irregularity in the duration of each cycle, as summarized in the table below. Understanding Business Cycles is a very active area of research, both in academia and in institutions like the Federal Reserve, as the effective design of Monetary policy - the process of stimulating the economy during recessions and moderating it during recovery to avoid overheating - depends on knowing where exactly in the cycle we are, and the amplitude of the present cycle.
Peak Month |
Through Month |
Duration(Peak to Peak) |
August 1, 1929 |
March 1, 1933 |
34 |
May 1, 1937 |
June 1, 1938 |
93 |
February 1, 1945 |
October 1, 1945 |
93 |
November 1, 1948 |
October 1, 1949 |
45 |
July 1, 1953 |
May 1, 1954 |
56 |
August 1, 1957 |
April 1, 1958 |
49 |
April 1, 1960 |
February 1, 1961 |
32 |
December 1, 1969 |
November 1, 1970 |
116 |
November 1, 1973 |
March 1, 1975 |
47 |
January 1, 1980 |
July 1, 1980 |
74 |
July 1, 1981 |
November 1, 1982 |
18 |
July 1, 1990 |
March 1, 1991 |
108 |
March 1, 2001 |
November 1, 2001 |
128 |
December 1, 2007 |
June 1, 2009 |
81 |
February 1, 2020 |
April 1, 2020 |
146 |
Table 1. Length of Business Cycles in the Postwar Period
Lastly, we have the noise component of a time series. One can think of the noise as including all movements that do not fit the description of the Trend, Seasonal, and Cyclical components. One example would be incidents like the 2021 Suez Canal obstruction by the Ever Given ship. Due to weather conditions and possibly technical or human errors, the container ship blocked the Suez Canal, which is a key route for trade between Asia and Europe, representing about 15 percent of global maritime trade volume. The six-day blockage is estimated to have caused damages of 2.1-2.7 billion dollars to the global economy (International Monetary Fund, 2024).
To understand why this event could be included in the noise component, let’s use a process of elimination. World GDP in 2021 was almost 100 thousand billion dollars (World Bank Group, 2024), so the estimated effect, while large in absolute terms, was not very significant in terms of the overall trend. This type of incident does not happen with some predetermined cyclicality, so it doesn’t fit the description of the seasonal component well. Similarly, even though the effect on GDP was substantial, it was not large enough to spark a recession and subsequent recovery, which is how we interpret the cyclical component of GDP.
Given the nature of the incident - being caused by a truly exogenous random event, but not significant enough to be classified as a cycle or a change in trend, the blockage of the Suez Canal by the Ever Given naturally fits the description of the noise component. In other words, one can think of the noise term as the remainder of the data after one takes into account the trend, seasonal, and cycle components, which is why it is also called the error term.
To finalize, we present the results of a trend-cycle decomposition for US GDP data using a method called the Hodrick-Prescott Filter. We also present data for unemployment - one can see that the two are mirrored versions of each other, as expected, as GDP and unemployment move in opposite directions along the business cycle.
Figure 6. Illustration of Trend-Cycle Decomposition through the Hodrick Prescott-Filter
References
- Bureau of Economic Analysis. (2006, January 13). Why and how are seasonal adjustments made? bea.gov. Why and how are seasonal adjustments made?
- International Monetary Fund. (2024, 03 07). Red Sea Attacks Disrupt Global Trade. IMF. https://www.imf.org/en/Blogs/Articles/2024/03/07/Red-Sea-Attacks-Disrupt-Global-Trade
- National Bureau of Economic Research. (n.d.). Business Cycle Dating | NBER. National Bureau of Economic Research. Retrieved December 3, 2024, from https://www.nber.org/research/business-cycle-dating
- National Bureau of Economic Research. (2023, 03 14). US Business Cycle Expansions and Contractions. NBER. https://www.nber.org/research/data/us-business-cycle-expansions-and-contractions
- World Bank Group. (2024, 12 03). GDP (Current US Dollars). World Bank. https://data.worldbank.org/indicator/NY.GDP.MKTP.CD