Autoregressive Integrated Moving Average with Exogenous Variables (ARIMAX)
ARIMAX is ARIMA with one or more exogenous variables added: outside factors that influence the series but are not explained by its own history, such as price, promotions, weather, holidays or economic indicators. It lets the forecast respond to known events instead of repeating the pattern of the past.
The idea
Forecast = ARIMA part (own history) + β1 × driver 1 + β2 × driver 2 + …
Each coefficient β measures how many units demand changes when the driver changes by one unit, holding the ARIMA structure fixed.
Worked example (illustrative coefficients)
An ARIMA model gives a baseline forecast of 100 units for next week. The fitted ARIMAX has two drivers with these coefficients: promotion flag (1 = on): +25 units, and price: −4 units per $1 increase. Next week there is a promotion and the price is $2 above the usual price.
Forecast = 100 + 25 × 1 + (−4) × 2 = 100 + 25 − 8 = 117 units
The ARIMA baseline alone would have said 100 and missed the promotion lift. Coefficients like these would be estimated by the software, and you should check that they have sensible signs and sizes.
Typical drivers in supply chain
| Driver | Example effect |
|---|---|
| Promotion or discount flag | Demand lift during campaign |
| Price | Demand falls as price rises |
| Holiday or event flag | Peaks around festivals, sporting events |
| Weather | Beverages, apparel, heating products |
| Economic indicators | Construction or auto demand |
| Competitor activity | Share shifts |
How to build one
- Prepare a clean demand series and aligned driver series with the same time frequency.
- Check that drivers are really related to demand, and are not too correlated with each other.
- Make the series stationary as for ARIMA.
- Fit the model and review coefficients and residuals.
- Validate on a hold-out period using the actual driver values you would have known at the time.
from statsmodels.tsa.statespace.sarimax import SARIMAX
model = SARIMAX(y, exog=X, order=(1, 1, 1)).fit()
forecast = model.forecast(steps=4, exog=X_future)
The big requirement: future values of the drivers
To forecast, you must supply the future driver values. Promotions and holidays are planned, so that is fine. But if the driver is itself uncertain (next month’s weather, a competitor’s price), you must forecast it first or use scenarios, which adds error. See Scenario Planning.
ARIMA vs. ARIMAX vs. regression
| Method | Uses own history | Uses drivers | Best for |
|---|---|---|---|
| ARIMA | Yes | No | Stable series with autocorrelation |
| ARIMAX | Yes | Yes | Demand affected by planned events or prices |
| Regression | Optional | Yes | Explaining driver effects, short series |
Common mistakes
- Including drivers whose future values are unknown.
- Including too many drivers for the amount of data, causing over-fitting.
- Reading coefficients as proof of cause and effect.
- Forgetting to refit after pricing or promotion strategy changes.
Key takeaways
- ARIMAX = ARIMA plus external drivers.
- Coefficients show the effect of each driver on demand.
- You need reliable future values of the drivers.
- Validate with realistic hold-out tests.
Put it into practice
Ready-made tools that apply this topic:
Frequently asked questions
What is ARIMAX?
ARIMAX is an ARIMA model extended with exogenous variables, such as price or promotions, so that the forecast reflects both the series history and outside drivers.
What is an exogenous variable?
A variable from outside the series that influences it, for example a promotion flag, price, holiday or temperature.
What is the difference between ARIMA and ARIMAX?
ARIMA uses only the series history. ARIMAX adds external variables, which lets the model respond to planned events and price changes.
What do I need to forecast with ARIMAX?
Future values of every exogenous variable. Planned events are easy to supply, while uncertain drivers such as weather need forecasts or scenarios.
How many drivers can I include?
Only as many as the data supports. With short history, too many drivers cause over-fitting, so start with a few strong, well-understood ones.
