I am new to statistics and I have been struggling to understand the three different versions of (A)DF test. For simplicity I will use the naming conventions from https://en.wikipedia.org/wiki/Dickey%E2%80%93Fuller_test.
My understanding is that we if generate a time series under the null hypothesis, our t-statistics would follow a well-defined distribution. Our null hypothesis is $H_0 :\delta = 0$.
For example let's take version 2 from the wiki page, i.e. $\Delta y_t = a_0+\delta y_{t-1}+u_t$. We use this formula under the null hypothesis ($\Delta y_t = a_0+u_t$) as the data generating process. Intuitively I would assume that fitting a constant term ($\Delta y_t = a_0+\delta y_{t-1}+u_t$) would pick up the real $a_0$ used in the data generating process (which it did), and that should be enough to remove the effects of $a_0$ on the regression. If we compute the t-statistic for $\delta y_{t-1}$ for each of the time series generated, they would follow a well-defined distribution regardless of what value $a_0$ takes, but it turned out to be wrong.
I did this simulation and it seems the percentiles of this distribution is dependent on $a_0$. However, by adding the trend term ($a_1t$ from version 3), the distribution of out test statistic seems to be independent of the $a_0$ used in data generation. What really confused me was that this trend term implies the $y_t$ process is somewhat quadratic. Is there any intuition behind why we have to include this term?
That brings me to my questions
What exactly are the $H_0$ and $H_1$ of the three versions of the (A)DF tests? Is $\delta = 0$ the only hypothesis (other than the data generating process itself) ?
Why does adding in the $a_1t$ trend term make the test statistic independent of $a_0$ (of the data generating process)? Intuition / proof both works.
(How) does this extend to higher orders of t? E.g. if the data generating process is $\Delta y_t = a_0+u_t + kt$, how should I set up my ADF regression? Perhaps something like $\Delta y_t = a_0+a_1t+a_2t^2+\delta y_{t-1}+u_t$?
**update
On page 3, last paragraph of https://www.econstor.eu/bitstream/10419/67744/1/616664753.pdf. The author mentioned the same trick. Is there a proof / some intuition behind this?
The simulation code,
- If I set c to be nonzero, the distribution changes
- c = 0 gives me the same ADF percentiles as the statsmodels adf functions
- using regression = 'ct' this problem goes away
from statsmodels.tsa.stattools import adfuller as adf
import numpy as np
adf_distribution = []
c = 0
for j in range(5000):
x = 0
xs = []
for i in range(1000):
xs.append(x)
x = x + np.random.normal(0,1) + c
statistic = adf(xs,regression = 'c',maxlag = 0,autolag = None)[0]
adf_distribution.append(statistic)