Tag: Dickey Fuller
Test for Random Walk in Time Series
by theorangedog on Jan.27, 2008, under Skills
One of my most-viewed posts concerns the Dickey Fuller test, and the most downloaded document is the Dickey Fuller example.
So, I thought I’d expand on that in a series of posts as it is an area of interest for me, and obviously many others out there.
Let’s start with the idea of a Random Walk. A time series is a random walk if it is explained by the equation
. This requires that the error term
has a constant variance and is uncorrelated with previous error terms.
This equation states that the best predictor for any
is
for any period after t-1. So, let’s start by testing a set of financial time series to see if it is a random walk.
If you go to the Federal Reserve website, you can download data for a number of currencies. I downloaded the data for the Pound, and opted to use the dates Jan 01, 2007 to Dec 31, 2007. The spreadsheet used is attached here.
Notice that the t-value for the intercept is 1.72, meaning the intercept is not significantly different than zero. Also, the lagged variable slope coefficient is .977, which is very close to the value of 1 we would expect for a random walk. However, a random walk is not covariance stationary, meaning it does not have a fixed mean and variance, thus the t-test for this variable is unreliable.
So, how can we confirm out suspicion that this time series is a random walk? We can regress the first differences of the series. Essentially, we look at the equation:
where
.
If the series is indeed random, we would expect that
and
would be equal to zero. The results of that test are attached here. Notice that both regression coefficients are not statistically significantly different from zero. Also, I added an autocorrelation measure and t-test to go with the error terms. These measures show that there is no first lag autocorrelation in the model.
Thus, we can conclude that the exchange rate for the Great British Pound followed a random walk in 2007. That’s a good starting point.
Basic Dickey Fuller Test
by theorangedog on Nov.02, 2007, under Skills
See the attached document for an example of how to perform a Dickey Fuller test for cointegration, along with an excerpt of the distinct t-table.
This example determines if a single data set is cointegrated. Replacing this series with the desired measure of spread between two series, or another metric such as the log ratio of two series, may be done as a method for identifying pairs trading candidates.
Co-integration and Error Correction, Representation, Estimation, and Testing - Granger and Engle
by theorangedog on Nov.01, 2007, under Skills
Co-integration and Error Correction, Representation, Estimation, and Testing - Granger and Engle
Abstract:
The relationship between co-integration and error correction models, first suggested in Granger (1981), is here extended and used to develop estimation procedures, tests, and empirical examples.If each element of a vector of time series x, first achieves stationarity after differencing, but a linear combination of a’x, is already stationary, the time series x, are said to be co-integrated with co-integrating vector a. There may be several such co-integrating vectors so that a becomes a matrix. Interpreting a’x, = 0 as a long run equilibrium, co-integration implies that deviations from equilibrium are stationary, with finite variance, even though the series themselves are nonstationary and have infinite variance.
The paper presents a representation theorem based on Granger (1983), which connects the moving average, autoregressive, and error correction representation for co-integrated systems. A vector autoregression in differenced variables is incompatible with these representations. Estimation of these models is discussed and a simple but asymptotically efficient two-step estimator is proposed. Testing for co-integration combines the problems of unit root tests and tests with parameters unidentified under the null. Seven statistics are formulated and analyzed. The critical values of these statistics are calculated based on a Monte Carlo simulation. Using these critical values, the power properties of the tests are examined and one test procedure is recommended for application.
In a series of examples it is found that consumption and income are co-integrated, wages and prices are not, short and long interest rates are, and nominal GNP is co-integrated with M2, but not M1, M3, or aggregate liquid assets.
KEYWORDS: Co-integration, vector autoregression, unit roots, error correction, multi-variate time series, Dickey-Fuller tests.



