E-Commerce Sales Forecasting by Comparing LSTM, SARIMA, and XGBoost Models

Authors

  • Irfan Khalid Superior University
  • Jawad Ahmad Faculty of Computer Science and Information Technology Superior University, Lahore, Pakistan
  • Saleem Mustafa Faculty of Computer Science and Information Technology Superior University, Lahore, Pakistan
  • Shahid Rafique Superior University

Keywords:

E-Commerce Sales Forecasting, Time-Series Prediction, Deep Learning in Sales Forecasting, SARIMA Model, XGBoost for Forecasting, Long Short-Term Memory (LSTM), Machine Learning for Sales Prediction, Data-Driven Demand Forecasting, Hybrid Forecasting Models, AI in Retail Analytics

Abstract

Accurate sales forecasting is very important in e-commerce, help businesses to manage inventory, adjustment in pricing, and run effective campaigns for advertisements. However, the unpredictable (nonlinear) and continuously changing nature of e-commerce sales data presents challenges for traditional forecasting techniques. While methods such as SARIMA (Seasonal Autoregressive Integrated Moving Average) have been used most in the industry, machine learning models such as XGBoost (Extreme Gradient Boosting) and deep learning models such as LSTM (Long Short-Term Memory) networks can provide alternative solutions. Although, these models lakes in handling complex sales trends.

This study compares SARIMA, XGBoost and LSTM using real-world e-commerce sales data. Three evaluation metrics that are used to assess these models: MAE (Mean Absolute Error), RMSE (Root Mean Squared Error), and R² (R-squared). The analysis and findings show that LSTM outperforms SARIMA and XGBoost, as it gets the lowest MAE (59,553.15) and RMSE (75,859.20) and a positive R² score of 0.561, these stats highlight its ability to capture nonlinear trends. On the other hand, SARIMA and XGBoost get negative R² values (-1.41 and -2.33, respectively), which is less accurate as compared to LSTM.

The results show the importance of deep learning, particularly LSTM, in e-commerce sales forecast enhancement. Businesses want to improve demand forecasting should prefer deep learning methods. Moreover, this research shows the limitations of traditional statistical and machine learning models when sales data is nonlinear. Future research should involve hybrid techniques that combine statistical models with deep learning which will improve forecasting accuracy.

References

Ahmad, N. R. (2025). Business ethics in the age of automation: How companies can balance profitability with responsibility. Bulletin of Management Review.

Ahmad, N. R. (2025). Blockchain beyond buzzwords: Evaluating its practical application in Pakistan’s supply chain systems. Naveed Rafaqat Ahmad.

Safdar, M. R. (2025). Punjab Sahulat Bazaars Authority: Pakistan’s only statutory body transitioned from company to authority, with Naveed Rafaqat as the force behind this distinguished milestone. https://doi.org/10.47067/real.v7i4.378

Hussain, T. (2025). Welfare without fiscal burden: Designing market-based public institutions in developing economies. Al-Aasar, 2(3), 332–344. https://doi.org/10.63878/aaj875

Idrees, Z. (2025). Achieving financial sustainability without subsidies: Viable business models for public sector innovation. https://doi.org/10.63878/cjssr.v3i2.1335

Hassan, F. U. (2025). Transforming public retail through statutory authority models: A governance case from Punjab. Al-Aasar, 2(2), 1360–1373. https://doi.org/10.63878/aaj874

Shehzad, K. (2025). Local governance synergies and public infrastructure: Advancing retail reform through institutional backing. https://doi.org/10.63878/cjssr.v3i4.1345

Khan, N. (2025). Gender inclusion and public access: Empowering women through retail governance interventions. https://doi.org/10.47067/real.v8i2.436

Ahmad, N. R. (2025). Digital transformation and competitive advantage: Leveraging AI in emerging market supply chains. Naveed Rafaqat Ahmad.

Ahmad, N. R. (2025). Exploring the blockchain technology adoption in financial services and its impact on operational efficiency and trust. Naveed Rafaqat Ahmad.

Ahmad, N. R. (2025). The impact of fintech startups on financial innovation and stability in Pakistan’s evolving financial landscape. Naveed Rafaqat Ahmad.

Hassan, F. U. (2025). Revolutionizing public retail: How Punjab Sahulat Bazaars Authority set new standards in Pakistan. https://doi.org/10.63878/cjssr.v2i04.1325

Ahmad, N. R. (2025). Leadership styles in the 21st century: A comparative analysis of transformational and transactional leadership. Journal for Social Science Archives, 3(1), 576–587. https://doi.org/10.59075/jssa.v3i1.142

Ahmad, N. R. (2025). Corporate social responsibility in the digital age: Navigating ethical marketing and consumer expectations. Research Journal of Psychology, 3(1), 287–297. https://doi.org/10.59075/rjs.v3i1.66

Ahmad, N. R. (2025). The role of neuromarketing in shaping consumer behavior: How businesses are using science to drive sales. Naveed Rafaqat Ahmad

Ahmad, N. R. (2025). Exploring diversity and inclusion in business: Unlocking the power of diverse teams. Naveed Rafaqat Ahmad

Ahmad, N. R. (2025). Exploring the impact of inflation on Pakistani society: Challenges, causes, and long-term consequences for economic stability and social well-being. Naveed Rafaqat Ahmad. https://doi.org/10.63075/7vtnh777

Ahmad, N. R. (2025). Model bazaars redefined: Punjab’s visionary step to authority status for public welfare. Naveed Rafaqat Ahmad

Ahmad, N. R. (2025). Financial inclusion: How digital banking is bridging the gap for emerging markets. Naveed Rafaqat Ahmad

Ahmad, N. R. (2025). Exploring the relationship between leadership styles and employee motivation in remote work environments. Naveed Rafaqat Ahmad

Ahmad, N. R. (2025). Exploring the role of digital technologies in enhancing supply chain efficiency: A case study of e-commerce companies. Indus Journal of Social Sciences, 3(1), 226–237. https://doi.org/10.59075/ijss.v3i1.618

Hussain, T. (2025). Redefining affordability: Evidence from Punjab Model Bazaars under Naveed Rafaqat’s leadership in supplying edibles below government-notified rates. https://doi.org/10.63878/cjssr.v3i3.1310

Downloads

Published

2025-09-30