# Seasonality

Learn how to add seasonality to forecasts.

## 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—**S**easonality, **A**uto**r**egression, **I**ntegration, **M**oving **A**verage, and E**x**ogenous 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$ 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

### Seasonal component's autoregressive order

This is the `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.