271. SARIMAX

Seasonal ARIMA with exogenous regressors

SARIMAX(𝑝,𝑑,𝑞)(𝑃,𝐷,𝑄)𝑚

𝜑(𝐵)Φ(𝐵𝑚)(1−𝐵)𝑑(1−𝐵𝑚)𝐷𝑦𝑡=𝑐+∑𝑖=1𝑘𝛽𝑖𝑥𝑖,𝑡+𝜃(𝐵)Θ(𝐵𝑚)𝜀𝑡

Parameters: 𝜑1,…,𝜑𝑝, Φ1,…,Φ𝑃, 𝜃1,…,𝜃𝑞, Θ1,…,Θ𝑄, 𝛽1,…,𝛽𝑘, 𝑐, 𝜎2
Orders: 𝑝, 𝑃, 𝑑, 𝐷, 𝑞, 𝑄, 𝑚, 𝑘 (regressors)

Example: SARIMAX(1,0,0)(1,0,0)4+1exog

Given

  • Orders: 𝑝=1, 𝑃=1, 𝑑=0, 𝐷=0, 𝑞=0, 𝑄=0, 𝑚=4, 𝑘=1
  • Parameters: 𝜑1=0.5, Φ1=0.5, 𝛽1=0.5, 𝑐=0
  • Endogenous data 𝑦𝑡=𝑥𝑡:
𝑡12345678910111213141516
y𝑡121081114129131614111518161317
  • Exogenous regressor 𝑧𝑡:
𝑡12345678910111213141516
z𝑡12345678910111213141516

Step 1 — formula

Substitute orders into the SARIMAX recursion. With 𝑑=𝐷=0 and 𝑞=𝑄=0:

(1−𝜑1𝐵)(1−Φ1𝐵𝑚)𝑦𝑡=𝑐+𝛽1𝑧𝑡+𝜀𝑡

Expand the operator product (same as SARIMA, plus the exogenous term):

𝑦𝑡−𝜑1𝑦𝑡−1−Φ1𝑦𝑡−𝑚+𝜑1Φ1𝑦𝑡−𝑚−1=𝑐+𝛽1𝑧𝑡+𝜀𝑡

Forecast (set 𝜀𝑡=0):

𝑦̂𝑡=𝑐+𝛽1𝑧𝑡+𝜑1𝑦𝑡−1+Φ1𝑦𝑡−𝑚−𝜑1Φ1𝑦𝑡−𝑚−1

Innovation:

𝜀𝑡=𝑦𝑡−𝑦̂𝑡

Pre-compute the cross term: 𝜑1Φ1=0.5⋅0.5=0.25.

Step 2 — apply at 𝑡=6 (first usable step: needs 𝑦𝑡−𝑚−1=𝑦1)

Plug in 𝛽1=0.5, 𝜑1=0.5, Φ1=0.5, 𝑧6=6, 𝑦5=14, 𝑦2=10, 𝑦1=12:

𝑦̂6=0+0.5⋅6+0.5(14)+0.5(10)−0.25(12)𝑦̂6=3+7+5−3=12𝜀6=𝑦6−𝑦̂6=12−12=0

Step 3 — iterate

Each row adds the exogenous contribution 𝛽1𝑧𝑡 on top of the SARIMA forecast.

𝑡𝑦𝑡𝛽1𝑧𝑡SARIMA part: 0.5𝑦𝑡−1+0.5𝑦𝑡−4−0.25𝑦𝑡−5𝑦̂𝑡𝜀𝑡
6120.5(6)=30.5(14)+0.5(10)−0.25(12)=93+9=120
790.5(7)=3.50.5(12)+0.5(8)−0.25(10)=7.53.5+7.5=11−2
8130.5(8)=40.5(9)+0.5(11)−0.25(8)=84+8=121
9160.5(9)=4.50.5(13)+0.5(14)−0.25(11)=10.754.5+10.75=15.250.75
10140.5(10)=50.5(16)+0.5(12)−0.25(14)=10.55+10.5=15.5−1.5
11110.5(11)=5.50.5(14)+0.5(9)−0.25(12)=8.55.5+8.5=14−3
12150.5(12)=60.5(11)+0.5(13)−0.25(9)=9.756+9.75=15.75−0.75
13180.5(13)=6.50.5(15)+0.5(16)−0.25(13)=12.256.5+12.25=18.75−0.75
14160.5(14)=70.5(18)+0.5(14)−0.25(16)=127+12=19−3
15130.5(15)=7.50.5(16)+0.5(11)−0.25(14)=107.5+10=17.5−4.5
16170.5(16)=80.5(13)+0.5(15)−0.25(11)=11.258+11.25=19.25−2.25
17—0.5(17)=8.50.5(17)+0.5(18)−0.25(15)=13.758.5+13.75=22.25—

Here 𝑧𝑡=𝑡 is collinear with 𝑦’s linear trend, so 𝛽1𝑧𝑡 adds an extra drift on top of the AR/seasonal structure — forecasts now overshoot. With a less collinear regressor, 𝛽1 would correct part of 𝑦 that AR/seasonal lags miss.