Time series forecasting plays a critical role in understanding trends, planning resources, and making data-driven decisions. In this project, I applied two popular statistical models—ARIMA and SARIMAX—to analyze and forecast a time-dependent dataset. The aim was to evaluate how well each model performs, especially in the presence of seasonality.

Project Objective

• Explore time series patterns and seasonality
• Build forecasting models using ARIMA and SARIMAX
• Compare their performance and select the better-fit model for accurate future predictions

Workflow Overview

1. Data Preprocessing

The dataset was cleaned and prepared for time series analysis:
• Converted date column to proper datetime format
• Set it as the index to preserve temporal ordering
• Checked for null values and ensured data consistency

2. Trend and Seasonality Analysis

Initial visualizations revealed the presence of a clear upward trend and repeating seasonal
cycles, making it essential to test both ARIMA (for trend) and SARIMAX (for seasonality).

3.Modeling & Forecasting

ARIMA Model

ARIMA was implemented first to model trend-based behavior. After tuning the (p, d, q)
parameters, the model was trained and used to forecast future values.
Result: ARIMA performed reasonably well but struggled to capture seasonal fluctuations.

SARIMAX Model

Next, I used SARIMAX which extends ARIMA by including seasonal parameters (P, D, Q, s). It
handled seasonality effectively and produced smoother, more accurate forecasts aligned with
the actual values.

4.Model Comparison

• ARIMA: Good for capturing long-term trends, but lacked accuracy in seasonal regions
• SARIMAX: Outperformed ARIMA by adapting to repeating patterns and improving
forecast reliability

Visual comparisons of actual vs. predicted values made the performance difference clear
SARIMAX forecasts followed the real data much more closely.

Conclusion

This project highlights how choosing the right time series model based on data behavior (trend
vs. seasonality) can significantly impact forecast accuracy. While ARIMA is useful for trend-only
data, SARIMAX is more versatile and ideal when seasonality is present.