Is it possible to do multivariate multi-step forecasting using FB Prophet?
Master System Design with Codemia
Enhance your system design skills with over 120 practice problems, detailed solutions, and hands-on exercises.
In recent years, the demand for accurate forecasting has increased across various domains like finance, healthcare, sales, and more. Facebook Prophet is one of the popular tools used for time-series forecasting. It's designed for univariate time-series data, which typically means working with a single time-dependent variable. But what if you have more than one variable to consider, or need predictions over multiple future steps? This article explores whether and how multivariate multi-step forecasting might be achieved using FB Prophet.
Understanding FB Prophet
FB Prophet is an open-source library developed by Facebook, specifically designed for univariate time-series forecasting. It uses an additive model where non-linear time-series data with daily observations get decomposed into trend, seasonality, and holiday components:
Where:
- is the trend function,
- represents seasonality,
- covers holidays,
- is the error term.
Prophet has built-in capabilities to deal with missing data, outliers, and shifts in the seasonal patterns, which often pose challenges in time-series forecasting.
The Challenge: Multivariate Multi-step Forecasting
Multivariate Forecasting
Traditional multivariate time-series involve multiple endogenous variables. For instance, predicting a company's monthly revenue could depend not just on past revenue data but also on variables like ad spend, website traffic, etc.
Multi-step Forecasting
Multi-step forecasting refers to predicting multiple future steps (e.g., the next 7 days or 12 months) in advance. This is different from one-step forecasts that predict only the immediate next value.
Limitations of FB Prophet
By design, FB Prophet is not intended for multivariate forecasting, as it only allows one dependent variable . However, it can handle additional regressors, which are treated as exogenous variables. Prophet does effectively manage multi-step forecasting for the main univariate time-series but still adheres to a univariate framework at its core.
Approaches to Extend Prophet
Below are some strategies to extend Prophet for multivariate forecasting:
Feature Engineering
- Include Additional Regressors: While Prophet mainly focuses on one main time-series, you can add influential exogenous variables as additional regressors. These will be considered as external factors influencing the primary time-series.
- Temporal Features: You can engineer additional temporal features such as lags, rolling means, etc., and include them as regressors. Though this doesn't make the process truly multivariate, it does enable more nuanced forecasting.
Hybrid Models
- Combine with Machine Learning Models: You can use Prophet to forecast the primary series and then employ machine learning models like Random Forests or Neural Networks to capture the complex interactions between multiple variables for the residuals.
- Two-step Modeling: First, use Prophet for the primary time-series prediction, then use those predictions, in combination with other relevant variables, as features in another model designed to handle multivariate data.
Multi-step Forecasting Using Prophet
Although Prophet inherently supports multi-step prediction by generating a future dataframe, it's important to recognize that the accuracy of future steps may degrade over longer horizons due to autocorrelation and other complexities not captured in a univariate perspective.
Here's an example of Prophet usage for multi-step forecasting:

