# Seasonality

Learn how to add seasonality to forecasts.

We'll cover the following

## Using seasonality for forecasting

Seasonality refers to periodical patterns in the data, and it's a critical component of forecasting, particularly for data in which seasonal variations are big and consistent. Even though we can identify it visually, to use it for forecasting, we need a more complex model such as SARIMAX.

SARIMAX combines multiple time series components—Seasonality, Autoregression, Integration, Moving Average, and Exogenous variables. It takes essentially two parameters—order, which refers to autoregression, integration, and moving average, and seasonal_order, which refers to seasonality. To use it for seasonality purposes only, all we need to do is set order = (0,0,0) and work only with seasonal_order.

Let's understand how seasonal_order(P, D, Q, M) works by calling the function parameters $P, D,Q,M$, in that order:

• $P$ is the seasonal component's autoregressive order.

• $D$ is the seasonal component's integration order.

• $Q$ is the seasonal component's moving average order.

• $M$ is the periodicity. Since we have monthly data, we set it to 12.

We always need to set $M$ and at least one of the three others to implement seasonality, so let's now try working with each of them separately to see how they impact the results.

### Seasonal component's autoregressive order

This is the $P$ in seasonal_order(P, D, Q, M) , so let's set order = (0,0,0) and seasonal_order=(1,0,0,12).

Get hands-on with 1200+ tech skills courses.