ECON 4354/6354 — Homework 4: Solutions

Published

November 16, 2026

  • This is one set of acceptable answers. Simulated numbers depend on the seed, so results within the Monte Carlo error discussed in Question 2 earn full credit.
  • Question 1 is adapted from Diebold, Forecasting, Chapter 8.

0. Setup

library(urca)       # unit root tests: ur.df()
library(vars)       # vector autoregressions: VAR()
library(tidyverse)  # last, so that MASS (attached by vars) cannot mask select()

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

1. Forecasting Temperature Volatility

(a) Variance forecasts

Today’s variance is already known. With \(\hat\mu = 76\), yesterday’s shock was \(\varepsilon_T = 92 - 76 = 16\). Everything that determines \(\sigma^2_{T+1} = \omega + \alpha\, \varepsilon_T^2 + \beta\, \sigma_T^2\) is dated \(T\) or earlier, so at the end of day \(T\) the forecast \(\sigma^2_{T+1,T}\) is \(\sigma^2_{T+1}\) itself: \[ \sigma^2_{T+1} = 3 + 0.6 \times 16^2 + 0 \times \sigma_T^2 = 3 + 153.6 = 156.6 . \] Because \(\hat\beta = 0\), yesterday’s conditional variance \(\sigma_T^2\) plays no role and need not be known: the estimated model is in fact an ARCH(1).

The recursion. For \(h \geq 2\), take expectations of \(\sigma^2_{T+h} = \omega + \alpha\, \varepsilon^2_{T+h-1} + \beta\, \sigma^2_{T+h-1}\) conditional on \(\Omega_T\). Because \(\varepsilon_t \mid \Omega_{t-1} \sim N(0, \sigma_t^2)\), the law of iterated expectations gives \[ E(\varepsilon^2_{T+h-1} \mid \Omega_T) = E\big[\, E(\varepsilon^2_{T+h-1} \mid \Omega_{T+h-2}) \mid \Omega_T \big] = E(\sigma^2_{T+h-1} \mid \Omega_T) = \sigma^2_{T+h-1,T}, \] so \[ \sigma^2_{T+h,T} = \omega + \alpha\, \sigma^2_{T+h-1,T} + \beta\, \sigma^2_{T+h-1,T} = \omega + (\alpha + \beta)\, \sigma^2_{T+h-1,T} = 3 + 0.6\, \sigma^2_{T+h-1,T} . \]

mu_y <- 76; omega <- 3; alpha1 <- 0.6; beta1 <- 0
eps_T <- 92 - mu_y                                 # yesterday's shock

s2 <- numeric(20)
s2[1] <- omega + alpha1 * eps_T^2     # beta1 = 0, so sigma^2_T is not needed
for (h in 2:20) s2[h] <- omega + (alpha1 + beta1) * s2[h - 1]
s2_bar <- omega / (1 - alpha1 - beta1)             # long-run variance

round(s2[1:10], 2)                                 # days T + 1 to T + 10
 [1] 156.60  96.96  61.18  39.71  26.82  19.09  14.46  11.67  10.00   9.00
c(long_run_variance = s2_bar, half_life = log(0.5) / log(alpha1 + beta1))
long_run_variance         half_life 
         7.500000          1.356915 
Day \(T+1\) \(T+2\) \(T+3\) \(T+4\) \(T+5\) \(T+6\) \(T+7\) \(T+8\) \(T+9\) \(T+10\)
\(\sigma^2_{T+h,T}\) 156.60 96.96 61.18 39.71 26.82 19.09 14.46 11.67 10.00 9.00

Where the forecasts are headed. Iterating the recursion from \(\sigma^2_{T+1}\), \[ \sigma^2_{T+h,T} = \bar\sigma^2 + (\alpha + \beta)^{h-1} \big(\sigma^2_{T+1} - \bar\sigma^2\big), \qquad \bar\sigma^2 = \frac{\omega}{1 - \alpha - \beta} = \frac{3}{0.4} = 7.5 . \] The forecasts fall from 156.6 towards the long-run variance of 7.5, a standard deviation of 2.74°F, at the geometric rate \(\alpha + \beta = 0.6\). The excess over 7.5 shrinks by 40% a day, a half-life of \(\ln 0.5 / \ln 0.6 \approx 1.4\) days, and ten days ahead the forecast, 9.0, is close to 7.5. In this model a volatility burst is intense but short-lived, as in the story.

(b) Interval and probability forecasts

Under the stated assumption, \(y_{T+h} \sim N(76, \sigma^2_{T+h,T})\), so the 95% interval forecast is \(76 \pm 1.96\, \sigma_{T+h,T}\), and \[ P\big(|y_{T+h} - 76| \leq 4\big) = P\Big(|Z| \leq \frac{4}{\sigma_{T+h,T}}\Big) = 2\,\Phi\Big(\frac{4}{\sigma_{T+h,T}}\Big) - 1, \qquad Z \sim N(0, 1). \]

fc1 <- tibble(h = 1:20, variance = s2, sd = sqrt(s2),
              lower_95 = mu_y - qnorm(0.975) * sd, upper_95 = mu_y + qnorm(0.975) * sd,
              p_within_4 = 2 * pnorm(4 / sd) - 1)
print(round(as.data.frame(filter(fc1, h <= 10)), 3), row.names = FALSE)
  h variance     sd lower_95 upper_95 p_within_4
  1  156.600 12.514   51.473  100.527      0.251
  2   96.960  9.847   56.701   95.299      0.315
  3   61.176  7.822   60.670   91.330      0.391
  4   39.706  6.301   63.650   88.350      0.474
  5   26.823  5.179   65.849   86.151      0.560
  6   19.094  4.370   67.436   84.564      0.640
  7   14.456  3.802   68.548   83.452      0.707
  8   11.674  3.417   69.303   82.697      0.758
  9   10.004  3.163   69.801   82.199      0.794
 10    9.003  3.000   70.119   81.881      0.818
p_limit <- 2 * pnorm(4 / sqrt(s2_bar)) - 1          # the probability in the long run
c(variance_needed = (4 / qnorm(0.95))^2, p_limit = p_limit)
variance_needed         p_limit 
       5.913784        0.855873 

The intervals are very wide at first. Today’s runs from 51.5°F to 100.5°F, because yesterday’s 16-degree surprise signals a volatile day; they narrow to 70.1°F to 81.9°F by day \(T+10\), and towards \(76 \pm 1.96 \times 2.74\), that is, 70.6°F to 81.4°F, in the long run. The probability of a day within 4 degrees of 76 rises from 0.25 today to 0.82 on day \(T+10\).

It never reaches 90%. The probability is at least 0.9 only if \(4/\sigma_{T+h,T} \geq z_{0.95} = 1.645\), that is, only if \(\sigma^2_{T+h,T} \leq (4/1.645)^2 = 5.91\). The variance forecasts decline monotonically towards 7.5 and never fall below it, so this never happens: the probability approaches \(2\,\Phi(4/\sqrt{7.5}) - 1 = 0.856\) from below. Even once the current burst has died out completely, a day within 4 degrees of 76 is an 86% event, not a 90% one. Volatility reverts to its long-run level, not to zero.

ggplot(fc1, aes(h, p_within_4)) +
  geom_hline(yintercept = 0.9, linetype = "dashed", colour = smu_red) +
  geom_hline(yintercept = p_limit, linetype = "dotted", colour = "grey30") +
  geom_line(colour = smu_blue, linewidth = 0.9) +
  geom_point(colour = smu_blue, size = 1.5) +
  scale_y_continuous(limits = c(0, 1)) +
  labs(x = "days ahead, h", y = "probability",
       title = "Probability that the temperature is within 4 degrees of 76",
       subtitle = "Dashed: the 90% target. Dotted: the long-run probability, 0.856")

Only for today. Because \(\sigma^2_{T+1}\) is known, \(y_{T+1}\) given \(\Omega_T\) is exactly \(N(76, 156.6)\). For later days it is not: the temperature on day \(T+2\) is normal given \(\Omega_{T+1}\), with variance \(\sigma^2_{T+2} = 3 + 0.6\, \varepsilon^2_{T+1}\), but at the end of day \(T\) that variance is still unknown. The forecast distribution is therefore a mixture of normal distributions with different variances. It has the same variance, \(\sigma^2_{T+h,T}\), but fatter tails and more probability near its center than the normal. Simulating the model forward gives the exact probabilities:

set.seed(354)
R_sim <- 1e6
eps   <- rnorm(R_sim, 0, sqrt(s2[1]))              # day T + 1: normal, known variance
p_exact <- mean(abs(eps) <= 4)
for (h in 2:60) {
  eps <- rnorm(R_sim) * sqrt(omega + alpha1 * eps^2)   # one more day (beta1 = 0)
  p_exact[h] <- mean(abs(eps) <= 4)
}
p_tab <- rbind(normal = fc1$p_within_4[1:10], exact = p_exact[1:10])
colnames(p_tab) <- paste0("T+", 1:10)
round(p_tab, 3)
         T+1   T+2   T+3   T+4   T+5   T+6   T+7   T+8   T+9  T+10
normal 0.251 0.315 0.391 0.474 0.560 0.640 0.707 0.758 0.794 0.818
exact  0.250 0.509 0.676 0.774 0.827 0.857 0.872 0.882 0.887 0.889
round(p_exact[60], 3)                              # practically the long-run value
[1] 0.892

On day \(T+1\) the two agree, up to simulation noise. At the next few horizons the exact probabilities are much higher (0.51 against 0.32 on day \(T+2\)), but they too stay below 90%: in the long run the probability is about 0.89. The answer to (b) does not change.

2. Dickey-Fuller Critical Values by Simulation

(a) Critical values

The function is split in two: sim_y() simulates a series and adf_reg() runs the ADF regression on any series, which makes it easy to check against ur.df().

# One series y_1, ..., y_n from y_t = rho y_{t-1} + u_t, u_t = phi u_{t-1} + eps_t,
# starting from y_0 = u_0 = 0
sim_y <- function(n, rho, phi) {
  u <- as.numeric(stats::filter(rnorm(n), phi, method = "recursive"))
  as.numeric(stats::filter(u, rho, method = "recursive"))
}

# ADF regression with a drift and k lagged differences: tau-hat and its t statistic
adf_reg <- function(y, k) {
  n  <- length(y)
  dy <- diff(y)                                    # Delta y_t, t = 2, ..., n
  d  <- data.frame(dy = dy, y_lag = y[-n])         # y_{t-1}
  for (j in seq_len(k)) d[[paste0("dy_lag", j)]] <- dplyr::lag(dy, j)    # Delta y_{t-j}
  fit <- lm(dy ~ ., data = d)                      # rows with missing lags are dropped
  coef(summary(fit))["y_lag", c("Estimate", "t value")]
}

# t_tau from one simulated series
adf_t <- function(n, rho, phi, k) adf_reg(sim_y(n, rho, phi), k)[["t value"]]

A check on one series. The function reproduces the statistic of ur.df(), and shifting the series by 100 and tripling it, which amounts to \(y_0 = 100\) and a shock standard deviation of 3, leaves \(t_\tau\) unchanged:

set.seed(354)
y <- sim_y(250, rho = 1, phi = 0.5)
c(adf_reg     = adf_reg(y, k = 1)[["t value"]],
  ur.df       = ur.df(y, type = "drift", lags = 1)@teststat[1],
  y0_100_sd_3 = adf_reg(100 + 3 * y, k = 1)[["t value"]])
    adf_reg       ur.df y0_100_sd_3 
 -0.7898358  -0.7898358  -0.7898358 
ur.df(y, type = "drift", lags = 1)@cval     # critical values urca prints for T = 250
      1pct  5pct 10pct
tau2 -3.46 -2.88 -2.57
phi1  6.52  4.63  3.81

The simulation:

# R draws of t_tau under the null hypothesis. Resetting the seed gives every case
# below the same shocks, so differences between cases reflect phi and k, not noise.
sim_t <- function(phi, k, n = 250, R = 10000) {
  set.seed(4354)
  replicate(R, adf_t(n, rho = 1, phi = phi, k = k))
}

t_05 <- sim_t(phi = 0.5, k = 1)
cv   <- quantile(t_05, c(0.01, 0.05, 0.10))
round(cv, 3)
    1%     5%    10% 
-3.479 -2.910 -2.586 
mean(t_05 < -1.645)        # rejection frequency with the normal critical value
[1] 0.4682
# Monte Carlo standard error of the 5% quantile:
# sqrt(0.05 * 0.95 / R) / (density of t_tau at the quantile)
dens <- density(t_05)
sqrt(0.05 * 0.95 / 10000) / approx(dens$x, dens$y, xout = cv[["5%"]])$y
[1] 0.0184597
1% 5% 10%
Simulated, \(\phi = 0.5\), \(k = 1\), \(R = 10{,}000\) \(-3.48\) \(-2.91\) \(-2.59\)
ur.df(), a series of 250 observations \(-3.46\) \(-2.88\) \(-2.57\)
Standard normal \(-2.33\) \(-1.645\) \(-1.28\)
  • Against ur.df(). The simulated critical values are within \(0.03\) of the ones urca prints (Fuller’s table). That is as close as 10,000 replications allow: the Monte Carlo standard error of the simulated 5% value is about \(0.02\), so a different seed moves it by a few hundredths. They are also close to the critical values of the plain Dickey-Fuller regression with a drift and iid shocks, which we simulated in lecture (\(-2.86\) at 5% in large samples): in large samples, adding lagged differences leaves the null distribution of \(t_\tau\) unchanged.
  • Against the normal. The Dickey-Fuller distribution lies far to the left of the standard normal. With \(-1.645\) as the critical value, the test would reject a true unit root in 47% of samples instead of 5%. Under the null, \(\hat\tau\) is biased downward, and estimating the intercept moves the distribution of \(t_\tau\) further left than in the regression without a constant from lecture (5% critical value about \(-1.95\)).

Why the variance of \(\varepsilon_t\) and \(y_0\) do not matter. Under the null hypothesis, \(y_t = y_0 + \sum_{s=1}^{t} u_s\).

  • Scale. If \(\varepsilon_t\) has standard deviation \(\sigma\), then \(u_t\), \(y_t\) and \(\Delta y_t\) are \(\sigma\) times the series with \(\sigma = 1\). Multiplying the dependent variable and every regressor except the constant by \(\sigma\) leaves \(\hat\tau\) and the \(\hat\gamma_j\) unchanged. It multiplies \(\hat\mu\) and the residuals by \(\sigma\), and leaves the standard error of \(\hat\tau\) unchanged, because the residual standard deviation and the variation of \(y_{t-1}\) both scale by \(\sigma\). So \(t_\tau\) is unchanged.
  • Initial value. Changing \(y_0\) to \(y_0 + c\) adds \(c\) to every \(y_{t-1}\) and leaves every \(\Delta y_t\) unchanged. Because the regression has an intercept, \(\hat\mu\) absorbs the shift: \(\mu + \tau(y_{t-1} + c) = (\mu + \tau c) + \tau y_{t-1}\). The fitted values, \(\hat\tau\), its standard error and \(t_\tau\) are all exactly the same.

So the null distribution of \(t_\tau\) depends on \(T\) and \(k\), and only negligibly on \(\phi\), as (b) shows, but not at all on \(\sigma\) or \(y_0\), which the check above confirms numerically. The argument for \(y_0\) relies on the intercept: in the regression without a constant (type = "none"), the initial value would matter.

(b) Do the critical values depend on \(\phi\)?

t_00  <- sim_t(phi = 0,    k = 1)
t_m05 <- sim_t(phi = -0.5, k = 1)
round(rbind(`phi = 0.5`  = cv,
            `phi = 0`    = quantile(t_00,  c(0.01, 0.05, 0.10)),
            `phi = -0.5` = quantile(t_m05, c(0.01, 0.05, 0.10))), 3)
               1%     5%    10%
phi = 0.5  -3.479 -2.910 -2.586
phi = 0    -3.474 -2.907 -2.581
phi = -0.5 -3.487 -2.905 -2.578

No. The three sets of critical values agree to within about \(0.01\). Because they are computed from the same shocks, the remaining differences reflect \(\phi\) itself, and they are small even compared with the Monte Carlo error of \(0.02\).

The reason is that with \(k = 1\) the ADF regression is correctly specified. Under the null hypothesis, \(\Delta y_t = u_t = \phi\, \Delta y_{t-1} + \varepsilon_t\), which is the ADF regression with \(\mu = \tau = 0\) and \(\gamma_1 = \phi\), and its error \(\varepsilon_t\) is white noise. The lagged difference absorbs all the serial correlation in \(\Delta y_t\), and in large samples \(t_\tau\) has the Dickey-Fuller distribution whatever the value of \(\phi\).

This matters because \(\phi\) is unknown in practice. If the critical values depended on \(\phi\), we would have to know it to run the test. Because the augmentation removes the dependence, one table, the one ur.df() prints, is valid for any stationary short-run dynamics, provided the regression includes enough lagged differences. With richer dynamics than an AR(1), it takes more than one, which is why in practice the lag length is chosen from the data, for instance by BIC.

(c) Leaving out the lagged difference

t0_05  <- sim_t(phi = 0.5,  k = 0)
t0_m05 <- sim_t(phi = -0.5, k = 0)

summ <- function(t) c(reject_5pct = mean(t < cv[["5%"]]),
                      reject_1pct = mean(t < cv[["1%"]]),
                      median = median(t), sd = sd(t))
round(rbind(`k = 0, phi = 0.5`  = summ(t0_05),
            `k = 0, phi = -0.5` = summ(t0_m05),
            `k = 1, phi = 0.5`  = summ(t_05),
            `k = 1, phi = -0.5` = summ(t_m05)), 3)
                  reject_5pct reject_1pct median    sd
k = 0, phi = 0.5        0.033       0.011 -0.990 1.130
k = 0, phi = -0.5       0.368       0.208 -2.548 1.083
k = 1, phi = 0.5        0.050       0.010 -1.573 0.867
k = 1, phi = -0.5       0.050       0.010 -1.571 0.857
cases <- c("k = 1, φ = 0.5", "k = 0, φ = 0.5", "k = 0, φ = −0.5")
tibble(t = c(t_05, t0_05, t0_m05), case = rep(cases, each = 10000)) |>
  ggplot(aes(t, colour = case)) +
  geom_density(linewidth = 0.9, key_glyph = "path") +
  geom_vline(xintercept = cv[["5%"]], linetype = "dashed") +
  scale_colour_manual(values = setNames(c("grey35", smu_blue, smu_red), cases)) +
  labs(x = expression(t[tau]), y = "density", colour = NULL,
       title = "Null distributions of the Dickey-Fuller t statistic, T = 250",
       subtitle = "Dashed: the 5% critical value from (a)")

Regression \(\phi\) Rejections at 5% Median of \(t_\tau\)
with \(\Delta y_{t-1}\) (\(k = 1\)) \(0.5\) or \(-0.5\) 5.0% \(-1.57\)
without (\(k = 0\)) \(0.5\) 3.3% \(-0.99\)
without (\(k = 0\)) \(-0.5\) 36.8% \(-2.55\)

With the lagged difference and \(\phi = 0.5\), the 5% rejection rate is 5% by construction, because the critical value is the 5% quantile of those same draws.

Why the test becomes unreliable. Without the lagged difference, the error of the Dickey-Fuller regression is \(u_t = \phi u_{t-1} + \varepsilon_t\) itself. It is serially correlated, and it is correlated with the regressor \(y_{t-1}\), which contains \(u_{t-1}, u_{t-2}, \ldots\): \[ E(u_t\, y_{t-1}) = \sum_{j=1}^{t-1} \operatorname{cov}(u_t, u_{t-j}) \approx \sigma_u^2 \sum_{j=1}^{\infty} \phi^j = \sigma_u^2\, \frac{\phi}{1 - \phi} \quad (t \text{ large}), \] where \(\sigma_u^2 = 1/(1 - \phi^2)\) is the variance of \(u_t\). OLS attributes this covariance to \(\tau\), so the distribution of \(t_\tau\) now depends on the unknown \(\phi\), and no single table of critical values is right. Depending on \(\phi\), the test rejects a true null hypothesis too rarely or far too often.

  • \(\phi = -0.5\): far too often. The covariance is negative, \(-\sigma_u^2/3\). A high \(y_{t-1}\), usually the result of a recent rise, tends to be followed by a fall, because the changes partly reverse. OLS reads that reversal as mean reversion of the level: \(\hat\tau\) is pushed down, the median of \(t_\tau\) moves from \(-1.57\) to \(-2.55\), and the test rejects a true unit root in 37% of samples instead of 5%.
  • \(\phi = 0.5\): too rarely. The covariance is positive: changes have momentum, so \(\hat\tau\) is pushed up and \(t_\tau\) towards zero (median \(-0.99\)). The test rejects a true null in only 3.3% of samples, and against a stationary alternative it would also have little power.

A second distortion comes through the standard error. OLS computes it from \(\sigma_u^2\), the variance of the regression error, while the sampling variability of \(\hat\tau\) depends on the long-run variance \(\lambda^2 = 1/(1 - \phi)^2\), which adds up all the autocovariances of \(u_t\). In large samples, \(t_\tau\) then behaves like the Dickey-Fuller distribution scaled by \(\lambda/\sigma_u = \sqrt{(1 + \phi)/(1 - \phi)}\), plus a random shift driven by the covariance above. For \(\phi = 0.5\) the scale factor is 1.73, which stretches the distribution: its standard deviation is 1.13, against 0.87 with the lagged difference. Its left tail therefore moves less than its center, and at the 1% level the test rejects about as often as it should (1.1% of samples), even though it rejects too rarely at 5%. For \(\phi = -0.5\) the scale factor is 0.58, but the negative shift dominates and moves the whole distribution to the left. The Phillips-Perron test from lecture corrects both distortions with estimates of \(\sigma_u^2\) and \(\lambda^2\).

Including \(\Delta y_{t-1}\) removes the predictable part of \(u_t\): the error becomes \(\varepsilon_t\), which is uncorrelated with \(y_{t-1}\), and \(t_\tau\) has the Dickey-Fuller distribution again, whatever \(\phi\). This is why the lag length matters so much in practice.

3. Estimating and Forecasting a Bivariate VAR

(a) The estimator

i. OLS, equation by equation. Each equation is a linear regression of \(y_{i,t}\) on the two lagged variables, \(y_{1,t-1}\) and \(y_{2,t-1}\), without a constant. OLS applied to equation \(i\) gives \[ \begin{pmatrix} \hat\phi_{i1} \\ \hat\phi_{i2} \end{pmatrix} = \Big(\sum_{t=1}^{T} \mathbf{y}_{t-1}\, \mathbf{y}_{t-1}'\Big)^{-1} \sum_{t=1}^{T} \mathbf{y}_{t-1}\, y_{i,t}, \qquad i = 1, 2, \] where \(\mathbf{y}_{t-1} = (y_{1,t-1},\ y_{2,t-1})'\); the first observation, \(\mathbf{y}_0\), serves only as a regressor. Collecting the two equations, \[ \hat\Phi = \Big(\sum_{t=1}^{T} \mathbf{y}_t\, \mathbf{y}_{t-1}'\Big) \Big(\sum_{t=1}^{T} \mathbf{y}_{t-1}\, \mathbf{y}_{t-1}'\Big)^{-1}, \] the multivariate version of the AR(1) estimator \(\hat\phi = \sum_t y_t y_{t-1} / \sum_t y_{t-1}^2\). In regression notation, with \(X\) the \(T \times 2\) matrix whose row \(t\) is \(\mathbf{y}_{t-1}'\) and \(\mathbf{Y}_i = (y_{i,1}, \ldots, y_{i,T})'\), the estimator for equation \(i\) is \((X'X)^{-1} X' \mathbf{Y}_i\). In a stationary VAR, OLS is consistent and asymptotically normal, because the regressors are dated \(t - 1\) while the shock \(\boldsymbol\varepsilon_t\) is independent of the past. With normal shocks it is also the maximum likelihood estimator, conditional on \(\mathbf{y}_0\).

ii. No. Joint estimation (generalized least squares, also called seemingly unrelated regressions, SUR) chooses the coefficient vectors of the two equations, \(\boldsymbol\beta_1 = (\phi_{11}, \phi_{12})'\) and \(\boldsymbol\beta_2 = (\phi_{21}, \phi_{22})'\), to minimize \(\sum_t \boldsymbol\varepsilon_t' \Sigma^{-1} \boldsymbol\varepsilon_t\), which weights the errors of the two equations by the inverse of their covariance matrix. Write \(\sigma^{ij}\) for the elements of \(\Sigma^{-1}\) and \(\mathbf{e}_j = \mathbf{Y}_j - X \boldsymbol\beta_j\) for the errors of equation \(j\). Since \(\boldsymbol\varepsilon_t' \Sigma^{-1} \boldsymbol\varepsilon_t = \sum_{i,j} \sigma^{ij} \varepsilon_{i,t} \varepsilon_{j,t}\), the first-order conditions for \(\boldsymbol\beta_1\) and \(\boldsymbol\beta_2\) are \[ \sigma^{11} X'\mathbf{e}_1 + \sigma^{12} X'\mathbf{e}_2 = \mathbf{0}, \qquad \sigma^{12} X'\mathbf{e}_1 + \sigma^{22} X'\mathbf{e}_2 = \mathbf{0}, \qquad\text{that is,}\qquad \big[X'\mathbf{e}_1 \;\; X'\mathbf{e}_2\big]\, \Sigma^{-1} = \mathbf{0}. \] Multiplying on the right by \(\Sigma\) gives \(X'\mathbf{e}_1 = \mathbf{0}\) and \(X'\mathbf{e}_2 = \mathbf{0}\), the OLS normal equations of the two equations. Whatever \(\Sigma\) is, joint estimation reproduces equation-by-equation OLS exactly, in every sample (Zellner, 1962). Intuitively, joint estimation improves the estimates of one equation by exploiting the correlated shocks together with regressors that appear in the other equation only. In a VAR every equation has the same regressors, so there is nothing to borrow. Joint estimation would help if the regressors differed across equations, for instance if we imposed \(\phi_{21} = 0\). The correlation \(\sigma_{12}\) still matters elsewhere: for tests that involve both equations, and for the uncertainty of the forecasts, because the forecast errors of the two variables are correlated.

iii. From the OLS residuals. With the residual vectors \(\hat{\boldsymbol\varepsilon}_t = \mathbf{y}_t - \hat\Phi\, \mathbf{y}_{t-1}\), \[ \hat\Sigma = \frac{1}{T} \sum_{t=1}^{T} \hat{\boldsymbol\varepsilon}_t \hat{\boldsymbol\varepsilon}_t' = \begin{pmatrix} \frac{1}{T} \sum_t \hat\varepsilon_{1,t}^2 & \frac{1}{T} \sum_t \hat\varepsilon_{1,t} \hat\varepsilon_{2,t} \\[4pt] \frac{1}{T} \sum_t \hat\varepsilon_{1,t} \hat\varepsilon_{2,t} & \frac{1}{T} \sum_t \hat\varepsilon_{2,t}^2 \end{pmatrix}, \] the Gaussian maximum likelihood estimator. Dividing by \(T - 2\), the residual degrees of freedom of each equation, instead of \(T\) gives a degrees-of-freedom-corrected version. The difference vanishes as \(T\) grows.

(b) Optimal forecasts

i. Stationarity and the mean. \(\Phi\) is upper triangular, so its eigenvalues are its diagonal elements, \(0.5\) and \(0.8\). Both are less than one in absolute value, so the VAR is covariance stationary. Taking expectations of \(\mathbf{y}_t = \Phi\, \mathbf{y}_{t-1} + \boldsymbol\varepsilon_t\) with \(E(\mathbf{y}_t) = E(\mathbf{y}_{t-1}) = \boldsymbol\mu\) gives \(\boldsymbol\mu = \Phi \boldsymbol\mu\), that is, \((I - \Phi)\boldsymbol\mu = \mathbf{0}\). Because 1 is not an eigenvalue of \(\Phi\), the matrix \(I - \Phi\) is invertible, so \[ \boldsymbol\mu = \begin{pmatrix} 0 \\ 0 \end{pmatrix}: \] both series have mean zero, as they should if they are deviations from their means.

ii. Point forecasts. Under squared-error loss the optimal forecast is the conditional mean. Because \(\boldsymbol\varepsilon_{T+1}\) and \(\boldsymbol\varepsilon_{T+2}\) are independent of \(\Omega_T\) with mean zero, \[ \begin{aligned} \mathbf{y}_{T+1} &= \Phi\, \mathbf{y}_T + \boldsymbol\varepsilon_{T+1} &\Longrightarrow\quad \mathbf{y}_{T+1,T} &= \Phi\, \mathbf{y}_T, \\ \mathbf{y}_{T+2} &= \Phi^2 \mathbf{y}_T + \Phi\, \boldsymbol\varepsilon_{T+1} + \boldsymbol\varepsilon_{T+2} &\Longrightarrow\quad \mathbf{y}_{T+2,T} &= \Phi^2 \mathbf{y}_T = \Phi\, \mathbf{y}_{T+1,T}, \end{aligned} \] where the second line substitutes the first into \(\mathbf{y}_{T+2} = \Phi\, \mathbf{y}_{T+1} + \boldsymbol\varepsilon_{T+2}\). The last expression is the chain rule of forecasting. With the numbers, \[ \mathbf{y}_{T+1,T} = \begin{pmatrix} 0.5(-2) + 0.3(3) \\ 0(-2) + 0.8(3) \end{pmatrix} = \begin{pmatrix} -0.1 \\ 2.4 \end{pmatrix}, \qquad \mathbf{y}_{T+2,T} = \begin{pmatrix} 0.5(-0.1) + 0.3(2.4) \\ 0.8(2.4) \end{pmatrix} = \begin{pmatrix} 0.67 \\ 1.92 \end{pmatrix}. \] The direct formula agrees: \(\Phi^2 = \begin{pmatrix} 0.25 & 0.39 \\ 0 & 0.64 \end{pmatrix}\) and \(\Phi^2 \mathbf{y}_T = \big(0.25(-2) + 0.39(3),\ 0.64(3)\big)' = (0.67,\ 1.92)'\).

Where the forecasts are headed. Iterating, \(\mathbf{y}_{T+h,T} = \Phi^h \mathbf{y}_T \longrightarrow \mathbf{0}\) as \(h \to \infty\), the unconditional mean, because \(\Phi^h \to 0\) when both eigenvalues are inside the unit circle. Here \(\Phi^h = \begin{pmatrix} 0.5^h & 0.8^h - 0.5^h \\ 0 & 0.8^h \end{pmatrix}\) (check it by induction), so \[ y_{1,T+h,T} = 3\,(0.8)^h - 5\,(0.5)^h, \qquad y_{2,T+h,T} = 3\,(0.8)^h . \] The forecast of \(y_2\) falls monotonically from 3 towards its mean of 0. The forecast of \(y_1\) rises from \(-2\), overshoots its mean from \(h = 2\) on (\(0.67\)), peaks at \(h = 4\) (\(0.92\)), and only then declines towards 0. The overshoot comes from \(y_2\): it is above its mean and decays slowly (rate \(0.8\)), so it keeps pushing \(y_1\) up through \(\phi_{12} = 0.3\) after \(y_1\)’s own deviation, which decays at rate \(0.5\), has died out.

iii. Granger causality. \(y_1\) does not Granger-cause \(y_2\): \(\phi_{21} = 0\), so past values of \(y_1\) do not enter the equation for \(y_2\), and because \(\Phi^h\) stays upper triangular, \(y_1\) does not help forecast \(y_2\) at any horizon. \(y_2\) does Granger-cause \(y_1\): \(\phi_{12} = 0.3 \neq 0\). The correlation \(\sigma_{12}\) between the shocks is not Granger causality: it links surprises in the same period, and cannot be used to forecast from the past.

A check of (b) by matrix algebra, and the path of the forecasts:

Phi   <- matrix(c(0.5, 0, 0.3, 0.8), 2, 2)        # filled column by column
Sigma <- matrix(c(1, 0.5, 0.5, 1), 2, 2)
y_T   <- c(-2, 3)

eigen(Phi)$values                                 # both inside the unit circle
[1] 0.8 0.5
f1 <- Phi %*% y_T                                 # y_{T+1,T}
f2 <- Phi %*% f1                                  # y_{T+2,T}, by the chain rule
cbind(f1 = c(f1), f2 = c(f2), f2_direct = c(Phi %*% Phi %*% y_T))
       f1   f2 f2_direct
[1,] -0.1 0.67      0.67
[2,]  2.4 1.92      1.92
path <- matrix(NA, 21, 2, dimnames = list(NULL, c("y1", "y2")))
path[1, ] <- y_T
for (h in 1:20) path[h + 1, ] <- Phi %*% path[h, ]

as_tibble(path) |>
  mutate(h = 0:20) |>
  pivot_longer(c(y1, y2), names_to = "variable", values_to = "forecast") |>
  ggplot(aes(h, forecast, colour = variable)) +
  geom_hline(yintercept = 0, linetype = "dashed", colour = "grey40") +
  geom_line(linewidth = 0.9) +
  geom_point(size = 1.5) +
  scale_colour_manual(values = c(y1 = smu_blue, y2 = smu_red)) +
  labs(x = "horizon h", y = "point forecast", colour = NULL,
       title = "Point forecasts from y_T = (−2, 3)'",
       subtitle = "Dashed: the unconditional mean of both series, 0. y1 overshoots it")

And a check of (a) on data simulated from this VAR: OLS recovers the parameters, vars::VAR() gives the same estimates, and joint GLS estimation gives the same coefficients as OLS.

set.seed(354)
n_sim <- 10000
eps   <- matrix(rnorm(2 * n_sim), n_sim, 2) %*% chol(Sigma)
Y     <- matrix(0, n_sim, 2)                     # start at the mean, zero
for (i in 2:n_sim) Y[i, ] <- Phi %*% Y[i - 1, ] + eps[i, ]

X <- Y[-n_sim, ]                                 # rows (y_{1,t-1}, y_{2,t-1})
B <- solve(crossprod(X), crossprod(X, Y[-1, ]))  # (X'X)^{-1} X'Y = Phi-hat'
dimnames(B) <- list(c("y1.l1", "y2.l1"), c("y1", "y2"))
round(B, 3)                                        # column i: phi_i1, phi_i2
         y1    y2
y1.l1 0.513 0.002
y2.l1 0.287 0.791
round(crossprod(Y[-1, ] - X %*% B) / (n_sim - 1), 3)   # Sigma-hat, dividing by T
      y1    y2
y1 0.997 0.495
y2 0.495 1.001
var1 <- VAR(data.frame(y1 = Y[, 1], y2 = Y[, 2]), p = 1, type = "none")
round(sapply(coef(var1), \(m) m[c("y1.l1", "y2.l1"), "Estimate"]), 3)
         y1    y2
y1.l1 0.513 0.002
y2.l1 0.287 0.791
# Joint GLS on the first 200 observations (small, to keep the stacked matrices small)
n_gls <- 200
Xs    <- X[1:n_gls, ]
Ys    <- Y[2:(n_gls + 1), ]
Bs    <- solve(crossprod(Xs), crossprod(Xs, Ys))
Ss    <- crossprod(Ys - Xs %*% Bs) / n_gls
X_big <- kronecker(diag(2), Xs)              # regressors of the stacked system
W     <- kronecker(solve(Ss), diag(n_gls))   # inverse covariance of the stacked errors
b_gls <- solve(t(X_big) %*% W %*% X_big, t(X_big) %*% W %*% c(Ys))
max(abs(b_gls - c(Bs)))                            # zero, up to rounding error
[1] 2.442491e-15