Forecast uncertainty, predictive information, and error correction

Module 13 · Reading uncertainty and predictive information in a VAR

Gary Cornwall

Econ 6376 · The George Washington University

What can we learn from a forecast error?

At the end of quarter tt, a forecaster commits to a value for yy in quarter t+Ht+H.

At the forecast originThe past is observed. The forecast is fixed.
Over the next H quartersNew shocks arrive and propagate.
At the target dateWe observe the outcome and can measure the miss.

ey,t+H∣t=yt+H−ŷt+H∣t.e_{y,t+H\mid t}=y_{t+H}-\widehat y_{t+H\mid t}.

Before the outcome arrives, what can we say about the size of those possible misses?

Which shocks enter next quarter’s forecast error?

Write zj,τz_{j,\tau} for the size of the structural shock from source jj (yy or xx) in quarter τ\tau, measured in that shock’s standard deviations. In this model, the two shocks have mean zero, variance one, and zero covariance across sources and dates.

ey,t+1∣t=87zy,t+1+47zx,t+1.e_{y,t+1\mid t} =\frac{8}{7}\,z_{y,t+1}+\frac{4}{7}\,z_{x,t+1}.

Shock source Impact on target yy (response lag 0)
+1+1-standard-deviation yy shock θyy,0=+8/7\theta_{yy,0}=+8/7 units of yy
+1+1-standard-deviation xx shock θyx,0=+4/7\theta_{yx,0}=+4/7 units of yy

Suppose next quarter brings a −2-2-standard-deviation xx shock (zx,t+1=−2z_{x,t+1}=-2) and the yy shock is zero. Multiply the +1+1-SD response by this draw. The forecast error is (4/7)×(−2)=−8/7(4/7)\times(-2)=-8/7 units of yy.

Why do the response weights get squared?

Here zyz_y and zxz_x are next quarter’s standardized shocks. Multiplying either shock by cc gives it variance c2c^2. Their covariance is zero, so their variance contributions add.

Vart(azy+bzx)=a2+b2+2abCovt(zy,zx)⏟0.\operatorname{Var}_t(a z_y + b z_x)=a^2+b^2+ 2ab\underbrace{\operatorname{Cov}_t(z_y,z_x)}_{0}.

Vart(ey,t+1∣t)=(8/7)2⏟yshock+(4/7)2⏟xshock=6449+1649=8049.\operatorname{Var}_t(e_{y,t+1\mid t}) =\underbrace{(8/7)^2}_{y\ \text{shock}}+ \underbrace{(4/7)^2}_{x\ \text{shock}} =\frac{64}{49}+\frac{16}{49} =\frac{80}{49}.

The −2-2 on slide 3 was one possible shock. Across possible shocks, Vart(zx)=1\operatorname{Var}_t(z_x)=1, so the xx contribution is (4/7)2×1=16/49(4/7)^2\times 1=16/49 squared units of yy.

How much of y’s uncertainty comes from the x shock?

For this one-quarter forecast of yy, divide the part attributable to xx shocks by the variance attributable to all shocks.

variance from x shockstotal forecast-error variance of y=16/4980/49=0.20.\frac{\text{variance from }x\text{ shocks}}{\text{total forecast-error variance of }y} =\frac{16/49}{80/49}=0.20.

Under the generating identification, xx shocks account for 20% of the one-quarter-ahead forecast-error variance of yy.

If the impact of the xx shock had the opposite sign and the same magnitude, which part of this calculation would change?

The signed response flips. A +1+1-standard-deviation xx shock would move yy down by 4/74/7. Since (−4/7)2=(4/7)2=16/49(-4/7)^2=(4/7)^2=16/49, the one-quarter variance share stays 20%.

Which shocks can move the four-quarter forecast error?

Read θyx,s\theta_{yx,s} as the response of yy to a +1+1-standard-deviation xx shock, ss quarters after arrival. zj,τz_{j,\tau} is the signed size of shock jj arriving in quarter τ\tau, in standard deviations.

Two-quarter forecast from tt

ey,t+2∣t=∑j∈{y,x}[θyj,1zj,t+1+θyj,0zj,t+2].e_{y,t+2\mid t}=\sum_{j\in\{y,x\}} \left[\theta_{yj,1}\,z_{j,t+1}+\theta_{yj,0}\,z_{j,t+2}\right].

At t+2t+2, a +1+1-SD xx shock from t+1t+1 moves yy by θyx,1=24/49≈0.49\theta_{yx,1}=24/49\approx0.49 units.

The hypothetical −2-2-SD shock at t+1t+1 therefore contributes (24/49)×(−2)=−48/49≈−0.98(24/49)\times(-2)=-48/49\approx-0.98 units of yy to this forecast error.

Four-quarter forecast from tt

Arrival date Lag ss xx variance term
t+1t+1 3 [θyx,3]2[\theta_{yx,3}]^2
t+2t+2 2 [θyx,2]2[\theta_{yx,2}]^2
t+3t+3 1 [θyx,1]2[\theta_{yx,1}]^2
t+4t+4 0 [θyx,0]2[\theta_{yx,0}]^2

Share from x at H=∑s=0H−1[θyx,s]2∑s=0H−1([θyy,s]2+[θyx,s]2).\text{Share from }x\text{ at }H =\frac{\sum_{s=0}^{H-1}[\theta_{yx,s}]^2} {\sum_{s=0}^{H-1}\big([\theta_{yy,s}]^2+[\theta_{yx,s}]^2\big)}.

The subscript ss counts quarters. The outside square applies to the whole weight. At horizon H=4H=4, the xx share is 30.21%.

Which shock accounts for this share?

Open the FEVD activity in a new tab

Forecast target yy. Compare the generating xx shock with the second shock in a recursive identification that orders yy first.

Forecast horizon Generating xx shock Recursive second shock
One quarter 20.00% 0.00%
Four quarters 30.21% 3.60%

At one quarter the generating shock contributes 16/4916/49 of the total 80/4980/49 squared units of yy. With yy ordered first, the second shock reaches yy through lags. At each horizon, both identifications give the same total forecast-error variance for yy.

How can a fading response accompany a rising variance share?

Keep the generating system, the xx shock and target yy fixed. The left panel follows one shock. The right panel includes every future shock date up to the selected horizon.

The response to one x shock falls from 0.57 units at impact toward zero. The same source accounts for 20 percent of one-quarter uncertainty and about 30 percent at four quarters.

At four quarters, the four squared xx response weights account for 30.21% of the total forecast-error variance in yy.

Could the 30.21% tell us whether an xx shock raised yy during a particular forecast miss?

To explain that episode, multiply each signed response weight by the shock that actually arrived.

How can a shock’s share fall while its variance contribution rises?

Forecast the quarterly change in the Canadian unemployment rate. Use the recursive order employment, productivity, real wages, unemployment.

data("Canada", package = "vars")
fit_ca <- vars::VAR(diff(Canada), p = 2, type = "const")
u_shares <- vars::fevd(fit_ca, n.ahead = 4)$U   # target U

The own-shock share falls from 49.4% at one quarter to 26.0% at four quarters. What does that tell you about the size of its variance contribution?

Forecast horizon Own shock share Total variance Own contribution
1 quarter 49.4% 0.0862 0.0425
4 quarters 26.0% 0.1805 0.0469

The last two columns are in squared percentage points. The own contribution rose slightly while total forecast-error variance more than doubled.

Which shocks account for uncertainty about Canadian unemployment?

The target is the change in the unemployment rate in the named future quarter. The four shock columns below follow the recursive order.

Four share curves over sixteen quarters. Employment rises from 46.2 percent at one quarter to 50.2 percent at four, overtaking unemployment. The table gives exact rounded shares at one, four and eight quarters.

Quarters Employment (%) Productivity (%) Real wage (%) Unemployment (%)
1 46.2 0.2 4.1 49.4
4 50.2 12.2 11.6 26.0
8 46.8 14.4 15.5 23.3

Which shock has the largest share at one quarter? Which has the largest share at four?

What changes when unemployment is ordered first?

Both analysts use the same data, two VAR lags and forecast target. One lets unemployment respond immediately to the three other innovations. The other places unemployment first, so those innovations can reach it only in later quarters.

Under the second ordering, what share must unemployment’s own shock account for at one quarter? What happens to total forecast-error variance?

Quarters Own share, U last (%) Own share, U first (%) Total variance, either order
1 49.4 100.0 0.0862
4 26.0 63.9 0.1805

The two analysts agree on the total variance in squared percentage points. Their timing assumptions define different unemployment shocks and give them different shares.

Whose past belongs in the forecast?

Can today’s and last quarter’s real-wage growth improve the one-quarter forecast of the unemployment-rate change?

Quarter t − 1Observe wage growth wt−1.
Forecast origin tObserve wt and the other current changes.
Forecast target t + 1Predict the change in the unemployment rate.

Both fits use the same 81 quarters, an intercept, and two lags each of unemployment change, employment growth and productivity growth. The full equation also includes wtw_t and wt−1w_{t-1}.

What would have to be true of both wage coefficients for wage history to drop out of the forecast?

How can yesterday’s x help forecast y?

In the Module 11 generating equations, xt−1x_{t-1} has a direct coefficient of zero in the equation for yty_t. But past xx helps determine current xx, and current xx enters the yy equation.

yt=0.50xt+0xt−1+⋯xt=0.25yt+0.40xt−1+⋯\begin{aligned} y_t &= 0.50\,x_t + 0\,x_{t-1} + \cdots\\ x_t &= 0.25\,y_t + 0.40\,x_{t-1} + \cdots \end{aligned}

The dots collect the intercept, lagged yy, and that equation’s shock. Hold the past of yy fixed.

If xt−1x_{t-1} is one unit higher, how much does the forecast of yty_t change?

Substituting the second equation into the first gives a reduced-form coefficient of 0+0.50(0.40)1−0.50(0.25)=835\dfrac{0+0.50(0.40)}{1-0.50(0.25)}=\dfrac{8}{35}. The one-step forecast rises by about 0.23 units of yy.

Which coefficients must vanish together?

Open the Granger activity in a new tab

Under the joint null, each boxed coefficient on wage growth equals zero in its target equation.

Forecast target First wage lag Second wage lag
Employment growth aew,1a_{ew,1} aew,2a_{ew,2}
Productivity growth apw,1a_{pw,1} apw,2a_{pw,2}
Unemployment change auw,1a_{uw,1} auw,2a_{uw,2}

Unemployment equation. Write BtB_t for its intercept and two lags of each of the three retained series. The free coefficients are re-estimated in each fit.

Unrestricted:ut=Bt+auw,1wt−1+auw,2wt−2+ϵu,tRestricted:ut=Bt+0wt−1+0wt−2+ϵu,t.\begin{aligned} \text{Unrestricted:}\quad u_t &= B_t+a_{uw,1}w_{t-1}+a_{uw,2}w_{t-2}+\epsilon_{u,t}\\ \text{Restricted:}\quad u_t &= B_t+0\,w_{t-1}+0\,w_{t-2}+\epsilon_{u,t}. \end{aligned}

All three targets give six joint restrictions. Unemployment alone gives two. The wage equation keeps its own lags.

How do we run the two Granger tests in R?

Use the same Canadian VAR(2) fit from the variance example. The system call tests wage growth in the employment, productivity, and unemployment equations. The nested fits test wage growth in unemployment alone.

block <- vars::causality(fit_ca, cause = "rw")$Granger
full <- fit_ca$varresult$U
reduced <- update(full, . ~ . - rw.l1 - rw.l2, data = model.frame(full))
one <- anova(reduced, full)
Wage-growth lags tested Joint restrictions F p
All three other equations 6 2.92 0.0088
Unemployment equation 2 6.24 0.0032

The block rejection points to predictive information in at least one target. The unemployment result is nominal. Its residual diagnostic is sensitive to how the first four residual lags are handled.

Which Canadian forecasting claim would you defend?

Each equation-specific test removes two lags of the proposed predictor. All comparisons use the same 81 Canadian quarters, the same intercept, and the same other histories.

Predictor history for the target F(2,72)F(2,72) Lag-test pp BG(4) pp, trimmed BG(4) pp, zero-filled
Wage growth for unemployment change 6.24 0.0032 0.065 0.026
Unemployment change for wage growth 0.65 0.526 0.013 0.016

The Breusch–Godfrey (BG) test checks for residual dependence through four quarters.

How would you rewrite “Raising wages will lower unemployment” using this evidence?

Wage history helps predict unemployment change in this fit, with sensitivity to the residual check. The reverse test fails to reject, and its residuals show dependence. A policy effect requires an identified intervention. A forecast-accuracy gain requires held-out forecasts.

Which combination of levels stays stable?

U.S. real consumption and disposable income both rise from 1959 to 2009. The fitted consumption-minus-predicted-consumption gap wanders around zero with persistent positive and negative runs.

A gap between two wandering levels

Both U.S. log series are consistent with I(1). They are cointegrated if a linear combination of their levels is stationary.

Estimate logCt=a+blogYt+gt\log C_t=a+b\log Y_t+g_t over 1959Q1–2009Q3. Test the fitted gap ĝt\widehat g_t.

Engle–Granger. The null is no cointegration. With four lagged differences in the residual test, the statistic is -2.589. Rejection at 5% requires a value below -3.367.

This specification gives insufficient evidence for a stationary gap.

What can pairwise tests miss?

Engle–Granger for a proposed relation Johansen for a system of KK series
Fit a levels equation and test its residual for a unit root. The equation can include several regressors. Test the rank rr to determine how many independent combinations of the levels appear stationary.
One test per unordered pair gives K(K−1)/2K(K-1)/2 tests. Ten series give 45 tests. To limit false positives across the screen, adjust for multiple testing. The fitted cointegrating vectors give weights for those combinations. A rank of one alone does not tell us which series enter that relation.

Suppose AtA_t and BtB_t follow independent random walks and Ct=At+Bt+utC_t=A_t+B_t+u_t, where utu_t is stationary. The three-series gap Ct−At−BtC_t-A_t-B_t is stationary, even though no pair has a stationary spread.

Where should the rank test stop?

Open the Johansen activity in a new tab

Start at rank zero. If the trace exceeds the matching 5% critical value, continue to the next row. Stop at the first nonrejection.

System and constant Rank bound Trace 5% critical value Decision
Mouse and Harry r=0r=0 34.16 19.96 Continue
r≤1r\leq1 5.73 9.24 Stop at one
U.S., drift allowed r=0r=0 15.14 17.95 Stop at zero
U.S., constant in the gap r=0r=0 36.85 19.96 Continue
r≤1r\leq1 8.18 9.24 Stop at one

The U.S. fits use the same two log levels and four levels lags. Restricting the constant changes the deterministic trend the common stochastic component can accommodate.

How does the rank guide the model?

For a system of KK series, the rank rr summarizes how many independent combinations of levels are stationary under the chosen deterministic specification.

Selected rank What the evidence supports Forecast model to consider
r=0r=0 No supported stationary gap VAR in changes
0<r<K0<r<K rr stationary gaps and K−rK-r stochastic trends VECM with rr lagged gaps
r=Kr=K Full rank in levels Recheck the I(1) premise and consider a stationary levels VAR

U.S. example. Allowing drift gives r=0r=0. Restricting the constant to the gap gives r=1r=1. Which assumption would you defend for two growing U.S. aggregates?

Which specification would you use for the U.S. forecast?

Engle–Granger. With zero lags, the residual test narrowly rejects (−3.397-3.397 versus −3.367-3.367), but residual dependence remains. With four lags, the statistic is −2.589-2.589 and the test fails to reject no cointegration.

Johansen. Allow the common trend to drift and vary the number of levels lags.

Levels lags 2 4 6
Trace statistic for rank zero 12.24 15.14 16.86
5% critical value 17.95 17.95 17.95

If drift is plausible, start with a VAR in changes. Four lags in levels give three lags of changes. Its adjusted residual portmanteau test through 12 quarters gives p=0.2665p=0.2665. Report the rank-one result when the constant is restricted to the gap.

How does a levels VAR become a VECM?

Start with two lags of the levels vector 𝐘t\mathbf Y_t, suppressing deterministic terms for clarity.

𝐘t=𝐀1𝐘t−1+𝐀2𝐘t−2+𝛜t.\mathbf Y_t=\mathbf A_1\mathbf Y_{t-1}+\mathbf A_2\mathbf Y_{t-2}+\boldsymbol\epsilon_t.

Subtract 𝐘t−1\mathbf Y_{t-1} from both sides. Substitute 𝐘t−2=𝐘t−1−Δ𝐘t−1\mathbf Y_{t-2}=\mathbf Y_{t-1}-\Delta\mathbf Y_{t-1} and collect the levels and changes.

Δ𝐘t=(𝐀1+𝐀2−𝐈)⏟𝚷𝐘t−1+(−𝐀2)⏟𝚪1Δ𝐘t−1+𝛜t.\Delta\mathbf Y_t= \underbrace{(\mathbf A_1+\mathbf A_2-\mathbf I)}_{\boldsymbol\Pi}\mathbf Y_{t-1} +\underbrace{(-\mathbf A_2)}_{\boldsymbol\Gamma_1}\Delta\mathbf Y_{t-1} +\boldsymbol\epsilon_t.

Johansen’s trace test helps choose the rank of 𝚷\boldsymbol\Pi. Rank zero gives 𝚷=𝟎\boldsymbol\Pi=\mathbf0 and a VAR in changes. Rank one gives 𝚷=𝛂𝛃′\boldsymbol\Pi=\boldsymbol\alpha\boldsymbol\beta' and one gap, 𝛃′𝐘t−1\boldsymbol\beta'\mathbf Y_{t-1}.

In the known three-walker model, 𝛃′𝐘t−1=Mt−1−Ht−1\boldsymbol\beta'\mathbf Y_{t-1}=M_{t-1}-H_{t-1} and Karen has zero gap weight. The three entries of 𝛂\boldsymbol\alpha tell us how each walker adjusts to yesterday’s gap.

What gap does R estimate for the three walkers?

Add Karen to the same 240 observations on Mouse and Harry. Use two levels lags and a constant inside the equilibrium relation.

Recreate the three-walker sample in R
helper <- "helpers/cointegration_utils.R"
source(if (file.exists(helper)) helper else file.path("../..", helper))
set.seed(637610)
steps <- matrix(rnorm(3 * 1240), ncol = 3)
Y <- as.matrix(walkers(steps, burn = 1000)[, c("Mouse", "Harry", "Karen")])

Estimate rank, gap weights and loadings

jo <- urca::ca.jo(Y, K = 2, type = "trace",
                  ecdet = "const",
                  spec = "transitory")
urca::summary(jo)  # start at r = 0
fit <- urca::cajorls(jo, r = 1)
beta <- drop(fit$beta)
alpha <- coef(fit$rlm)["ect1", ]
5% trace test Statistic Cutoff Decision
r=0r=0 37.32 34.91 Continue
r≤1r\leq1 7.01 19.96 Rank one

One fitted gap, three change equations

Normalize the weight on Mouse’s location to one. Yesterday’s fitted gap is

ĝt−1=Mt−1−0.925Ht−1−0.037Kt−1−1.155.\widehat g_{t-1}=M_{t-1} -0.925\,H_{t-1} -0.037\,K_{t-1} -1.155.

Next change Fitted error-correction term
ΔMt\Delta M_t (Mouse) −0.157ĝt−1-0.157\,\widehat g_{t-1}
ΔHt\Delta H_t (Harry) +0.073ĝt−1+0.073\,\widehat g_{t-1}
ΔKt\Delta K_t (Karen) −0.019ĝt−1-0.019\,\widehat g_{t-1}

A one-unit larger gap changes each forecast by its loading, holding all three lagged changes fixed.

Karen’s estimated gap weight and adjustment loading are both small. Both are exactly zero in the model that generated these walks.

Where do the fitted walkers go from here?

Stand at the final observation, TT. Forecast each walker’s location with the rank-one model. Future shocks have conditional mean zero.

Period Mouse Harry Karen Fitted gap
Observed at T 3.816 3.492 -19.653 0.150
1 period ahead 3.717 3.462 -19.689 0.080
4 periods ahead 3.686 3.479 -19.684 0.033

Use the same estimated weights and constant on every row. The gap shrinks from +0.150+0.150 at the origin to +0.033+0.033 in the four-period forecast. The three location forecasts can still move.

Who responds to yesterday’s gap?

Let yesterday’s gap be gt−1=Mt−1−Ht−1g_{t-1}=M_{t-1}-H_{t-1}. Mouse is two units ahead of Harry and both had zero change last period.

ΔMt=−0.10gt−1+εM,tΔHt=+0.10gt−1+εH,tΔKt=εK,t.\begin{aligned} \Delta M_t &= -0.10\,g_{t-1}+\varepsilon_{M,t}\\ \Delta H_t &= +0.10\,g_{t-1}+\varepsilon_{H,t}\\ \Delta K_t &= \varepsilon_{K,t}. \end{aligned}

Before the new shocks arrive, what changes would you forecast for Mouse, Harry, and Karen?

Mouse −0.20, Harry +0.20, Karen 0. The expected Mouse–Harry gap falls from 2.00 to 1.60.

Can one walker close the gap?

Both walkers stood still last period. In one history they are together today. In the other, Mouse is two units ahead. A changes-only VAR forecasts the same next changes from these identical recent changes.

Starting gap, Mouse minus Harry Who adjusts by 10%? Expected gap after 1 period After 4 periods
0 Both 0.00 0.00
2 Both 1.60 0.82
2 Mouse alone 1.80 1.31

Now start both walkers five units farther down the street. What happens to their location forecasts and to their gap?

Each location forecast shifts up by five at every horizon. The gap follows the same path.

How does error correction change a shock’s forecast impact?

Open the VAR and VECM activity in a new tab

Mouse shock, Harry’s location. Both models let Harry respond to Mouse’s last change. The VECM also responds to yesterday’s Mouse–Harry gap.

Over 16 forecast periods, the changes-only VAR response rises to 0.25 in period 2 and stays there. The VECM response keeps rising. Mouse's share of Harry's variance is also larger under the VECM.

Model Harry’s period-8 response to one Mouse shock Mouse shocks’ share at period 8
Changes-only VAR (dashed) +0.250 units 5.19%
VECM (solid) +0.496 units 20.19%

What would we see for an independent walker?

Karen’s random walk obeys Kt=Kt−1+εK,tK_t=K_{t-1}+\varepsilon_{K,t}. Her shocks are independent, and her location and changes enter neither walker’s equation.

What happens in both models when Karen is the source, the target, or both? Try the comparison.

Shock source Forecast target Level response Share of target’s forecast-error variance
Karen Harry or Mouse 0 units 0%
Harry or Mouse Karen 0 units 0%
Karen Karen +1 unit permanently 100%

Where can Mouse’s history enter Harry’s forecast?

In the original walker model, Harry’s one-step change equation contains yesterday’s Mouse–Harry gap:

ΔHt=0.10(Mt−1−Ht−1)+εH,t.\Delta H_t=0.10(M_{t-1}-H_{t-1})+\varepsilon_{H,t}.

There is no lagged ΔM\Delta M term. If yesterday’s Mouse location is one unit higher, with Harry’s location and the lagged changes held fixed, does Harry’s forecast change?

Yes. The gap is one unit larger, so Harry’s forecast next change rises by 0.10 units. In the comparison widget Harry also responds to 0.25ΔMt−10.25\,\Delta M_{t-1}.

Full one-step exclusion in a VECM: all Mouse lagged-change coefficients (Γℓ)HM(\Gamma_\ell)_{HM} and its lagged-level coefficient ΠHM=(αβ′)HM\Pi_{HM}=(\alpha\beta')_{HM} must be zero in Harry’s equation.

What would you put in the forecast briefing?

For each question, name the exhibit you would use, the quantity it measures, and one assumption that matters to your answer.

Canadian unemployment riskOne year ahead, how much uncertainty about the quarterly rate change comes from unemployment’s own shock?
Canadian wage historyDoes past wage growth add information to the forecast of unemployment change, given the other series?
U.S. consumption and incomeIf the common trend can drift, would you put last quarter’s fitted gap into the next forecast?

When a stable gap does enter a model, how could you show what it changes for a forecast?

Canada: the four-quarter own-shock share is 26.0% with unemployment ordered last. The wage-lag test gives qualified predictive evidence. United States: allowing drift points to a changes VAR; restricting the constant points to a VECM. Compare matched IRFs and variance shares to show what error correction changes.