Non-FictionStudent's ShortcutTime Series

Cointegration Testing Primer eBook

Test for unit roots and cointegration using Excel'

by Ware Providencia

  • English
  • 149 pages
  • 2026
  • SamEnrico

Test for unit roots and cointegration using Excel's regression on non-stationary data. Apply Engle-Granger method for time series econometrics exams.

Formats

Free sample

Chapter 1: The Spurious Corridor--–- In the autumn of 1992, a group of quantitative analysts at a prominent London hedge fund made a discovery that seemed too good to be true. After months of searching through global financial data, they found that the quarterly percentage change in the Bangladesh butter production appeared to predict the total return of the Standard & Poor's 500 index with a lag of one quarter. The regression was beautiful: an R-squared of 0.81, t-statistics that sailed past the conventional thresholds for statistical significance, and a pattern in the scatter plot that looked like a carefully aligned row of dominoes. The analysts presented their findings to the partners, who allocated an initial five million pounds to a strategy that would buy or sell US equities based on the butter production forecast.What happened next was not a mystery to anyone who understood the nature of non-stationary time series. The strategy worked for exactly two quarters, then collapsed.

The losses mounted so quickly that the position was closed within six months. The analysts were baffled. How could such a statistically significant relationship evaporate so completely? They had checked for autocorrelation, examined the residuals, and satisfied every conventional regression diagnostic taught in their econometrics courses. Yet the butter–stock market connection was nothing more than a statistical mirage—a spurious correlation that emerged from the peculiar behavior of two completely unrelated random walks.This chapter introduces the single most important concept you must master before any unit root or cointegration test: the spurious regression problem.

If you do not understand this chapter, every regression you run on time series data for the rest of your career will be suspect. If you do understand it, you will be able to spot nonsense relationships that fool most analysts, and you will appreciate why cointegration testing exists in the first place. The butter example is not an outlier. Spurious regressions are the default outcome when working with economic and financial data. Cointegration is the exception that must be proven.The Fundamental Problem with Standard Regression Assumptions The ordinary least squares (OLS) regression that you learned in introductory econometrics rests on a set of assumptions about the data.

One of the most critical assumptions is that the variables being analyzed are stationary. Stationarity, in plain language, means that the statistical properties of a series—its mean, variance, and autocovariance—do not change over time. A stationary series fluctuates around a constant mean. When a shock occurs, the series eventually returns to that mean. The variance around the mean stays roughly constant regardless of how far back in time you look.Consider the difference between two simple processes.

Imagine a rubber band stretched between two fixed points. If you pull it down and release it, it snaps back to its original position. That is a stationary process: there is an equilibrium, and deviations from that equilibrium are temporary. Now imagine a leaf floating on a river. If you push the leaf, it does not return to its original position.

It continues downstream, and the effect of your push is permanent. That is a non-stationary process, specifically a random walk.Standard OLS regression assumes that both the dependent variable and the independent variables are like the rubber band—stationary, mean-reverting, with constant variance. When you violate this assumption—when you regress one random walk on another—the entire statistical apparatus of OLS breaks down. The coefficient estimates do not converge to true values. The t-statistics do not follow the t-distribution.

The R-squared does not measure goodness of fit in any meaningful sense. And perhaps most dangerously, the standard diagnostics that you learned to trust—p-values, confidence intervals, F-tests—become completely unreliable.The problem is not small or subtle. It is catastrophic. As the econometricians Clive Granger and Paul Newbold showed in their famous 1974 paper, when you regress two independent random walks on each other, you will find a statistically significant relationship approximately 75 percent of the time at the 5 percent significance level. That means three-quarters of the time, your regression will tell you there is a relationship when there is absolutely none.

The Type I error rate is not 5 percent; it is 75 percent. This is not a minor inconvenience. It is a fundamental failure of the statistical method.The Drunk Man and His Untrained Dog To make the spurious regression problem intuitive rather than merely mathematical, let us return to the analogy that will appear throughout this book. Imagine a drunk man stumbling home from a pub late at night. His path is a random walk.

With each step, he moves in a direction that has no relationship to his previous steps. Sometimes he staggers east, sometimes west. His location after one hundred steps is completely unpredictable from his location after ninety-nine steps, except that it will be nearby.Now imagine that this drunk man is accompanied by an untrained dog. The dog is also on a random walk, but its random steps are independent of the drunk man's steps. The dog sniffs, dashes after imaginary squirrels, and generally wanders according to its own erratic impulses.

The drunk man and the dog are not connected. There is no leash. There is no invisible bond. They are two independent random processes sharing the same sidewalk.Here is the critical insight: if you watch the drunk and the dog for a while, you will see periods where they appear to move together. They might both head east for several blocks.

They might both pause at the same corner. A naive observer might conclude that the dog is following the drunk, or that the drunk is responding to the dog. But this apparent relationship is purely coincidental—a byproduct of the fact that both are moving randomly. If you run a regression of the drunk's position on the dog's position, you will often get a high R-squared, significant t-statistics, and a low Durbin-Watson statistic. All of these are illusions.The drunk and the dog represent two unrelated economic or financial time series.

The unemployment rate and the price of tea in China. The GDP of Brazil and the number of letters in the winning word of the Scripps National Spelling Bee. The S&P 500 and butter production in Bangladesh. Any pair of independent random walks will produce spurious regressions. The butter analysts in London were fooled by the drunk and the dog.The Spurious Regression Triad Throughout this book, you will encounter a set of diagnostic tools for detecting spurious regressions.

But before we dive into the formal tests, you need to be able to spot a spurious regression at a glance. Every spurious regression exhibits three characteristic symptoms. I call these the Spurious Regression Triad, and you should memorize them immediately.The first symptom is a surprisingly high R-squared. In a spurious regression involving two independent random walks, the R-squared will often exceed 0.80 even with moderate sample sizes. This is because random walks tend to drift in the same direction for extended periods purely by chance.

The regression interprets this coincidental co-movement as explanatory power. You should become deeply suspicious whenever you see a time series regression with an R-squared above 0.70 and variables that are plausibly non-stationary, such as asset…

This is the end of the free sample. Get the eBook to keep going. Buy now

About this book

Test for unit roots and cointegration using Excel's regression on non-stationary data. Apply Engle-Granger method for time series econometrics exams.

Details

Author
Ware Providencia
Publisher
SamEnrico
Language
English
Genre
Non-Fiction, Student's Shortcut, Time Series
Released
2026-05-29
Pages (approx.)
149
Available as
eBook, Audiobook

Read better in the ZLOADR app

Your eBooks on your phone or tablet. Sign in with your SamEnrico account and start reading.

More by Ware Providencia

See all

You may also like

See all