ECON 4354/6354 — Homework 3: Solutions

Published

November 9, 2026

  • This is one set of acceptable answers. In Question 4, other well-defended model choices also earn full credit.
  • The questions are adapted from Diebold, Forecasting, Chapter 7.

Throughout, \(\varepsilon_t \sim WN(0, \sigma^2)\) and \(L\) is the lag operator.

0. Setup

library(tidyverse)
library(fpp3)

smu_blue <- "#354CA1"
smu_red  <- "#CC0035"
theme_set(theme_minimal(base_size = 12))

1. Shapes of Correlograms

i. Inverse roots, stationarity and invertibility

Write each process as \(\Phi(L)\,y_t = \Theta(L)\,\varepsilon_t\). It is covariance stationary if every inverse root of \(\Phi(L)\) lies inside the unit circle, and invertible if every inverse root of \(\Theta(L)\) does. A polynomial equal to \(1\) has no roots and imposes no condition.

1 / polyroot(c(1, -1.05, -0.09))   # (a)  1 - 1.05L - 0.09L^2
[1]  1.12966933+0i -0.07966933+0i
1 / polyroot(c(1, -0.4))           # (b)  1 - 0.4L
[1] 0.4+0i
1 / polyroot(c(1, -0.7))           # (c)  1 - 0.7L
[1] 0.7+0i
Process Inverse roots Covariance stationary? Invertible?
(a) AR(2), \(\phi_1 = 1.05\), \(\phi_2 = 0.09\) AR: \(1.130\), \(-0.080\) No: \(1.130\) lies outside the unit circle Yes (no MA part)
(b) MA(1), \(\theta = -0.4\) MA: \(0.4\) Yes (no AR part) Yes
(c) AR(1), \(\phi = 0.7\) AR: \(0.7\) Yes Yes (no MA part)

For (a), factor \(1 - 1.05L - 0.09L^2 = (1 - \lambda_1 L)(1 - \lambda_2 L)\). Then \(\lambda_1 + \lambda_2 = 1.05\) and \(\lambda_1 \lambda_2 = -0.09\), so the inverse roots solve \(\lambda^2 - 1.05\lambda - 0.09 = 0\): \(\lambda = (1.05 \pm \sqrt{1.4625})/2\), that is, \(1.130\) and \(-0.080\).

ii. Autocorrelation and partial autocorrelation functions

  1. With an inverse root of \(1.13\), shocks are amplified rather than damped: the moving-average weights grow like \(1.13^j\), so a process started at some date has a variance that grows like \(1.13^{2t}\). Its moments depend on \(t\). Applying the AR(2) formulas anyway gives \(\rho(1) = \phi_1/(1 - \phi_2) = 1.05/0.91 = 1.15\), which no correlation can be.
ARMAacf(ar = c(1.05, 0.09), lag.max = 4)   # no stationarity check
       0        1        2        3        4 
1.000000 1.153846 1.301538 1.470462 1.661123 
set.seed(1)   # one realization of (a), started at zero
y_a <- stats::filter(rnorm(200), c(1.05, 0.09), method = "recursive")
round(acf(y_a, lag.max = 4, plot = FALSE)$acf[-1], 3)    # about 1.13^(-tau)
[1] 0.885 0.783 0.692 0.612

A sample correlogram can still be computed from a realization, but it describes the explosion, not a cycle. The path is dominated by its \(1.13^t\) component, so \(\hat\rho(\tau) \approx 1.13^{-\tau} = 0.885^{\tau}\), with a single partial autocorrelation spike: the look of a stationary AR(1). Check the roots, and plot the series, before reading a correlogram.

(b) MA(1) with \(\theta = -0.4\): the autocorrelations cut off, the partial autocorrelations decay. \(y_t\) and \(y_{t-\tau}\) share a shock only when \(\tau = 1\), so \(\rho(1) = \theta/(1 + \theta^2) = -0.4/1.16 = -0.345\) and \(\rho(\tau) = 0\) for \(\tau \geq 2\): a single negative spike. Because the process is invertible, it has the autoregressive representation \((1 - 0.4L)^{-1} y_t = \varepsilon_t\), that is, \[ y_t = -0.4\, y_{t-1} - 0.16\, y_{t-2} - 0.064\, y_{t-3} - \cdots + \varepsilon_t , \] in which every lag carries information. The partial autocorrelations therefore never cut off. They decay geometrically, and all are negative because \(\theta < 0\): \(-0.345, -0.135, -0.054, \ldots\)

(c) AR(1) with \(\phi = 0.7\): the autocorrelations decay, the partial autocorrelations cut off. \(\rho(\tau) = 0.7^{\tau}\), that is, \(0.70, 0.49, 0.34, \ldots\), a smooth one-sided geometric decay, because each period carries a fraction \(0.7\) of the previous value forward. The partial autocorrelations are \(p(1) = 0.7\) and \(p(\tau) = 0\) for \(\tau \geq 2\): once \(y_{t-1}\) is in the regression, earlier lags add nothing.

pop_corr <- function(ar = numeric(0), ma = numeric(0), label, lag_max = 10) {
  tibble(lag     = 1:lag_max,
         ACF     = ARMAacf(ar = ar, ma = ma, lag.max = lag_max)[-1],
         PACF    = ARMAacf(ar = ar, ma = ma, lag.max = lag_max, pacf = TRUE),
         process = label)
}

bind_rows(pop_corr(ma = -0.4, label = "(b)  MA(1), θ = −0.4"),
          pop_corr(ar = 0.7,  label = "(c)  AR(1), φ = 0.7")) |>
  pivot_longer(c(ACF, PACF), names_to = "fn") |>
  ggplot(aes(lag, value)) +
  geom_hline(yintercept = 0, colour = "grey50") +
  geom_col(fill = smu_blue, width = 0.5) +
  facet_grid(fn ~ process) +
  scale_x_continuous(breaks = 1:10) +
  coord_cartesian(ylim = c(-1, 1)) +
  labs(x = "displacement", y = NULL,
       title = "Population autocorrelations and partial autocorrelations")

2. The Autocovariance Function of the MA(1)

(a)

By linearity of expectation, \[ \gamma(\tau) = E(\varepsilon_t \varepsilon_{t-\tau}) + \theta\, E(\varepsilon_t \varepsilon_{t-\tau-1}) + \theta\, E(\varepsilon_{t-1} \varepsilon_{t-\tau}) + \theta^2 E(\varepsilon_{t-1} \varepsilon_{t-\tau-1}). \] Each term has the form \(E(\varepsilon_s \varepsilon_r)\). Because white noise has mean zero, \(E(\varepsilon_s \varepsilon_r) = \operatorname{cov}(\varepsilon_s, \varepsilon_r)\), which equals \(\sigma^2\) when \(s = r\) (constant variance) and \(0\) when \(s \neq r\) (no serial correlation). A term therefore survives only if its two dates coincide:

\(E(\varepsilon_t \varepsilon_{t-\tau})\) \(\theta E(\varepsilon_t \varepsilon_{t-\tau-1})\) \(\theta E(\varepsilon_{t-1} \varepsilon_{t-\tau})\) \(\theta^2 E(\varepsilon_{t-1} \varepsilon_{t-\tau-1})\) \(\gamma(\tau)\)
nonzero if \(\tau = 0\) never, as \(\tau \geq 0\) \(\tau = 1\) \(\tau = 0\)
\(\tau = 0\) \(\sigma^2\) \(0\) \(0\) \(\theta^2 \sigma^2\) \((1 + \theta^2)\,\sigma^2\)
\(\tau = 1\) \(0\) \(0\) \(\theta \sigma^2\) \(0\) \(\theta \sigma^2\)
\(\tau \geq 2\) \(0\) \(0\) \(0\) \(0\) \(0\)

(b)

Dividing by \(\gamma(0)\), \[ \rho(\tau) = \frac{\gamma(\tau)}{\gamma(0)} = \begin{cases} 1, & \tau = 0, \\[2pt] \dfrac{\theta}{1 + \theta^2}, & \tau = 1, \\[6pt] 0, & \tau \geq 2. \end{cases} \] For the bound, \[ |\rho(1)| = \frac{|\theta|}{1 + \theta^2} \leq \frac{1}{2} \iff 1 - 2|\theta| + \theta^2 \geq 0 \iff (1 - |\theta|)^2 \geq 0, \] which holds for every \(\theta\), with equality only at \(\theta = \pm 1\).

3. ARMA Algebra

Because \(\varepsilon_t\) is independent of \(\Omega_{t-1}\), \(E(\varepsilon_t \mid \Omega_{t-1}) = 0\) and \(E(\varepsilon_t^2 \mid \Omega_{t-1}) = \sigma^2\), while anything dated \(t-1\) or earlier is known given \(\Omega_{t-1}\). This is where independence, not just white noise, is needed: an uncorrelated \(\varepsilon_t\) could still be predictable nonlinearly from its past, or have a time-varying conditional variance, as in ARCH models.

(a) \(y_t = \mu + \varepsilon_t + \theta_1 \varepsilon_{t-1} + \theta_2 \varepsilon_{t-2}\)

Mean and variance. \(E(y_t) = \mu\), and, since only products of shocks with the same date have nonzero expectation, \[ \operatorname{var}(y_t) = \gamma(0) = (1 + \theta_1^2 + \theta_2^2)\,\sigma^2 . \]

Autocovariances and autocorrelations. At \(\tau = 1\), \(E[(\varepsilon_t + \theta_1 \varepsilon_{t-1} + \theta_2 \varepsilon_{t-2})(\varepsilon_{t-1} + \theta_1 \varepsilon_{t-2} + \theta_2 \varepsilon_{t-3})]\) has matching dates \(t-1\) (coefficient \(\theta_1 \cdot 1\)) and \(t-2\) (coefficient \(\theta_2 \theta_1\)). At \(\tau = 2\) only date \(t-2\) matches, and beyond that none does: \[ \gamma(\tau) = \begin{cases} (1 + \theta_1^2 + \theta_2^2)\,\sigma^2, & \tau = 0, \\ \theta_1 (1 + \theta_2)\,\sigma^2, & \tau = 1, \\ \theta_2\,\sigma^2, & \tau = 2, \\ 0, & \tau \geq 3, \end{cases} \qquad \rho(\tau) = \begin{cases} 1, & \tau = 0, \\[2pt] \dfrac{\theta_1 (1 + \theta_2)}{1 + \theta_1^2 + \theta_2^2}, & \tau = 1, \\[8pt] \dfrac{\theta_2}{1 + \theta_1^2 + \theta_2^2}, & \tau = 2, \\[6pt] 0, & \tau \geq 3. \end{cases} \] The autocorrelations cut off after displacement 2, the order of the moving average.

Conditional moments. \(\varepsilon_{t-1}\) and \(\varepsilon_{t-2}\) belong to \(\Omega_{t-1}\), so \[ E(y_t \mid \Omega_{t-1}) = \mu + \theta_1 \varepsilon_{t-1} + \theta_2 \varepsilon_{t-2}, \qquad \operatorname{var}(y_t \mid \Omega_{t-1}) = E(\varepsilon_t^2 \mid \Omega_{t-1}) = \sigma^2 . \] The conditional mean moves with the two most recent shocks, and the conditional variance falls short of the unconditional one by \((\theta_1^2 + \theta_2^2)\,\sigma^2\), the contribution of the two shocks that are already known.

(b) \(y_t = \phi y_{t-1} + \varepsilon_t + \theta \varepsilon_{t-1}\)

Mean. From \(y_t = \sum_{j \geq 0} \psi_j \varepsilon_{t-j}\), \(E(y_t) = \sum_{j \geq 0} \psi_j E(\varepsilon_{t-j}) = 0\). (Equivalently, stationarity gives \(E(y_t) = E(y_{t-1}) = m\), and the model gives \(m = \phi m\), so \(m = 0\).)

Variance. With \(\psi_0 = 1\) and \(\psi_j = (\phi + \theta)\phi^{j-1}\), \[ \gamma(0) = \sigma^2 \sum_{j=0}^{\infty} \psi_j^2 = \sigma^2 \Big[ 1 + (\phi + \theta)^2 \sum_{j=1}^{\infty} \phi^{2(j-1)} \Big] = \sigma^2 \Big[ 1 + \frac{(\phi + \theta)^2}{1 - \phi^2} \Big] = \frac{1 + 2\phi\theta + \theta^2}{1 - \phi^2}\, \sigma^2 . \]

Autocovariances. Multiply the model by \(y_{t-\tau}\), \(\tau \geq 1\), and take expectations. \(y_{t-\tau}\) contains only shocks dated \(t - \tau\) or earlier, so \(E(\varepsilon_t y_{t-\tau}) = 0\), \(E(\varepsilon_{t-1} y_{t-1}) = \psi_0 \sigma^2 = \sigma^2\), and \(E(\varepsilon_{t-1} y_{t-\tau}) = 0\) for \(\tau \geq 2\). Hence \[ \gamma(1) = \phi\, \gamma(0) + \theta \sigma^2 = \frac{(\phi + \theta)(1 + \phi\theta)}{1 - \phi^2}\, \sigma^2, \qquad \gamma(\tau) = \phi\, \gamma(\tau - 1) \ \ (\tau \geq 2), \] so \(\gamma(\tau) = \phi^{\tau - 1} \gamma(1)\) for all \(\tau \geq 1\). The middle step uses \(\phi(1 + 2\phi\theta + \theta^2) + \theta(1 - \phi^2) = (\phi + \theta) + \phi\theta(\phi + \theta)\).

Autocorrelations. \[ \rho(0) = 1, \qquad \rho(\tau) = \frac{(\phi + \theta)(1 + \phi\theta)}{1 + 2\phi\theta + \theta^2}\, \phi^{\tau - 1}, \quad \tau \geq 1 . \] The MA part shapes \(\rho(1)\) only; from there on the autocorrelations decay geometrically at rate \(\phi\), as in an AR(1). Three checks: \(\theta = 0\) gives the AR(1), \(\phi^\tau\); \(\phi = 0\) gives the MA(1) of Question 2; and \(\theta = -\phi\) gives \(\rho(\tau) = 0\), white noise, because the AR and MA factors cancel.

Conditional moments. Both \(\varepsilon_{t-1}\) and \(y_{t-1}\), a function of \(\varepsilon_{t-1}, \varepsilon_{t-2}, \ldots\), are known given \(\Omega_{t-1}\): \[ E(y_t \mid \Omega_{t-1}) = \phi\, y_{t-1} + \theta\, \varepsilon_{t-1} = \sum_{j=1}^{\infty} \psi_j \varepsilon_{t-j}, \qquad \operatorname{var}(y_t \mid \Omega_{t-1}) = E(\varepsilon_t^2 \mid \Omega_{t-1}) = \sigma^2 . \]

A numerical check of both parts, at arbitrary parameter values:

th1 <- 0.5; th2 <- -0.3; phi <- 0.7; theta <- 0.5

# (a): rho(1) and rho(2)
rbind(formula = c(th1 * (1 + th2), th2) / (1 + th1^2 + th2^2),
      ARMAacf = ARMAacf(ma = c(th1, th2), lag.max = 2)[-1])
               1          2
formula 0.261194 -0.2238806
ARMAacf 0.261194 -0.2238806
# (b): rho(1), ..., rho(5), then gamma(0) / sigma^2
rho1 <- (phi + theta) * (1 + phi * theta) / (1 + 2 * phi * theta + theta^2)
rbind(formula = rho1 * phi^(0:4),
      ARMAacf = ARMAacf(ar = phi, ma = theta, lag.max = 5)[-1])
                1         2         3         4         5
formula 0.8307692 0.5815385 0.4070769 0.2849538 0.1994677
ARMAacf 0.8307692 0.5815385 0.4070769 0.2849538 0.1994677
c(formula = (1 + 2 * phi * theta + theta^2) / (1 - phi^2),
  psi_sum = sum(c(1, ARMAtoMA(ar = phi, ma = theta, lag.max = 500))^2))
 formula  psi_sum 
3.823529 3.823529 

4. Mechanics of Fitting ARMA Models

The data

bw <- read_csv("data/hw3_bankwire.csv") |> as_tsibble(index = day)

(a) Trend and seasonality

bw |> gg_tsdisplay(transfers, plot_type = "partial", lag_max = 20)

Neither is operative.

  • No trend. Transfers move in long swings around a level of about 13, between a trough of 3.7 (day 157) and a peak of 24.9 (day 80), and keep returning to that level instead of drifting away from it.
  • No day-of-week effect. A five-day pattern would show up as spikes at displacements 5, 10, 15 and 20. There are none: the autocorrelations decline smoothly through those displacements, and the partial autocorrelations there are inside the \(\pm 2/\sqrt{T}\) bands.

To test formally, add a linear trend and day-of-week dummies to a model whose AR(2) errors capture the dynamics the PACF suggests, so that the test respects the serial correlation:

# day of the week, as the position 1 to 5 within each five-day week
bw <- bw |> mutate(dow = factor((day - 1) %% 5 + 1))

det <- bw |> model(
  without = ARIMA(transfers ~ 1 + pdq(2, 0, 0) + PDQ(0, 0, 0)),
  with    = ARIMA(transfers ~ 1 + day + dow + pdq(2, 0, 0) + PDQ(0, 0, 0))
)
det |> select(with) |> tidy()
# A tibble: 8 × 6
  .model term      estimate std.error statistic  p.value
  <chr>  <chr>        <dbl>     <dbl>     <dbl>    <dbl>
1 with   ar1        1.40       0.0629    22.3   4.84e-56
2 with   ar2       -0.457      0.0630    -7.25  9.05e-12
3 with   day       -0.00259    0.0213    -0.122 9.03e- 1
4 with   dow2       0.187      0.146      1.29  2.00e- 1
5 with   dow3       0.346      0.202      1.71  8.86e- 2
6 with   dow4       0.145      0.203      0.715 4.76e- 1
7 with   dow5       0.0351     0.147      0.238 8.12e- 1
8 with   intercept 13.1        2.51       5.23  4.26e- 7
LR <- 2 * diff(glance(det)$log_lik)   # 5 restrictions: trend, 4 dummies
c(LR = LR, p_value = pchisq(LR, df = 5, lower.tail = FALSE))
       LR   p_value 
3.6348725 0.6030851 

The trend coefficient is \(-0.003\) per day with \(t = -0.12\), no dummy is significant at 5%, and the five terms are jointly insignificant (\(p = 0.60\)). A plain OLS regression on a time trend would report \(t = -2.3\), but its residuals have a first-order autocorrelation of \(0.96\), so its standard errors are far too small. In a persistent series, a long swing easily masquerades as a trend.

(b) A parsimonious ARMA model

Reading the correlogram. The autocorrelations start at \(\hat\rho(1) = 0.96\) and decay smoothly: a stationary but very persistent series, far beyond the \(1/2\) that an MA(1) can reach. The partial autocorrelations are \(0.96\) and \(-0.43\) at displacements 1 and 2, followed by small values of alternating sign (\(0.10, -0.14, 0.11\)). This points to two candidates: an AR(2), if the PACF is read as cutting off at 2, and an ARMA(1,1), whose PACF decays with alternating sign when \(\theta > 0\).

Letting the criteria choose. Fit every ARMA(\(p,q\)) with \(p, q \leq 3\) by maximum likelihood:

ic_grid <- function(data, max_order = 3) {
  expand_grid(p = 0:max_order, q = 0:max_order) |>
    pmap(\(p, q) data |>
           model(ARIMA(transfers ~ 1 + pdq(p, 0, q) + PDQ(0, 0, 0))) |>
           glance() |>
           transmute(p = p, q = q, AIC, SIC = BIC)) |>
    list_rbind()
}

ic200 <- ic_grid(bw)
round(xtabs(AIC ~ p + q, ic200), 1)   # rows: AR order p; columns: MA order q
   q
p        0      1      2      3
  0 1179.3  938.6  795.7  732.5
  1  667.9  612.9  614.9  615.4
  2  624.1  614.9  615.4  616.9
  3  622.2  615.9  616.7  617.6
round(xtabs(SIC ~ p + q, ic200), 1)
   q
p        0      1      2      3
  0 1185.9  948.5  808.9  749.0
  1  677.8  626.1  631.4  635.2
  2  637.3  631.4  635.2  640.0
  3  638.7  635.7  639.8  644.0

Both criteria select the ARMA(1,1). The AR(2) trails by about 11 points on each.

fit200 <- bw |> model(
  arma11 = ARIMA(transfers ~ 1 + pdq(1, 0, 1) + PDQ(0, 0, 0)),
  ar2    = ARIMA(transfers ~ 1 + pdq(2, 0, 0) + PDQ(0, 0, 0))
)
fit200 |> select(arma11) |> report()
Series: transfers 
Model: ARIMA(1,0,1) w/ mean 

Coefficients:
         ar1     ma1  constant
      0.9254  0.5927    0.9714
s.e.  0.0261  0.0587    0.1155

sigma^2 estimated as 1.204:  log likelihood=-302.47
AIC=612.95   AICc=613.15   BIC=626.14
# Ljung-Box tests at 10 and 20 lags; both models have 2 ARMA parameters
lb <- augment(fit200) |> group_by(.model)
full_join(lb |> features(.innov, ljung_box, lag = 10, dof = 2),
          lb |> features(.innov, ljung_box, lag = 20, dof = 2),
          by = ".model", suffix = c("_10", "_20"))
# A tibble: 2 × 5
  .model lb_stat_10 lb_pvalue_10 lb_stat_20 lb_pvalue_20
  <chr>       <dbl>        <dbl>      <dbl>        <dbl>
1 ar2         15.1        0.0567       30.0       0.0371
2 arma11       5.81       0.668        17.9       0.463 
ARMAacf(ar = 0.925, ma = 0.593, lag.max = 2, pacf = TRUE)   # implied p(1), p(2)
[1]  0.9599632 -0.4277192
fit200 |> select(arma11) |> gg_tsresiduals(lag_max = 20)

Why the ARMA(1,1) is adequate.

  • Estimates. \(\hat\phi = 0.925\) and \(\hat\theta = 0.593\), each more than ten standard errors from zero; the implied mean is \(0.971/(1 - 0.925) = 13.0\).
  • Roots. The inverse AR root is \(\hat\phi = 0.925\) and the inverse MA root is \(-\hat\theta = -0.593\), both inside the unit circle: stationary and invertible. They are far apart, so there is no common factor.
  • Residuals. No autocorrelation is left: the Ljung-Box tests, with 2 degrees of freedom removed for the estimated ARMA parameters, give \(p = 0.67\) at 10 lags and \(p = 0.46\) at 20. Only one of the 20 residual autocorrelations, \(-0.17\) at displacement 15, crosses the bands, about what chance alone produces at the 5% level. The residuals look like homoskedastic, roughly normal noise.
  • Fit to the correlogram. The fitted model implies \(p(1) = \rho(1) = 0.96\) and \(p(2) = -0.43\), matching the sample values.

The AR(2) is a reasonable first guess but is dominated: besides its worse AIC and SIC, its residuals keep some autocorrelation (\(p = 0.06\) and \(0.04\)).

NoteIf you let ARIMA() search automatically

ARIMA(transfers ~ 1 + pdq(0:3, 0, 0:3) + PDQ(0, 0, 0)) returns an ARMA(2,1). With more than 150 observations, ARIMA() ranks the candidates by an approximate (conditional sum of squares) likelihood; adding approximation = FALSE returns the ARMA(1,1). The ARMA(2,1) is the ARMA(1,1) plus a redundant parameter: its second AR coefficient is \(-0.02\) with a standard error of \(0.12\), and its inverse AR roots are \(0.92\) and \(0.02\). A well-defended ARMA(2,1) is acceptable, but the ARMA(1,1) is more parsimonious.

(c) Using only the first 175 days

bw175 <- bw |> filter(day <= 175)

ic175 <- ic_grid(bw175)
round(xtabs(AIC ~ p + q, ic175), 1)
   q
p        0      1      2      3
  0 1050.2  840.5  712.8  655.4
  1  594.3  546.1  548.0  548.8
  2  555.8  548.0  549.0  550.6
  3  553.8  549.2  550.7  547.3
round(xtabs(SIC ~ p + q, ic175), 1)
   q
p        0      1      2      3
  0 1056.5  850.0  725.5  671.2
  1  603.8  558.7  563.9  567.8
  2  568.4  563.8  568.0  572.8
  3  569.6  568.2  572.9  572.6
fit175 <- bw175 |>
  model(arma11 = ARIMA(transfers ~ 1 + pdq(1, 0, 1) + PDQ(0, 0, 0)))
report(fit175)
Series: transfers 
Model: ARIMA(1,0,1) w/ mean 

Coefficients:
         ar1     ma1  constant
      0.9302  0.5905    0.8756
s.e.  0.0270  0.0623    0.1254

sigma^2 estimated as 1.265:  log likelihood=-269.04
AIC=546.08   AICc=546.31   BIC=558.73
augment(fit175) |> features(.innov, ljung_box, lag = 10, dof = 2)
# A tibble: 1 × 3
  .model lb_stat lb_pvalue
  <chr>    <dbl>     <dbl>
1 arma11    5.24     0.732

Must the selected model be the same? No. AIC and SIC are statistics computed from the sample. Dropping 25 observations changes every candidate’s likelihood, and the SIC penalty too, which grows with \(\ln T\). When candidates are close, as the ARMA(1,1), ARMA(2,1) and ARMA(1,2) are here, their ranking can flip.

Is ours? Yes. Both criteria again select the ARMA(1,1), and the estimates barely move: \(\hat\phi = 0.930\) (against \(0.925\) with 200 days), \(\hat\theta = 0.591\) (\(0.593\)) and \(\hat\mu = 0.876/(1 - 0.930) = 12.5\) (\(13.0\)). The inverse roots, \(0.930\) and \(-0.591\), are inside the unit circle, and the residuals are again white noise (\(p = 0.73\)).

A common factor. On AIC the runner-up is now an ARMA(3,3), only 1.2 points behind:

a33 <- bw175 |>
  model(ARIMA(transfers ~ 1 + pdq(3, 0, 3) + PDQ(0, 0, 0))) |>
  glance()
round(1 / a33$ar_roots[[1]], 2)          # inverse AR roots
[1] 0.34-0.88i 0.34+0.88i 0.92+0.00i
round(1 / a33$ma_roots[[1]], 2)          # inverse MA roots
[1]  0.33-0.94i  0.33+0.94i -0.59+0.00i

Its complex AR pair, \(0.34 \pm 0.88i\), nearly cancels its complex MA pair, \(0.33 \pm 0.94i\), and what remains, an inverse AR root of \(0.92\) and an inverse MA root of \(-0.59\), is the ARMA(1,1). The MA pair also sits on the unit circle (modulus \(1.00\)), the edge of invertibility. The ARMA(3,3) is the ARMA(1,1) in disguise, not a competitor.

(d) Forecasting days 176 to 200

fc <- fit175 |> forecast(h = 25)

b <- coef(fit175)$estimate                                # ar1, ma1, constant
mu_hat <- b[3] / (1 - b[1])                               # implied mean

fc_tab <- fc |> hilo(95) |> unpack_hilo(`95%`) |> as_tibble() |>
  transmute(day, h = day - 175, point = .mean,
            lower = `95%_lower`, upper = `95%_upper`)
fc_tab |> mutate(across(point:upper, \(x) round(x, 2))) |> print(n = 25)
# A tibble: 25 × 5
     day     h point lower upper
   <dbl> <dbl> <dbl> <dbl> <dbl>
 1   176     1  8.29  6.09  10.5
 2   177     2  8.59  4.58  12.6
 3   178     3  8.86  3.78  14.0
 4   179     4  9.12  3.27  15.0
 5   180     5  9.36  2.92  15.8
 6   181     6  9.58  2.67  16.5
 7   182     7  9.79  2.49  17.1
 8   183     8  9.98  2.37  17.6
 9   184     9 10.2   2.28  18.0
10   185    10 10.3   2.23  18.4
11   186    11 10.5   2.19  18.8
12   187    12 10.6   2.18  19.1
13   188    13 10.8   2.18  19.3
14   189    14 10.9   2.19  19.6
15   190    15 11     2.21  19.8
16   191    16 11.1   2.23  20.0
17   192    17 11.2   2.26  20.2
18   193    18 11.3   2.29  20.3
19   194    19 11.4   2.32  20.4
20   195    20 11.5   2.36  20.6
21   196    21 11.5   2.4   20.7
22   197    22 11.6   2.43  20.8
23   198    23 11.7   2.47  20.9
24   199    24 11.7   2.5   21.0
25   200    25 11.8   2.54  21.0
autoplot(fc, bw175 |> filter(day > 100), level = 95) +
  geom_hline(yintercept = mu_hat, linetype = "dashed", colour = "grey40") +
  labs(x = "business day", y = "transfers",
       title = "ARMA(1,1) forecasts from day 175, with 95% intervals",
       subtitle = "Dashed line: estimated mean")

The pattern. For an ARMA(1,1), the point forecasts and the variance of the \(h\)-step forecast error are \[ \hat y_{175+h,\,175} = \hat\mu + \hat\phi^{\,h-1} \big[ \hat\phi\, (y_{175} - \hat\mu) + \hat\theta\, \hat\varepsilon_{175} \big], \qquad \hat\sigma_h^2 = \hat\sigma^2 \sum_{j=0}^{h-1} \psi_j^2 = \hat\sigma^2 \Big[ 1 + (\hat\phi + \hat\theta)^2\, \frac{1 - \hat\phi^{\,2(h-1)}}{1 - \hat\phi^2} \Big]. \]

  • Point forecasts. Day 175 ends at 7.98, far below the estimated mean of 12.54. The forecasts climb smoothly and monotonically back towards it, the gap shrinking by the factor \(\hat\phi = 0.93\) each day, a half-life of \(\ln 0.5 / \ln 0.93 \approx 9.6\) days. By day 200 the forecast, 11.8, is still below the mean. There is no oscillation because the single AR root is real and positive. The MA term enters the first step only, and barely, because the last residual is almost zero (\(\hat\varepsilon_{175} = -0.01\)).
  • Intervals. They fan out quickly, from \(\pm 2.2\) at \(h = 1\) to \(\pm 9.3\) at \(h = 25\), close to the unconditional band \(\hat\mu \pm 1.96 \times 4.8\). A month ahead, the model knows little more than the mean and variance of the series.

(e) Forecasts against realizations

autoplot(fc, bw175 |> filter(day > 100), level = 95) +
  geom_line(data = bw |> filter(day >= 175), aes(day, transfers),
            colour = smu_red, linewidth = 0.8) +
  geom_hline(yintercept = mu_hat, linetype = "dashed", colour = "grey40") +
  labs(x = "business day", y = "transfers",
       title = "Forecasts and realizations (red), days 176 to 200")

bench <- bw175 |> model(
  arma11 = ARIMA(transfers ~ 1 + pdq(1, 0, 1) + PDQ(0, 0, 0)),
  mean   = MEAN(transfers),     # mean of days 1 to 175 at every horizon
  naive  = NAIVE(transfers)     # no change: day-175 value at every horizon
)
bench |> forecast(h = 25) |> accuracy(bw) |> select(.model, ME, RMSE, MAE)
# A tibble: 3 × 4
  .model     ME  RMSE   MAE
  <chr>   <dbl> <dbl> <dbl>
1 arma11  1.75   2.64  2.12
2 mean   -0.827  2.30  1.94
3 naive   4.27   4.78  4.27
fc_tab |> mutate(actual = bw$transfers[day]) |>
  summarise(inside_95 = sum(actual >= lower & actual <= upper), days = n())
# A tibble: 1 × 2
  inside_95  days
      <int> <int>
1        25    25

Do the forecasts perform well? Partly, at first sight. The one-day-ahead forecast is almost exact (8.29 against 8.39), but the forecasts then fall short of the realizations on 19 of the remaining 24 days, with a mean error of \(+1.75\). Transfers were back at their mean within five days, sagged, and then rose to 16.5, while the forecasts climb only slowly. The ARMA(1,1) beats the no-change forecast easily (RMSE 2.64 against 4.78) but loses to the sample mean (2.30).

Why? Not because the model is wrong.

  1. All 25 realizations lie inside the 95% intervals: the model described its own uncertainty correctly.
  2. Forecasts made on day 175 cannot anticipate later shocks. The one-step errors below show a shock of \(+2.0\) on day 177, about \(1.8\hat\sigma\), followed by \(+1.1\) on days 179 and 183. Each shock raises the next day’s value by \(\psi_1 = \hat\phi + \hat\theta = 1.52\) times its size and then dies out at the rate \(0.93\), so these shocks kept the series above the forecast path for about two weeks. This is exactly what the widening intervals warn about.
  3. Because all 25 errors are driven by the same shocks, they are strongly serially correlated, and one 25-day path is closer to a single observation than to 25. The mean won on this path because the series happened to snap back quickly. In population the ARMA(1,1) is better at every horizon: its \(h\)-step MSE, \(\sigma^2 \sum_{j<h} \psi_j^2\), is below \(\gamma(0) = \sigma^2 \sum_{j \geq 0} \psi_j^2\), the MSE of the mean.

A fairer comparison uses many forecast origins. Below are one-step-ahead forecasts for days 176 to 200, each made with data through the previous day, with the coefficients fixed at their day-175 estimates:

one_step <- fit175 |>
  refit(bw, reestimate = FALSE) |>      # keep the day-175 coefficients
  augment() |>
  filter(day > 175)
round(one_step$.innov[1:8], 2)          # one-step errors, days 176 to 183
[1]  0.09  1.98 -0.18  1.12 -0.14 -0.62  0.40  1.10
one_step |> as_tibble() |>
  summarise(arma11 = sqrt(mean(.innov^2)),
            naive  = sqrt(mean((transfers - bw$transfers[day - 1])^2)),
            mean   = sqrt(mean((transfers - mean(bw175$transfers))^2)))
# A tibble: 1 × 3
  arma11 naive  mean
   <dbl> <dbl> <dbl>
1  0.887  1.03  2.30

The ARMA(1,1) now wins clearly: an RMSE of 0.89 against 1.03 for the no-change forecast and 2.30 for the mean. The dynamics pay off where they should, at short horizons, and the advantage fades as \(h\) grows because \(\hat\phi^{\,h} \to 0\) pulls the forecast towards the mean.