Demand Forecasting in Supply Chain Systems Using Machine Learning
Abstract
Accurate demand forecasting is central to inventory optimization and resource allocation in modern retail. While traditional Enterprise Resource Planning (ERP) systems often rely on rigid heuristic-based rules or simple moving averages, this paper presents an ERP-native framework that bridges the gap between transactional data storage and predictive intelligence. By integrating Odoo 17 with a FastAPI microservice, we developed a SARIMAX-XGBoost ensemble engine using daily transaction data from the Corporación Favorita dataset, with experimental validation conducted on a selected store–product family time series. The hybrid modeling approach combines SARIMAX for capturing linear seasonal trends with XGBoost for identifying complex non-linear demand patterns influenced by external variables. The feature engineering process transforms raw ERP-style data into forecasting inputs, including holiday calendars, oil price fluctuations, promotions, and lagged rolling statistics. To improve evaluation rigor, the system was validated using a five-fold rolling-origin cross-validation protocol and a strict 30-day holdout window, showing improved performance over baseline forecasting methods on RMSE and MAPE metrics. Beyond predictive accuracy, the solution is designed for operational utility: forecasts are delivered within the Odoo interface through color-coded risk alerts and dynamic KPI dashboards. The stack is containerized using Docker, supporting portability and future scalability for downstream applications such as automated replenishment and inventory policy simulation.