Econometrics

How to analyse a time series: an econometric protocol

Stationarity, unit roots, structural breaks, causality, cointegration and error correction: the step-by-step protocol we wrote at CAAM for commodity and macro series, and still follow before fitting any model to data that move through time, and the engine that runs its first steps today, measured on series whose truth is known.

Why stationarity comes first

Our engine tests stationarity before any regression or correlation, in the weak sense: a mean, a variance and autocovariances that do not change over time. Most economic and financial series are not stationary, and regressing one trending series on another can then produce a high R² and significant coefficients between variables that have nothing to do with each other.

Granger and Newbold (1974) called these spurious regressions: between two independent random walks, the Student statistics reject “no relationship” far more often than the nominal level. Their alarm, an R² in levels higher than the Durbin–Watson statistic, is the one the 2008 protocol applies further down.

Independent random walks give “significant” regressions
Independent random walks give “significant” regressions

Where the usual approach goes wrong

The usual reflex fits in one line: run an augmented Dickey–Fuller test and, if it does not reject the unit root, difference the series. It treats every non-stationarity as a random walk. We measured what that reflex does on four kinds of simulated series whose nature is known, 300 of each, 200 points long: a stationary series, a random walk, a series stationary around a linear trend, and a stationary series whose mean jumps once.

On the random walk, the reflex is right 92% of the time (276 of 300). Elsewhere it fails systematically: it differenced all 300 trend-stationary series and 289 of the 300 series with a level shift (96%), two cases where differencing is the wrong cure, as the next section shows. Our engine runs the same test, then two others, and chooses between five answers in a declared order: it detrended 286 of the 300 trend-stationary series (95%), named the break in 292 of the 300 series with a level shift (97%), at most five periods from the true date in 291 of 300, and declared 288 of the 300 stationary series stationary (96%), leaving them as they were. Its wrong cures: 10 stationary series (3%), 2 trend-stationary series and 8 series with a level shift; 12 trend-stationary series were returned unchanged, with a break named. These gaps are measured against the one-test reflex, a naive practice. A careful analyst running ADF, KPSS and a break test by hand, as the 2008 protocol did, follows the same logic; we have not measured our engine against such a hand analysis.

The price of that discipline is stated, not hidden, and on this one kind of series the reflex does better. On random walks of 200 points, the engine differenced 198 of the 300 series (66%, against 92% for the reflex); 27 (9%) received a wrong cure or were declared stationary, and the remaining 75 (25%) were left as they were, each with its reason: for 52 of them (17%) the tests disagreed or could not conclude, because with 200 points the stationarity test often lacks the power to reject; the others were taken for a break, or their difference failed the retest. Rather than pick a cure at random, the engine says so.

One test and a reflex, or a decision: what each rule does with four kinds of series
One test and a reflex, or a decision: what each rule does with four kinds of series

Two kinds of non-stationarity, two different cures

Nelson and Plosser (1982) distinguish a trend-stationary (TS) series, a deterministic trend plus a stationary noise, on which a shock fades, from a difference-stationary (DS) series, such as the random walk, on which it is permanent. Our engine tells them apart before choosing a cure, because the cures differ: removing the trend for the first, differencing for the second.

Chan, Hayya and Ord (1977) and above all Nelson and Kang (1981) showed what the wrong cure does. Differencing a TS series introduces a unit root in its moving-average part: when the noise is white, the differenced noise has an autocorrelation of −0.5 at the first lag and zero after, so it is no longer white noise, and an artificial short cycle appears. Detrending a DS series instead creates an artificial long cycle, with strong spurious autocorrelation in the first lags of the residuals. Hence the rule: a TS series is regressed on a deterministic trend, a DS series is differenced.

Our simulations show both signatures. Over 300 trend-stationary series with white noise, the differenced series had a first-order autocorrelation of −0.50 on average, the −0.5 of the theory. Over 300 random walks with a fitted trend removed, the residuals kept an average autocorrelation of 0.94 at lag 1 and still 0.71 at lag 5: a long cycle that does not exist. A model fitted afterwards would faithfully learn both artefacts.

How long a shock lasts depends on the kind of series
How long a shock lasts depends on the kind of series
The wrong cure leaves a signature in the autocorrelations
The wrong cure leaves a signature in the autocorrelations

Read the autocorrelogram and the partial autocorrelogram

The autocorrelation function is the first diagnostic. When every lag is significant and the bars decay slowly, the series is probably not stationary. Differencing it once and looking again usually tells the story: if no structure remains, the series is likely integrated of order one, written I(1). On monthly Brent spot prices, every autocorrelation of the level was significant and decayed slowly, and the trend disappeared once the series was differenced. The partial autocorrelogram of the series differenced once more, the second difference when the first difference is being tested, then suggests how many lags the unit-root test will need, a suggestion that the test regression itself must confirm.

The partial autocorrelation at lag h, written ϕhh, is the last coefficient of an autoregression of order h fitted by the Yule–Walker equations: the correlation between yt and yt−h once the lags in between are accounted for. Read together, the two correlograms give the order of a stationary series, because each kind of model stops on one of them and decays on the other:

AR(p): ϕhh=0  for h>pMA(q): ρh=0  for h>q
(1)

Here ρh is the autocorrelation at lag h, p the order of an autoregressive model, in which yt depends on its own p previous values, and q the order of a moving average, in which yt depends on the q previous shocks. The other correlogram decays: geometrically or as a damped wave for an autoregression, with alternating signs for a moving average with a positive coefficient. Mistaking one signature for the other gives a model of the wrong kind, whose residuals are not white noise.

What counts as zero is a design choice. With n observations and ρ^j the estimated autocorrelations, the 5% bands we draw are:

ACF: ±1.961n(1+2∑j=1h−1ρ^j2)PACF: ±1.96n
(2)

The autocorrelation band is Bartlett’s: it widens with the lag, because at lag h it tests ρh=0 for a moving average of order h−1, whose earlier autocorrelations inflate the variance. Reading the cut-off of a moving average against the fixed band 1.96/n would declare significant lags that are not; that fixed band is the right one for the partial autocorrelations, and for the autocorrelations of a white noise only. When our engine profiles a time series, it draws its partial autocorrelogram; the lag orders it then uses, in the unit-root tests, in the VAR and when it whitens series before correlating them, are chosen by a declared criterion, Akaike’s, not read off a chart.

AR and MA signatures on the two correlograms
AR and MA signatures on the two correlograms

The augmented Dickey–Fuller regression

The augmented Dickey–Fuller (ADF) test postulates an autoregressive model so that the residuals behave like white noise, and tests whether the coefficient of the lagged level, in the regression of the change, is zero, which is the unit root:

Δyt=μ+βt+γyt−1+∑j=1kδjΔyt−j+εtτ=γ^se^(γ^)
(3)

Here Δyt=yt−yt−1 is the change, μ a constant, βt a linear trend (β=0 in the version with a constant only, μ=β=0 in the version with neither), γ the coefficient whose nullity is the unit root, k the number of lagged changes that absorb the short-run dynamics, δj their coefficients and εt a white noise. The null hypothesis is γ=0. The statistic τ is computed like a Student t but does not follow a Student distribution under the null; it is compared with Dickey–Fuller critical values, specific to each version (without constant, with a constant, with a constant and a trend), and the unit root is rejected when τ falls below them.

Our engine runs two versions, each with a declared role. The version with a constant decides whether the series is stationary; the version with a constant and a trend is run only when the answer is no, to tell a trend-stationary series from an integrated one. The number of lags k is chosen by Akaike’s criterion, from zero up to Schwert’s bound, 12(n/100)1/4 rounded up, and the p-value comes from MacKinnon’s approximations of the Dickey–Fuller distributions.

In the 2008 protocol, the same test was run by hand, with a richer discipline on its two choices. The lags were chosen by the Schwarz criterion and set against Hall’s general-to-specific method (1994), which starts from a maximum order and drops the last lag while it is not significant. The deterministic terms followed the most general model first: in the version with a constant and a trend, the unit root was tested together with the significance of the trend, read on its own non-standard critical values; a term that was not significant was dropped, and the conclusion was read in the first version whose deterministic term was significant.

Following Dickey and Pantula (1987), the highest order of integration is tested first: the first difference before the level. On monthly Brent spot prices from August 1991 to August 2008, the partial autocorrelogram of the second difference suggested two lags, but neither was significant in the regression, so none was kept. Neither the trend nor the constant was significant (the p-value of the constant was 87.75%), and the ADF statistic of the first difference, −7.76 with a p-value close to zero, rejected the unit root. In level, with one lag and after dropping first the trend and then the constant, which were not significant, the statistic was 0.29: the unit root was not rejected. Brent was integrated of order one over the period.

Phillips and Perron (1988) run the same regressions but, instead of adding lags, correct the statistic non-parametrically for autocorrelation and heteroskedasticity, with the long-run variance estimated as Newey and West (1987) propose. In 2008 the two tests served as a cross-check. Both have a unit root as their null, so failing to reject it is weak evidence; our engine takes its second opinion from a test with the opposite null instead.

KPSS, the opposite null, and how the engine decides

Kwiatkowski, Phillips, Schmidt and Shin (1992) reverse the roles: their null hypothesis is stationarity. The series is regressed on a constant, or on a constant and a trend, its residuals e^t are added up into a running total, and the statistic compares the size of that running total with the long-run variance of the residuals:

η=1n2σ^∞2∑t=1nSt2St=∑s=1te^sσ^∞2=c^0+2∑h=1ℓ(1−hℓ+1)c^h
(4)

Here c^h=1n∑t=h+1ne^te^t−h is the autocovariance of the residuals at lag h and ℓ the truncation lag, chosen from the data by the method of Hobijn, Franses and Ooms; the Bartlett weights 1−h/(ℓ+1) keep the variance positive. Under stationarity the running total keeps coming back towards zero and η stays small; under a unit root it wanders and η grows with the sample. Large values reject stationarity; the tabulated p-value only runs from 1% to 10%, which is enough for a decision at 5%.

Our engine reads the tests together, at the same 5% level, and decides in this order:

  1. the unit root is rejected, by ADF or by the break test of the next section, and KPSS does not reject stationarity: the series is stationary and left as it is;
  2. otherwise, around a trend: ADF with a trend rejects the unit root and KPSS with a trend does not reject trend-stationarity: the series is trend-stationary, and its least-squares trend is removed;
  3. otherwise, if the break test rejects: a break, handled as the next section explains;
  4. otherwise, if ADF does not reject the unit root and KPSS rejects stationarity: a unit root, established by two tests with opposite nulls; the series is differenced once;
  5. in every other case the tests contradict each other or cannot run: the series is labelled indeterminate and left as it is, without any cure chosen silently.

After a cure, the result goes through the same tests again, and is kept only if it is now stationary and still has enough points, ten by default; when removing the trend is not enough, the detrended series is differenced and tested once more; otherwise the original series comes back untransformed. A second difference is taken only when the analyst asks for it. The order matters: trend-stationarity is read on the tests that include a trend, because a KPSS rejection around a constant is exactly what a unit root produces, and reading it as a deterministic trend would detrend random walks.

When a break looks like a unit root

Unit-root tests keep two weaknesses: low power against stationary alternatives close to a unit root, and an inability to tell a structural break from a unit root. Perron (1989) showed that a series stationary around a broken trend is often wrongly declared integrated.

Perron (1989) introduced a break, under the null as well as the alternative, but chose its date in advance, after seeing the data. Zivot and Andrews (1992) select it endogenously: the test is run recursively for every candidate date inside the sample, and the date most favourable to the stationary alternative is kept, with critical values that account for that search. Under the null, the series is a random walk without break; under the alternative, it is stationary with a break of one of three kinds: in the mean, in the trend, or in both.

Our engine runs the version with a break in the mean, model A of Zivot and Andrews. For every candidate break date Tb it estimates:

Δyt=μ+θDUt+βt+γyt−1+∑j=1kcjΔyt−j+εtt*=minTb tγ^(Tb)
(5)

DUt equals 0 up to the date Tb and 1 after it, so θ shifts the intercept after Tb and the mean of the series jumps by −θ/γ; cj are the lag coefficients, the other symbols as in (3); tγ^(Tb) is the Student statistic of γ for that date, and t* its smallest value over the candidate dates, which leave out 15% of the sample at each end. Taking the minimum is what makes the date endogenous, and why t* is compared with Zivot and Andrews’ own critical values, about −4.8 at 5%, more negative than Dickey–Fuller’s: the search for the most favourable date is paid for in the threshold. The number of lags k is chosen once, by Akaike’s criterion up to 30 lags on the regression with a constant and a trend, then kept for every date, an approximation due to Baum that makes the statistic slightly conservative; with fewer than about 70 points this search cannot run and the test is not reported.

On a simulated stationary series of 200 points whose mean jumps by 4 at t = 120, ADF gave a p-value of 0.40 and did not reject the unit root: the usual reflex would difference it. Zivot–Andrews gave t* = −7.83, beyond the critical value of −4.81, and placed the break at t = 118. Over 300 such series, the engine named the break in 292 of them (97%).

What it does next is deliberately cautious. It tries to remove a single shift in level and tests the result again; that correction is rudimentary: in our measurement, made before the report described here was added, on the 292 series with a level shift where it named the break, the corrected series never passed the retest, and the correction was applied, wrongly, to 2 of the 600 stationary and random-walk series. The engine therefore returned these 292 series unchanged rather than a transformation it could not validate, and its report now says so in plain words: break detected, not corrected, with its date. We have not replaced that correction: a better-founded removal of the shift and two changes to the choice of cure were measured on a test bench declared in advance, and all three were refused: the first two repaired some cases but degraded others, the third left its own target unchanged. A break confirmed by the analyst can then be declared as a boundary that no difference and no lag ever crosses when series are correlated. In 2008, the protocol ran the same test on commodity prices:

On LME zinc from March 1992 to October 2007, the autocorrelogram suggested a break and the ADF test found the level non-stationary. The F statistics of the break dummies singled out the mean, and the Zivot–Andrews statistic for a break in the mean crossed its critical value, while the statistic for a break in the trend did not. The break sat at observation 165, November 2005.

Two corrections are possible. The first regresses the series on a dummy equal to zero before the break and one after, and continues with the series minus the estimated jump: cleaned this way, zinc was stationary in level. It works only when there is a single break. The second is often more natural for prices: redo the analysis in real terms, since economic agents adjust their expectations as prices move. In our commodity work, the trend break found in nominal Brent in October 2003 disappeared once prices were deflated by OECD producer prices. This route also handles several breaks, and it is the one to use when the series will enter a cointegration test, so that the break does not end up in the residuals of the long-run relationship.

A break can also affect the long-run relationship itself. Tests of cointegration with a break in its coefficients exist (Gregory and Hansen, 1996); the protocol does not include them, but ignoring such a break risks rejecting a cointegration that is real.

A level shift passes for a unit root; Zivot–Andrews finds it
A level shift passes for a unit root; Zivot–Andrews finds it
An ignored break also hides a real cointegration
An ignored break also hides a real cointegration

Causality: Granger, counting lags and directions

In Granger’s sense, X causes Y when the past of X improves the forecast of Y beyond what the past of Y alone gives; the F test that follows needs stationary series.

Our engine tests it as follows. For a lag order p, the restricted model explains yt by a constant and its own p past values, the unrestricted model adds the p past values of x, and:

Fp=(RSSr−RSSu)/pRSSu/(m−2p−1)(6)

RSSr and RSSu are the residual sums of squares of the two models and m the number of complete equations at lag p; under the null that the past of x adds nothing, Fp follows a Fisher distribution with p and m−2p−1 degrees of freedom. Lags are built by shifting the rows in time order, so a missing date removes only the equations that need it and never joins its two neighbours. Before testing, each series goes through ADF; if either is not shown stationary, both are differenced.

The usual scan then keeps the smallest p-value over lags 1 to L, in both directions, at 5%: with seven lags, fourteen chances. Our engine pays for both choices. Over the lags, the smallest p-value πmin of a direction is multiplied by the number L of lags tested (Bonferroni); over the two directions, Holm’s step-down procedure:

π~=min(1, Lπmin)q~(1)=min(1, 2π~(1))q~(2)=max(q~(1), π~(2))
(7)

where π~(1)≤π~(2) are the lag-adjusted p-values of the two directions in increasing order; when only one direction can be tested, its q~ is simply π~. Bonferroni rather than Benjamini–Hochberg over the lags, because the nested lag models are strongly dependent and the positive dependence that Benjamini–Hochberg needs cannot be guaranteed. A direction is declared only if its q~ is below 5%; two significant directions are reported as feedback, and the conclusion is worded as predictability, never as a cause.

On 300 pairs of independent random walks of 200 dates, the scan of the levels declared a relation in 47.7% of the pairs (143 of 300), and still 26.7% (80) after differencing; our engine, 5.7% (17 of 300, 95% interval 3.6% to 8.9%, for a declared level of 5%). On independent stationary series, where differencing changes nothing, the scan still found a relation in 28% of the pairs (84 of 300), because of the fourteen chances; the engine, 2% (6 of 300). The cost in power is measured too: when x really leads y by 2 periods with a coefficient of 0.3, the engine found the right direction in 75% of the pairs (225 of 300), the scan a relation in 97% (292), a figure that means little from a rule that also finds one in a quarter to half of the pairs where there is none. The scan is the naive practice; an analyst who corrects by hand for the lags and the two directions uses the standard method, which we have not measured, and our engine does not claim to beat it: it makes that correction the default. We have not measured another competent method, such as a single lag order fixed in advance.

When one series is compared with several at once, our lead–lag tool fits a VAR whose order is chosen by Akaike’s criterion, tests each response with Granger and corrects across responses with Benjamini–Hochberg. Its p-value for each response is the smallest over the lags tested, not corrected for that choice; only the correction across responses applies. It first tests every input with the rules of the previous sections and names, in a warning, any series not shown stationary; it does not transform them itself, so that the analyst chooses between returns and differences.

These are statements about predictability, not about mechanisms. Between real Brent spot and three-month futures prices, each series helped forecast the other (at 5% in both directions): that says when one price helps to forecast the other, not whether they share a long-run equilibrium, a separate question answered by a cointegration test. Nor is forecasting intervening: a common driver, interest rates for instance, can make one series forecast the other without any effect of one on the other.

Granger on series without relation: the usual scan against our engine, and its power
Granger on series without relation: the usual scan against our engine, and its power

Cointegration and error correction

Our automated engine stops before this step. When two series are integrated it differences them, which removes their long-run relationship, and it says so; a long-run relationship is modelled case by case, with the methods of the 2008 protocol that follow.

Two integrated series are cointegrated when a linear combination of them is stationary: they can drift apart in the short run but come back together in the long run.

Such series can be written as an error-correction model (Granger’s representation theorem), in which the lagged deviation from the long-run path pulls them back. The protocol accepted error correction only when that coefficient was significant and pulled the deviation back: negative, with the deviation written as the dependent variable minus its long-run fit.

Cointegrated series and their error-correction term
Cointegrated series and their error-correction term

Engle–Granger in two steps, on Brent

Engle and Granger’s method (1987) estimates the long-run relationship by least squares, then tests its residuals for a unit root against the critical values of Engle and Yoo (1987), because estimated residuals look more stationary than they are; the second step estimates the short-run equation with the lagged residual.

The example uses monthly real Brent spot prices and six-month futures, both deflated by producer prices and in logarithms, from August 1991 to October 2008. The static regression had a very high R² and a Durbin–Watson statistic below it: by the Granger–Newbold rule, a suspected spurious regression. Yet its residuals were stationary in level by the Phillips–Perron test, so the two prices were cointegrated and the alarm was lifted. In the short-run equation, the lagged residual had a negative coefficient, significant against the Engle–Yoo values: error correction was justified.

Its known weaknesses, a small-sample bias of the static regression (Stock, 1987; Banerjee, Dolado, Hendry and Smith, 1986), errors compounded over two regressions, and a single cointegrating vector, are why the protocol cross-checked it with the methods that follow.

Fully modified OLS and the one-step test of Banerjee, Dolado and Mestre

Phillips and Hansen’s fully modified estimator (1990) corrects the two defects of least squares in a cointegrating regression: the correlation between the cointegration residual and the innovations of the I(1) regressors, a second-order endogeneity, and the autocorrelation and heteroskedasticity of the residuals. Pedroni (1996) showed that tests built on ordinary least squares are biased in small samples and reject too often. In the protocol, the short-run model that follows is estimated by least squares with a Newey–West covariance matrix, so that the standard errors are robust to heteroskedastic and autocorrelated residuals; that corrects the standard errors of an otherwise sound model, not an omitted variable, a missing dynamic or an endogenous regressor. On nominal Brent spot against three-month futures, monthly from October 2002 to May 2008, the long-run relationship estimated by fully modified OLS differed from the one given by plain least squares.

Banerjee, Dolado and Mestre estimate everything in one step: the change in Y is regressed on the change in X and on the lagged levels of both. The long-run relationship is read by dividing the lagged-level coefficients, and the coefficient of lagged Y is the force pulling back towards it. Cointegration is accepted when that coefficient is negative and significant; its Student statistic has a non-standard distribution, compared with the critical values of Ericsson and MacKinnon (2002). The constant is kept whatever its significance, to stay consistent with the parametrisation. A single error term and better small-sample robustness in Monte Carlo experiments are its two advantages over the two-step methods. On the same Brent data, the coefficient was negative with a p-value of 0.01: cointegration was accepted.

Johansen: counting the relations

Johansen’s approach (1988, 1991) rewrites a VAR in levels as an error-correction system and counts the cointegrating relations with two likelihood-ratio tests, the trace and the maximum eigenvalue, whose critical values depend on the deterministic terms and the lag length. The protocol kept a constant in both the relation and the error-correction model, no deterministic trend, and the lag length chosen by the Schwarz criterion.

Between real Brent spot and six-month futures, both tests found one cointegrating relation at 5%. The coefficient of the error-correction term was significant and implied that spot and futures prices converged in about five months, other things equal.

Impulse responses

The protocol read impulse responses with Pesaran and Shin’s generalised impulses (1998) rather than a Cholesky orthogonalisation, whose results depend on the order of the variables; they describe the response to a typical innovation of one variable, not an identified structural shock.

Responses are only worth reading with their precision: confidence bands come from Monte Carlo simulation of the estimated coefficients, the mean response plus or minus two standard deviations. The model that carries them follows from the earlier steps: a VAR in levels for stationary series, a VAR in differences for integrated series that are not cointegrated, and the error-correction model for cointegrated ones. Differencing cointegrated series drops the long-run relation, and the responses then miss the pull back to equilibrium. In a stationary system the response to a one-off shock fades to zero; the accumulated response settles at a constant, which can be zero. In the 2008 study below, the responses were computed on the VAR in differences of cointegrated variables; today we would compute them from the error-correction model.

In our oil model, monthly real Brent spot prices from August 1991 to April 2008 were modelled with a money-supply aggregate and world oil production, the lag length chosen by the Schwarz criterion. A one-standard-deviation innovation in the money aggregate (a generalised impulse, not an identified liquidity shock) raised real Brent prices with a small immediate effect that grew in the second month and faded within about four months; a production shock lowered them.

Our lead–lag tool reports today the non-orthogonalised responses of the estimated VAR, without confidence bands, as the propagation of a unit innovation in the system, not as an effect.

Residual checks

No model is final until its residuals behave like white noise: the protocol checked them with Durbin–Watson for the first order, Ljung–Box for several lags, and Breusch–Godfrey when the equation contains the lagged dependent variable, where Durbin–Watson is not valid.

Autocorrelated residuals mean the model is misspecified. The fix is in the model: missing lags, seasonality, a break, an omitted variable. Taking logarithms does not remove autocorrelation; it serves other purposes, a multiplicative scale, a variance that grows with the level, or coefficients read as elasticities.

In our correlation engine, the Ljung–Box test is a gate: two series are correlated through their whitened innovations only if every innovation series passes it, at 1% divided by the number of series tested; otherwise no p-value is given.

What our engine refuses, and what it does not do

An engine that always answers is not rigorous. These are the cases where ours declines, and the steps it leaves to the analyst:

  1. When the stationarity tests disagree or cannot conclude, no cure is chosen: the series is labelled indeterminate and returned unchanged. On random walks of 200 points, this was the case for 52 of 300 (17%).
  2. A Granger test needs at least the largest lag plus five complete rows, plus three after differencing; below that, the answer is “not enough data”, not a p-value.
  3. A break is searched for one at a time, in the mean. The automatic correction of a single shift is rudimentary and never passed the retest on the 292 series with a level shift of our simulation. The engine reports such a break as detected and not corrected, and the decision goes back to the analyst: a better-founded removal of the shift and two changes to the choice of cure were measured and refused, two of them degrading other cases and the third leaving its target unchanged. Several breaks are not searched for.
  4. A series made of several segments is not transformed as a whole: a cure applied across segments would mean nothing. When segments are made stationary one by one, a segment the cure could not transform is left empty and named, never passed off as stationary.
  5. Cointegration and error correction are not automated: differencing integrated series loses their long-run relationship, which is then modelled case by case.
  6. Granger tests and impulse responses describe predictability within the series given; a common driver left out of the model can create or reverse them.

What the protocol leaves open

Three extensions were left outside the protocol. Cointegration tests with a structural change in the coefficients of the long-run relationship (Gregory and Hansen, 1996). Fractional cointegration, in which the orders of integration need not be whole numbers, for long-memory series whose roots are close to unity (Caporale and Gil-Alana, 2002). And the link with market efficiency: by Granger’s representation theorem, if two prices are cointegrated, the change in one can be partly forecast from the other, so two informationally efficient markets cannot have cointegrated prices (Granger, 1986), a result that underlies more recent efficiency tests.

Why each decision of the protocol

A protocol is rigorous only if each of its decisions has a reason that does not depend on the result one hopes for. These are the reasons behind ours.

Look before testing. The autocorrelogram proves nothing, but it guides: it suggests whether the series is integrated and how many lags the test will need, and it keeps the analysis from running dozens of tests and keeping the one that suits.

Start from the most general model. A unit-root test without a trend that should be there is biased; with a trend that is not needed, it loses power. Starting from the full model and dropping a deterministic term only when it is not significant is the order that guards against both errors.

Test the highest order of integration first. The Dickey–Pantula sequence starts from the difference: testing the level first could let a series integrated of order two pass for order one, and everything that follows, cointegration included, would rest on a wrong premise.

Two tests that fail differently. ADF corrects autocorrelation by adding lags, Phillips–Perron by a non-parametric correction; their weaknesses are not the same, so a conclusion they share is stronger than either alone. When they disagree, we do not pick the convenient one; we look for the reason, often a break. Both have a unit root as their null, so failing to reject it is weak evidence; the KPSS test, whose null is stationarity, completes them: evidence for a unit root is strengthened when ADF and Phillips–Perron do not reject it and KPSS rejects stationarity. Our engine keeps the pair with opposite nulls, ADF and KPSS, and does not choose when they disagree.

Deal with a break before concluding. A shift in the mean makes a stationary series look integrated; concluding to a unit root without having looked for a break risks modelling an artefact. Deflating rather than adding a dummy has an economic reason, agents reason in relative prices, and a statistical one: the break must not end up in the residuals of the long-run relationship.

Critical values that match what was estimated. The residuals of a least-squares regression are, by construction, as small as possible: they look more stationary than they are. Testing them with Dickey–Fuller values would find cointegration too often; hence the tables of Engle and Yoo, and those of Ericsson and MacKinnon for the test on the error-correction term.

Require the sign as well as the significance. A long-run relationship means something only if deviations close: the error-correction term must be significant and pull deviations back, which, with the deviation written as the dependent variable minus its long-run fit, means a negative coefficient; otherwise there is no pull back, however good the fit.

Choose lags by a declared rule. The Schwarz criterion penalises parameters more than Akaike’s and picks the right order as the sample grows; the protocol sets it against Hall’s general-to-specific method, which drops the last lag while it is not significant, and settles any disagreement in the regression itself. The rule is stated before the unit-root conclusion is read. Our engine applies one declared criterion everywhere, Akaike’s, for the unit-root tests, the VAR and the whitening of series.

Do not depend on an arbitrary ordering. A Cholesky decomposition gives impulse responses that change with the order of the variables; Pesaran and Shin’s generalised impulses do not, though they identify no structural shock either.

Check the assumptions last, but always. A model built on least squares assumes residuals without autocorrelation; Durbin–Watson checks the first order, Ljung–Box several lags at once. When they reject, the model is misspecified and its conclusions are not acquired. Some tools are built to withstand autocorrelation, Phillips–Perron or Newey–West standard errors, which is precisely why the protocol uses them where it cannot be ruled out; they make a test or a standard error robust, they do not repair a misspecified model. In an equation with a lagged dependent variable, the Breusch–Godfrey test replaces Durbin–Watson.

Count every test that was run. Seven lags in two directions are fourteen tests; the p-value that is reported pays for all of them, so that “significant” keeps its meaning.

What the protocol forbids follows from the same reasoning: no regression in levels without a cointegration test, no conclusion drawn from a single test, and no choice made because of the conclusion it leads to. When a choice is data-driven, a lag dropped because it is not significant, a break date searched for, the procedure is declared in advance and its critical values account for the search, as Zivot and Andrews do.

The protocol in one picture

Whatever the method, Engle–Granger, fully modified OLS, Banerjee–Dolado–Mestre or Johansen, series are cointegrated only if the residuals of the long-run relation are integrated of a lower order than the series themselves, and an error-correction model is justified only if the series are cointegrated and the lagged residual enters the short-run equation with a significant coefficient that pulls it back towards equilibrium. The contribution of cointegration is to analyse non-stationary series without falling into spurious regressions, and to model their long-run and short-run dynamics together. The same discipline applies today to sensor data, claims development or sales: we used it for the commodity series behind our article on commodities and liquidity.

The decision tree of the protocol
The decision tree of the protocol

References

Methods our engine runs. D. A. Dickey and W. A. Fuller (1979), “Distribution of the estimators for autoregressive time series with a unit root”, Journal of the American Statistical Association; S. E. Said and D. A. Dickey (1984), “Testing for unit roots in autoregressive-moving average models of unknown order”, Biometrika; G. W. Schwert (1989), “Tests for unit roots: a Monte Carlo investigation”, Journal of Business and Economic Statistics; J. G. MacKinnon (1994), “Approximate asymptotic distribution functions for unit-root and cointegration tests”, Journal of Business and Economic Statistics; H. Akaike (1974), “A new look at the statistical model identification”, IEEE Transactions on Automatic Control; D. Kwiatkowski, P. C. B. Phillips, P. Schmidt and Y. Shin (1992), “Testing the null hypothesis of stationarity against the alternative of a unit root”, Journal of Econometrics; B. Hobijn, P. H. Franses and M. Ooms (2004), “Generalizations of the KPSS-test for stationarity”, Statistica Neerlandica; P. Perron (1989); E. Zivot and D. W. K. Andrews (1992), “Further evidence on the great crash, the oil-price shock, and the unit-root hypothesis”, Journal of Business and Economic Statistics; C. F. Baum (2004), ZANDREWS, Statistical Software Components, Boston College; C. R. Nelson and C. I. Plosser (1982); C. R. Nelson and H. Kang (1981); C. W. J. Granger and P. Newbold (1974); M. S. Bartlett (1946), “On the theoretical specification and sampling properties of autocorrelated time-series”, Journal of the Royal Statistical Society, Supplement; G. E. P. Box and G. M. Jenkins (1970), Time Series Analysis: Forecasting and Control; C. W. J. Granger (1969), “Investigating causal relations by econometric models and cross-spectral methods”, Econometrica; S. Holm (1979), “A simple sequentially rejective multiple test procedure”, Scandinavian Journal of Statistics; Y. Benjamini and Y. Hochberg (1995), “Controlling the false discovery rate”, Journal of the Royal Statistical Society B; C. A. Sims (1980); G. M. Ljung and G. E. P. Box (1978).

The 2008 protocol. V. Mignon and S. Lardic (2002), Économétrie des séries temporelles macroéconomiques et financières; C. Hurlin (2002), Économétrie appliquée; G. Chevillon (2005), Économétrie; M. Lubrano (2007), Cours d’économétrie; A. Bernard and G. Roy (2008), study of the size distortions of Johansen’s cointegration tests; C. W. J. Granger and P. Newbold (1974); C. R. Nelson and C. I. Plosser (1982); C. R. Nelson and H. Kang (1981); D. A. Dickey and S. G. Pantula (1987); A. Hall (1994); P. C. B. Phillips and P. Perron (1988); W. K. Newey and K. D. West (1987); P. Perron (1989); E. Zivot and D. W. K. Andrews (1992); C. A. Sims (1980); R. F. Engle and C. W. J. Granger (1987); R. F. Engle and B. S. Yoo (1987); J. H. Stock (1987); P. C. B. Phillips and B. E. Hansen (1990); P. Pedroni (1996); A. Banerjee, J. Dolado and R. Mestre (1998); N. R. Ericsson and J. G. MacKinnon (2002); S. Johansen (1988, 1991); J. G. MacKinnon, A. A. Haug and L. Michelis (1999); M. H. Pesaran and Y. Shin (1998); H. Y. Toda and T. Yamamoto (1995); J. W. J. Kremers, N. R. Ericsson and J. J. Dolado (1992); D. Kwiatkowski, P. C. B. Phillips, P. Schmidt and Y. Shin (1992); T. S. Breusch (1978); L. G. Godfrey (1978); G. M. Ljung and G. E. P. Box (1978); A. W. Gregory and B. E. Hansen (1996); G. M. Caporale and L. A. Gil-Alana (2002); C. W. J. Granger (1986); D. A. Dickey and W. A. Fuller (1979), “Distribution of the estimators for autoregressive time series with a unit root”, Journal of the American Statistical Association; K. H. Chan, J. C. Hayya and J. K. Ord (1977), “A note on trend removal methods: the case of polynomial regression versus variate differencing”, Econometrica; A. Banerjee, J. J. Dolado, D. F. Hendry and G. W. Smith (1986), “Exploring equilibrium relationships in econometrics through static models: some Monte Carlo evidence”, Oxford Bulletin of Economics and Statistics; M. Osterwald-Lenum (1992), “A note with quantiles of the asymptotic distribution of the maximum likelihood cointegration rank test statistics”, Oxford Bulletin of Economics and Statistics; H. P. Boswijk and P. H. Franses (1992), “Dynamic specification and cointegration”, Oxford Bulletin of Economics and Statistics; M. S. Ho and B. E. Sørensen (1996), “Finding cointegration rank in high dimensional systems using the Johansen test: an illustration using data based Monte Carlo simulations”, Review of Economics and Statistics.

Raphael Sebbah

About the author

Raphael Sebbah

Actuary (ISUP) and data scientist, founder of Smart Data Science. Formerly at Amundi (CAAM), Dexia, AIG and Phoenix; co-author of research published in The European Physical Journal C and Brain Communications.

LinkedIn · ORCID · Google Scholar

Let’s build better decisions together

Tell us about the decision you need to make.

A few lines are enough: your sector, the data you have and what you want to improve. We reply personally with a first view of the approach.

  • A few lines are enough
  • NDA on request
  • Code and documentation handed over