ADFTest - Augmented Dickey-Fuller Stationary Test

Returns the p-value of the Augmented Dickey-Fuller (ADF) test, which tests for a unit root in the time series sample.

Syntax

ADFTest(X, Order, Length, Options, test-down, Return_type, Alpha)
X
is the univariate time series data (one dimensional array of cells (e.g. rows or columns)).
Order
is the time order in the data series (i.e. the first data point's corresponding date (earliest date=1 (default), latest date=0)).
Order Description
1 ascending (the first data point corresponds to the earliest date) (default)
0 descending (the first data point corresponds to the latest date)
Length
is the lag length of the autoregressive process. If missing, an initial value equal to the cubic root of the input data size is used.
Options
are the model description flags for the Augmented Dickey-Fuller test scenario/condition (1 = no constant, 2 = contant-only, 3 = trend only, 4 = constant and trend, 5= const, trend and tredd squared).
Method Description
1 no deterministic component
2 constant only
3 trend only
4 constant and trend
5 constant, trend, and trend squared
test-down
is the mode of testing. If set to TRUE (default), ADFTest performs a series of tests; it starts with the input length lag, but the actual length lag order used is obtained by testing down.
Return_type
is a switch to select the return output (1 = P-Value (default), 2 = Test Stats, 3 = Critical Value.
Method Description
1 P-Value
2 Test Statistics (e.g. Z-score)
3 Critical Value
Alpha
is the statistical significance of the test (i.e. alpha). If missing or omitted, an alpha value of 5% is assumed.

Remarks

  1. The testing procedure for the ADF test is applied to the following model: $$\Delta y_t = \alpha + \beta_1 t + \beta_2 t^2 + \gamma y_{t-1} + \phi_1 \Delta y_{t-1} + \cdots + \phi_{p-1} \Delta y_{t-p+1} + \varepsilon_t$$ Where:
    • $\Delta $ is the first different operator
    • $ \alpha$ is a constant
    • $ \beta_1$ is the coefficient on a time trend
    • $ \beta_2$ is the coefficient on a squared time trend
  2. This model can be estimated, and testing for a unit root is equivalent to testing that $\gamma = 0$.
  3. In sum, the ADF test hypothesis is as follows: $$H_{o}: \gamma=0$$ $$H_{1}: \gamma \lt 0$$ Where:
    • $H_{o}$ is the null hypothesis (i.e. $y_t$ has a unit-root)
    • $H_{1}$ is the alternate hypothesis (i.e. ${y_t}$ does not have a unit-root)
  4. The test statistics ($\tau$) value is calculated as follows: $$\tau = \frac{\hat{\gamma}}{\sigma_{\hat\gamma}}$$ where:
    • $\hat{\gamma}$ is the estimated coefficient
    • $\sigma_{\hat\gamma}$ is the standard error in the coefficient estimate
  5. The test statistics value ($\tau$) is compared to the relevant critical value for the Dickey–Fuller Test. If the test statistic is less than the critical value, we reject the null hypothesis and conclude that no unit-root is present.
  6. The number of non-missing values in the input time series must be at least 10.
  7. The ADF test does not directly test for stationarity, but indirectly through the existence (or absence) of a unit-root. Furthermore, ADF incorporates a deterministic trend (and trend squared), so it allows a trend-stationary process to occur.
  8. The main difference between the ADF test and a normal Dickey-Fuller test is that ADF allows for higher-order autoregressive processes.
  9. For the test-down approach, we start with a given maximum lag length and test down by running several tests; in each, we exaimine the high-order coefficient's t-stat for significance.
  10. It is not possible to use a standard t-distribution to provide critical values for this test. Therefore this test statistic (i.e. $\tau$) has a specific distribution simply known as the Dickey–Fuller table.
  11. The ADF probability tables were simulated for different scenarios (e.g. no deterministic part, constant only, etc.) from 2,000,000 replications with gaussian errors.
  12. The time series is homogeneous or equally spaced.
  13. The time series may include missing values (e.g. #N/A) at either end.

Examples

Example 1:

 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
A B
Date Data
January 10, 2008 -2.827
January 11, 2008 -0.947
January 12, 2008 -0.877
January 14, 2008 1.209
January 13, 2008 -1.669
January 15, 2008 0.835
January 16, 2008 -0.266
January 17, 2008 1.361
January 18, 2008 -0.343
January 19, 2008 0.475
January 20, 2008 -1.153
January 21, 2008 1.144
January 22, 2008 -1.070
January 23, 2008 -1.491
January 24, 2008 0.686
January 25, 2008 0.975
January 26, 2008 -1.316
January 27, 2008 0.125
January 28, 2008 0.712
January 29, 2008 -1.530
January 30, 2008 0.918
January 31, 2008 0.365
February 1, 2008 -0.997
February 2, 2008 -0.360
February 3, 2008 1.347
February 4, 2008 -1.339
February 5, 2008 0.481
February 6, 2008 -1.270
February 7, 2008 1.710
February 8, 2008 -0.125
February 9, 2008 -0.940

Formula Description (Result)
=ADFTest(\$B\$2:\$B\$32,1,,1,TRUE,1) P-Value with no Constant (0.01)
=ADFTest (\$B\$2:\$B\$32,1,,2,TRUE,2) Test Stats with Constant Only (-8.784)
ADFTest (\$B\$2:\$B\$32,1,,3,TRUE,3) Critical Value with Constant and Trend (-3.966)
ADFTest (\$B\$2:\$B\$32,1,,4,TRUE,1) P-Value with Constant, Trend, and Trend Squared (0.01)

 

Files Examples

Related Links

Comments

Article is closed for comments.

Was this article helpful?
1 out of 1 found this helpful