qDickeyFullerTrend

qDickeyFullerTrend(p, tail=False)

Quantile of the Dickey-Fuller statistic.

Parameters:
pfloat

The probability.

tailbool

Tail flag.

Default value is False.

If True, the quantile associated to (1-p) is computed.

Returns:
qfloat

The quantile of order p or (1-p).

Notes

Refer to Dickey-Fuller stationarity test.

Let (X_1, \hdots, X_n) denote the data and W(r) the Wiener process. Let us define W^{a}(r) = W(r) - \int_{0}^{1} W(r)\di{r} and W^{b}(r) = W^{a}(r) - 12 \left(r - \frac{1}{2} \right) \int_{0}^{1} \left(s - \frac{1}{2} \right) W(s)\di{s}.

The Dickey-Fuller statistic is the asymptotic distribution of the Student statistic used to test the model with drift and trend in a time series:

\boldsymbol{X_t = a + bt + \rho X_{t-1} + \varepsilon_{t}}

We test:

\left\{
\begin{array}{lr}
  \cH_0: & \rho = 1 \\
  \cH_1: & \rho < 1
\end{array}
\right.

thanks to the Student statistic defined by:

t_{\rho=1} = \frac{\rho_n-1}{\hat{\sigma}_{\rho_n}}

where \sigma_{\rho_n} is the least square estimate of the standard deviation of \Hat{\rho}_n. Under the null hypothesis \cH_0, t_{\rho=1} converges towards the Dickey-Fuller distribution:

t_{\rho = 1} \stackrel{\mathcal{L}}{\longrightarrow} \frac{\int_{0}^{1}W^{b}(r) \di{W(r)}}{\int_{1}^{0} W^{b}(r)^2 \di{r}}

Examples

>>> import openturns as ot
>>> q = ot.DistFunc.qDickeyFullerTrend(0.01)