Time Series2018beginner10 min read
Forecasting at Scale
التنبؤ على نطاق واسع
Taylor, S. J. · Letham, B. — The American Statistician
The problem
By 2017, organizations needed thousands of reliable forecasts — for planning, goal setting, and anomaly detection — but faced two problems. Fully automatic methods like ARIMA were brittle and could not easily incorporate domain knowledge such as holidays or product launches. Meanwhile, analysts who could build good forecasts were rare, because modeling requires specialized expertise. The gap between demand for forecasts and the ability to produce them was growing fast.
The contribution
Prophet: a decomposable time series model built as a (GAM) with three interpretable components — a piecewise growth (linear or logistic), Fourier-based multi-period , and holiday effects. The model fits fast via L-BFGS or full in Stan, and its parameters are designed so that analysts without statistics training can adjust them using domain knowledge. The paper also introduces Simulated Historical Forecasts (SHFs) for automated, scalable evaluation and comparison of forecasting methods.
The impact
Prophet became one of the most widely adopted forecasting tools in industry, powering thousands of forecasts at Facebook and across organizations worldwide. Its open-source implementation in Python and R lowered the barrier to quality forecasting for non-specialists. The philosophy influenced how teams think about the forecasting pipeline — not as a black box, but as a collaboration between human expertise and statistical models. Prophet also popularized the GAM-based approach for business time series.
Imagine predicting tomorrow's traffic on a busy highway. You would not try to capture every car — instead, you would layer three transparent maps: one showing the long-term growth of the city, one showing rush-hour and weekend patterns that repeat every week, and one marking holidays when traffic drops. Stack the maps, and you have a surprisingly good — without needing to be a traffic engineer.
Prophet does exactly this for any business metric: it separates the signal into a trend sheet, a seasonality sheet, and a holiday sheet, then adds them up.
The problem: forecasting at scale is a human problem
When Taylor and Letham say "at scale," they do not mean computational scale — fitting thousands of time series is straightforward to parallelize. They mean three kinds of human scale:
- Many people need to make forecasts, most without training in time series methods.
- Many varieties of time series, each with idiosyncratic features like product launches or regional holidays.
- Many forecasts must be monitored, compared, and corrected efficiently.
The traditional pipeline — hand an expert a single time series to study for days — collapses when an organization needs hundreds of forecasts per week. The authors' solution is an analyst-in-the-loop system: an interpretable model whose parameters an analyst can adjust with domain knowledge, combined with automated evaluation tools that surface the forecasts most likely to need human attention.
The core idea: decompose time series into interpretable layers
Prophet models a time series as the sum of three components plus noise. Think of it as three transparent layers stacked on top of each other, each capturing a different pattern. The growth layer captures the long-term trajectory — is the metric going up, flattening, or declining? The seasonality layer captures repeating cycles — weekly patterns, yearly patterns, or both. The holiday layer captures irregular spikes and dips from holidays and special events. Whatever is left over goes into the noise term .
This additive structure is what makes the model interpretable: you can look at each layer separately and understand what is driving the forecast.
Growth: modeling the long-term trajectory
The growth component captures the non-periodic trend — the big picture of where the metric is heading. Prophet offers two growth models depending on the nature of the data.
Logistic growth is used when there is a natural upper limit — a . For example, the number of Facebook users in a country is bounded by the number of people with internet access. The classic logistic curve has the S-shape of population growth: slow start, rapid rise, then saturation.
Linear growth is used when no natural saturation exists — for example, revenue or page views that could in principle grow indefinitely. This is simply a piecewise line with slope changes at key moments.
In both cases, Prophet allows the growth rate to change at specific points called changepoints. A product launch might accelerate growth; a competitor's entry might slow it. Rather than fitting a single curve that cannot bend, Prophet fits a flexible piecewise curve that can adapt to shifts in the underlying dynamics.
Seasonality: capturing repeating rhythms with Fourier series
Business metrics reflect human behavior, and humans are creatures of routine. People check social media more on weekdays, shop more before holidays, and travel more in summer. These repeating patterns are the seasonality component .
Prophet approximates seasonality using a — a sum of sine and cosine waves at different frequencies. Think of it like tuning a radio: each frequency captures a different rhythmic cycle. For weekly seasonality, Prophet uses Fourier terms (capturing the broad weekday vs weekend pattern). For yearly seasonality, terms are typical (capturing finer distinctions like summer vacations and back-to-school periods).
The key advantage: you do not need to hand-specify what day-of-week effects look like. The Fourier basis automatically learns the shape from data.
Holidays: handling irregular calendar shocks
Holidays like Thanksgiving (fourth Thursday in November) or the Super Bowl do not fall on the same date each year, so smooth seasonal curves cannot model them. Prophet handles this with a separate holiday component.
The analyst provides a table of holiday names and dates — past and future. Each holiday gets its own parameter that measures its impact on the metric. The model can also include windows of days around a holiday. For instance, people behave differently in the days leading up to Christmas and after it.
This is one of Prophet's most practical features: by simply listing the holidays relevant to a country or business, the model automatically learns their effects without any statistical tuning.
Fitting: fast estimation with analyst-friendly parameters
Prophet frames forecasting as a curve-fitting problem rather than a generative time series model. This is a deliberate trade-off: it gives up the temporal dependence modeling of ARIMA (where each observation depends on the previous ones) in exchange for speed, flexibility, and interpretability.
The model is implemented in Stan and can be fit in two ways. The default is MAP estimation using L-BFGS — the same optimizer used in — which takes seconds even for years of daily data. When full uncertainty quantification is needed, Prophet supports full Bayesian inference via Hamiltonian Monte Carlo sampling in Stan.
The critical design choice is that the model has a small number of analyst-interpretable parameters. The table below summarizes them. An analyst does not need to understand Fourier series or Laplace priors — they just turn a knob labeled "how flexible should the trend be?" or "how strong is the seasonality?"
Simplified to show the idea — not the real implementation.
# Priors k ~ Normal(0, 5) # base growth rate b ~ Normal(0, 5) # offset delta ~ Laplace(0, tau) # changepoint rate adjustments beta ~ Normal(0, sigma) # seasonality coefficients
# Likelihood (logistic growth version) y ~ Normal(
C / (1 + exp(-(k + A*delta) * (t - (b + A*gamma))))
+ X*beta, # seasonality + holidays
epsilon
)Evaluation: Simulated Historical Forecasts
How do you know if your forecast model is any good? You cannot use standard because time series observations are not exchangeable — you cannot randomly shuffle dates.
Prophet introduces Simulated Historical Forecasts (SHFs): you pick multiple cutoff dates in the past, pretend you only have data up to that point, generate a forecast for the next days, then compare the forecast to what actually happened. This simulates the errors you would have made if you had used this method at that point in history.
By computing SHFs across multiple cutoff dates and comparing against baseline methods (naive, seasonal naive, ARIMA, exponential smoothing), Prophet can automatically surface forecasts that are performing poorly and flag them for human review. This is what makes the analyst-in-the-loop system work at scale: instead of checking every forecast, the analyst focuses on the ones the system identified as problematic.
Prophet vs ARIMA: different philosophies
ARIMA and Prophet represent fundamentally different approaches to time series. ARIMA is a generative model that explicitly accounts for the temporal dependence structure — each value depends on previous values. It is mathematically elegant and has strong inferential properties, but it requires regularly spaced data, careful differencing to achieve stationarity, and expertise to select orders .
Prophet treats forecasting as curve fitting. It does not model the autocorrelation structure at all. Instead, it directly models the patterns humans care about — trend, seasons, and holidays — and leaves the residuals as unstructured noise. This makes it less rigorous theoretically, but far more practical for the analyst-in-the-loop scenario where speed, interpretability, and flexibility matter more than inferential guarantees.
Prophet can also handle missing data naturally (no interpolation needed), irregular spacing, and multiple seasonality periods — all of which are painful with ARIMA.
Timeline: from Prophet to modern forecasting
2017
Prophet released
Taylor and Letham release Prophet as open-source software in Python and R. The paper appears on PeerJ Preprints.
2018
Published in The American Statistician
The paper is published in its final form. Prophet is already widely adopted at Facebook for capacity planning and goal setting across thousands of time series.
2019
DeepAR and neural forecasting
Amazon's DeepAR uses autoregressive RNNs to produce probabilistic forecasts, representing a shift toward deep learning methods for time series.
2020
N-BEATS
A pure deep-learning architecture for time series forecasting that outperforms statistical methods on the M4 competition, without any time-series-specific inductive biases.
2023
Foundation models for time series
TimesFM and other foundation models apply the pre-train → fine-tune paradigm to time series, training on millions of diverse series and achieving zero-shot forecasting.
CitationTaylor, S. J. and Letham, B.. Forecasting at Scale. The American Statistician, 2018.
Terms in this paper
- Forecastالتنبؤ
- Additive Modelالنموذج الإضافي التراكمي
- Generalized Additive Modelالنموذج الجمعي المعمَّم
- Decompositionالتفكيك
- Seasonalityموسمية
- Changepointنقطة تحوّل
- Fourier Seriesمتسلسلة فورييه
- Logistic Regressionالانحدار اللوجستي الاحتمالي
- Regularizationالضبط الهيكلي
- Cross-Validationالتحقق المتقاطع من الأداء
- Overfittingفرط التخصيص
- Hyperparameterالمعلمة الفائقة
- Bayesian Inferenceالاستدلال البايزي
- Time Seriesسلسلة زمنية
- Trendاتجاه