Facebook’s Prophet fits an additive model: y(t) = g(t) + s(t) + h(t) + ε. The trend g(t) can be linear or logistic (saturating). Seasonality s(t) uses Fourier series. Holidays h(t) handle irregular events. Changepoints are detected automatically.
Four years of growth at 1 a month, then 8 months at 3 a month. A trend model that extends the latest segment forecasts 227 two years out; the overall slope (1.13) gives 188. Prophet’s piecewise trend behaves like the first: whatever happened since the last changepoint is projected forward with confidence.
- Its intervals capture trend uncertainty only roughly, so they are often too narrow for long horizons.
- Independent comparisons have often found well-tuned exponential smoothing or ARIMA as accurate or better; treat Prophet as one candidate, not a default.
- Holiday and changepoint settings are powerful and easy to overfit.
t = np.arange(48) # four years, monthly y = np.where(t < 40, 100 + 1.0 * t, 140 + 3.0 * (t - 40)) # growth triples in the last 8 months h = 24 last_slope = (y[-1] - y[-9]) / 8 # the most recent trend segment overall = np.polyfit(t, y, 1)[0] f_last = y[-1] + last_slope * h f_overall = y[-1] + overall * h
Assumes import numpy as np and import pandas as pd. Each snippet simulates or makes up its own series, as the comments say.
The same idea with a library
# Python — Prophet from prophet import Prophet model = Prophet( changepoint_prior_scale=0.05, seasonality_mode='additive' ) model.fit(df[['ds', 'y']]) future = model.make_future_dataframe(periods=365) forecast = model.predict(future) model.plot_components(forecast)
- S. J. Taylor & B. Letham, “Forecasting at Scale”, The American Statistician 72(1), 2018
- Forecasting: Principles and Practice (3rd ed.), R. J. Hyndman & G. Athanasopoulos, OTexts, 2021
Last reviewed October 2026 · How this site checks its content · Report a mistake