Components of Time Series
In this post, let us explore the four components of time series data.
- Trend (T)
- Cyclicality (C)
- Seasonality (S)
- Irregular component (I)
Let us look at these components one by one.
- Trend (Secular Trend)
Trend is long term movement of the time series. Trend can be increasing or decreasing or absent (that means series is oscillating around its mean). There are different ways with which we can measure the trend. To decide on which type of trend to fit, you can refer to the picture given below.
- Cyclical variation and Seasonal variation
These two components denote periodic repetitive movements in the time series. The difference being, in cyclical variation, period of oscillation is greater than one year while in seasonality it is lesser than a year. For a daily time series data, the period of oscillation for seasonality is 7 days, for monthly data it is 12 months. Cyclical fluctuation is due to long term cyclical movements such as business cycles.
- Irregular component
It is the random/unpredictable component after removing other three components. It can’t be estimated.
Additive and Multiplicative Models
Any time series is a mixture of these components. We can decompose the time series data using either additive model or multiplicative model.
- Additive Model: In this, assumption is time series data Y=T+C+S+I.
- Multiplicative Model: The assumption is time series data Y=T*C*S*I
The implicit assumption under additive model is that, for a monthly data if the difference between let us say, January and July is constant over years. However, in multiplicative model, not the absolute difference but the proportion (or percentage change) is assumed to be constant over years. Those who are interested can visit this blog.
Time series Decomposition in Python
To demonstrate time series decomposition, I downloaded the airline passengers data from this site.
There are two ways of decomposing time series data.
-
Using seasonal_decompose method: We can specify additive or multiplicative model for decomposing the time series data. Here the time series is decomposed in to trend-cyclical component, seasonal component and irregular component as shown in the picture below.
-
Using UnobservedComponents method: Here we can decompose a time series data into trend, seasonal, cyclical and irregular components.
For more, you can refer these links (1, 2, 3, and 4).
Summary
In this post, we have learnt about TCSI components, additive and multiplicative models and examples of time series decomposition in Python.
If you have any questions or suggestions, feel free to share. I will be happy to interact.