Skip to content
ZENITH_LABS
All Insights
DATA ENGINEERING10 min read

Time-Series Forecasting in Production: Prophet, SARIMAX, and LSTM Compared

A practitioner's comparison of three major forecasting approaches — statistical, classical ML, and deep learning — drawn from a production system built for one of Egypt's largest banks.

By IEEE-published AI researcher & founder of Zenith Labs

TL;DR

  • Prophet is the fastest path to a production-ready forecast for business time series with strong seasonality — but it assumes additive patterns and struggles with abrupt structural breaks.
  • SARIMAX adds the ability to model external regressors (holidays, economic indicators, operational triggers) and handles complex seasonal structures better than Prophet in many financial contexts.
  • LSTMs capture non-linear temporal dependencies that statistical models cannot — but require substantially more data, tuning, and infrastructure. Use them when your patterns are too complex for statistical models to capture.

01The Business Problem: ATM Cash Forecasting

The forecasting system built for the National Bank of Egypt had to answer one deceptively simple question: how much cash will each ATM in the network need, and when? Getting this wrong in either direction is costly. Overstocking ties up capital and increases security risk. Understocking results in empty ATMs and direct reputational damage.

The data presented every classical forecasting challenge: strong weekly and monthly seasonality driven by payroll cycles and public holidays, intermittent demand spikes from external events, and structural differences between ATM locations — airport machines behave nothing like suburban branch machines. The system needed to be accurate, interpretable for operations teams, and maintainable by engineers who were not data scientists.

02Prophet: Fast, Interpretable, and Surprisingly Robust

Facebook's Prophet library was the first model deployed in the ATM system — and for good reason. It handles multiple seasonality patterns (weekly, monthly, yearly) out of the box, requires minimal hyperparameter tuning, and produces human-readable decompositions of trend, seasonality, and holiday effects. Operations managers can look at the decomposed forecast and immediately understand why the model predicts a spike on a given date.

Prophet performed well on machines with stable demand patterns. Its key limitation emerged on ATMs with irregular usage — large variance, structural breaks after network changes, or demand driven by external events not captured in the holiday calendar. In these cases, Prophet's additive decomposition assumption breaks down and its uncertainty intervals become unreliably wide.

03SARIMAX: Statistical Rigour With External Signals

SARIMAX (Seasonal AutoRegressive Integrated Moving Average with eXogenous variables) was applied where Prophet struggled. Its ability to incorporate external regressors was the critical differentiator: public holiday flags, payday indicators, and branch-specific operational variables were fed as exogenous inputs, allowing the model to condition its forecasts on known future events.

The model required more careful specification — identifying the correct (p, d, q)(P, D, Q) order through ACF/PACF analysis and information criteria is a non-trivial process — but the resulting forecasts were more accurate on irregular machines and provided tighter prediction intervals. SARIMAX became the primary model for high-variance ATM locations.

04LSTM: When Non-Linearity Matters

Long Short-Term Memory networks were evaluated as a third option for capturing non-linear temporal dependencies that neither Prophet nor SARIMAX could model. The LSTM was trained on rolling windows of historical cash demand with additional features (day of week, days until payday, ATM category, location type) as input channels.

The LSTM achieved the best raw accuracy on the most complex ATMs, but at a significant operational cost: the model is a black box to operations teams, requires a GPU for efficient inference, and is brittle to distribution shifts when demand patterns change. The production decision was to use the LSTM as a cross-validation reference rather than a primary serving model — its output was used to detect when the statistical models were underperforming and flag those ATMs for manual review.

05The Practical Recommendation

For most business forecasting problems — sales, inventory, demand, capacity — start with Prophet or SARIMAX. They are fast to build, easy to interpret, and accurate enough for the vast majority of use cases. Add LSTM or Transformer-based models only when you have strong evidence that non-linear dynamics are present and you have the data volume (typically 2+ years of high-frequency observations) to train them reliably.

The most important engineering decision in a forecasting system is not the model choice — it is the data pipeline. Clean, consistent historical data with well-labelled anomalies and events will improve any model more than switching to a more complex architecture.

ProphetSARIMAXLSTMTime-SeriesPythonETLForecasting

Apply This to Your Business

Ready to put this into practice?

Every engagement starts with a structured discovery session. No commitment required.

Start a project