LOGISTICS AND TRANSPORTATION: FREIGHT DEMAND FORECASTING USING SARIMA AND XGBOOST
Abstract
Accurate freight demand forecasting is essential for improving logistics planning and supporting decision-making in e-commerce supply chains. This study compares the performance of two forecasting approaches—Seasonal Autoregressive Integrated Moving Average (SARIMA) and Extreme Gradient Boosting (XGBoost)—for predicting daily freight demand measured by transported weight. The research followed the CRISP-DM methodology using the Brazilian Olist public e-commerce dataset. After data preprocessing, exploratory analysis, stationarity testing, and feature engineering, multiple SARIMA and XGBoost models were developed and evaluated using chronological train-test splitting, cross-validation, and Mean Absolute Percentage Error (MAPE). The SARIMA models incorporated seasonal differencing and Box-Cox transformations, whereas the XGBoost models included calendar-based variables, moving averages, and moving standard deviations. The results demonstrate that feature engineering substantially improved predictive performance. The best XGBoost model achieved a MAPE of 3%, considerably outperforming the best SARIMA model, whose predictive accuracy remained limited despite data transformations. These findings indicate that machine learning techniques combined with temporal feature engineering provide superior freight demand forecasts for e-commerce logistics. The proposed approach offers a practical decision-support tool for transportation planning, resource allocation, and operational efficiency while providing a reproducible computational workflow through publicly available source code and processed data.