σμimplied vol · KKmax(S−K,0)udβρᵢⱼfat tailsPnL · drawdownyield · TdSₜ = μSₜ dt + σSₜ dWₜC = S·N(d₁) − K·e⁻ʳᵀ·N(d₂)σₚ² = wᵀΣwd₁ = [ln(S/K) + (r + σ²⁄2)T] ⁄ σ√T∂V/∂t + ½σ²S²·∂²V/∂S² + rS·∂V/∂S − rV = 0Sharpe = (Rₚ − R_f) ⁄ σₚVaR₉₉ = μ − 2.33σρ = Cov(X,Y) ⁄ σₓσᵧE[Rₚ] = Σ wᵢ·E[Rᵢ]φ(x) = e^(−x²/2) ⁄ √2πE[Rᵢ] = R_f + βᵢ(E[Rₘ] − R_f)dXₜ = θ(μ − Xₜ)dt + σ dWₜσ²ₜ = ω + α·ε²ₜ₋₁ + β·σ²ₜ₋₁C − P = S − K·e⁻ʳᵀΔ = ∂V/∂S Γ = ∂²V/∂S²p = (e^(rΔt) − d) ⁄ (u − d)rₜ = ln(Pₜ ⁄ Pₜ₋₁)E[Xₜ₊₁ | ℱₜ] = Xₜf* = (bp − q) ⁄ bz = (x − μ) ⁄ σP(N=k) = λᵏe^(−λ) ⁄ k!Θ = −∂V/∂Tν = S·φ(d₁)·√Tmin wᵀΣw s.t. wᵀμ = μ*∫Σ∂∞λ
uantCraft AcademyRoadmapsSkills
Ctrl K
AO
+1.2k Learners
LoginJoin ↗
RoadmapsSkills
AO
+1.2k Learners
Login
  • English
  • Français
  • Español
  • العربية
  • Português
  • Deutsch
  • 日本語
  • 中文
σμimplied vol · KKmax(S−K,0)udβρᵢⱼfat tailsPnL · drawdownyield · TdSₜ = μSₜ dt + σSₜ dWₜC = S·N(d₁) − K·e⁻ʳᵀ·N(d₂)σₚ² = wᵀΣwd₁ = [ln(S/K) + (r + σ²⁄2)T] ⁄ σ√T∂V/∂t + ½σ²S²·∂²V/∂S² + rS·∂V/∂S − rV = 0Sharpe = (Rₚ − R_f) ⁄ σₚVaR₉₉ = μ − 2.33σρ = Cov(X,Y) ⁄ σₓσᵧE[Rₚ] = Σ wᵢ·E[Rᵢ]φ(x) = e^(−x²/2) ⁄ √2πE[Rᵢ] = R_f + βᵢ(E[Rₘ] − R_f)dXₜ = θ(μ − Xₜ)dt + σ dWₜσ²ₜ = ω + α·ε²ₜ₋₁ + β·σ²ₜ₋₁C − P = S − K·e⁻ʳᵀΔ = ∂V/∂S Γ = ∂²V/∂S²p = (e^(rΔt) − d) ⁄ (u − d)rₜ = ln(Pₜ ⁄ Pₜ₋₁)E[Xₜ₊₁ | ℱₜ] = Xₜf* = (bp − q) ⁄ bz = (x − μ) ⁄ σP(N=k) = λᵏe^(−λ) ⁄ k!Θ = −∂V/∂Tν = S·φ(d₁)·√Tmin wᵀΣw s.t. wᵀμ = μ*∫Σ∂∞λ
uantCraft AcademyRoadmapsSkills
Ctrl K
AO
+1.2k Learners
LoginJoin ↗
RoadmapsSkills
AO
+1.2k Learners
Login
  • English
  • Français
  • Español
  • العربية
  • Português
  • Deutsch
  • 日本語
  • 中文
Time Series skill›Module 1 · Stationarity and memory›Topic 1.3·~50 minIntermediate

Unit roots and the ADF test

Skill positionModule 1 of 5 · Topic 3 of 3
1.3 Unit roots and the ADF test
—Lab score— / 100Total XP—Streak—

Is there a unit root?

In the autoregression xt=φxt−1+εtx_t=\varphi x_{t-1}+\varepsilon_txt​=φxt−1​+εt​ the coefficient φ\varphiφ decides the behaviour. With ∣φ∣<1|\varphi|<1∣φ∣<1 the series is stationary and pulled back to its mean. With φ=1\varphi=1φ=1 the series has a unit root: it is a random walk, shocks never fade and the best forecast is the last value. The question matters for trading, because a mean-reversion strategy needs the first case and a trend strategy can live with the second. The Dickey-Fuller test rewrites the model as Δxt=γxt−1+εt\Delta x_t=\gamma x_{t-1}+\varepsilon_tΔxt​=γxt−1​+εt​ with γ=φ−1\gamma=\varphi-1γ=φ−1 and tests the null γ=0\gamma=0γ=0 (unit root) against γ<0\gamma<0γ<0 (stationary).

Δxt=α+βt+γxt−1+∑i=1pδi Δxt−i+εt,DF=γ^se(γ^),t1/2=ln⁡(1/2)ln⁡φ\Delta x_t=\alpha+\beta t+\gamma x_{t-1}+\sum_{i=1}^{p}\delta_i\,\Delta x_{t-i}+\varepsilon_t,\qquad \mathrm{DF}=\frac{\hat\gamma}{\mathrm{se}(\hat\gamma)},\qquad t_{1/2}=\frac{\ln(1/2)}{\ln\varphi}Δxt​=α+βt+γxt−1​+i=1∑p​δi​Δxt−i​+εt​,DF=se(γ^​)γ^​​,t1/2​=lnφln(1/2)​(1)

The augmented version (ADF) adds lagged differences Δxt−i\Delta x_{t-i}Δxt−i​ so that the residuals are free of autocorrelation. The statistic is the usual ttt-ratio of γ^\hat\gammaγ^​, but under the null it does not follow Student's ttt distribution. It follows the Dickey-Fuller distribution, whose critical values are more negative: about −2.86-2.86−2.86 at 5% with a constant and about −3.41-3.41−3.41 with a constant and a trend. Reject the unit root only when the statistic is below the critical value. Failing to reject is weak evidence: the test has little power when φ\varphiφ is close to one or the sample is short, so a stationary but persistent series is often mistaken for a random walk. For a stationary AR(1) the half-life of a shock is ln⁡(1/2)/ln⁡φ\ln(1/2)/\ln\varphiln(1/2)/lnφ.

Reading an ADF resultA regression of Δxt\Delta x_tΔxt​ on xt−1x_{t-1}xt−1​ gives γ^=−0.08\hat\gamma=-0.08γ^​=−0.08 with standard error 0.030.030.03, so the statistic is −0.08/0.03≈−2.67-0.08/0.03\approx-2.67−0.08/0.03≈−2.67. Against the 5% critical value −2.86-2.86−2.86 this is not low enough: do not reject the unit root. The implied φ^=0.92\hat\varphi=0.92φ^​=0.92 would have a half-life of ln⁡(0.5)/ln⁡(0.92)≈8.3\ln(0.5)/\ln(0.92)\approx8.3ln(0.5)/ln(0.92)≈8.3 days if the series were really stationary, so a statistic of −3.4-3.4−3.4 instead would clear the bar and the series could be treated as mean-reverting.
  • ADF null: a unit root. Reject only when the statistic is below the Dickey-Fuller critical value.
  • Low power: a persistent stationary series often fails to reject, so absence of rejection is not proof.
  • Half-life of a shock in a stationary AR(1): ln⁡(1/2)/ln⁡φ\ln(1/2)/\ln\varphiln(1/2)/lnφ.

Lab · what's graded

  • The Dickey-Fuller coefficient15 pts
  • A half-life15 pts
  • The test statistic15 pts
  • Reject or not15 pts
  • Match the vocabulary15 pts
  • Running a unit-root test10 pts
  • Not rejecting is not proving15 pts
0/ 7 answered
Tasks
1Numeric answer15 ptsNot answered

An AR(1) has φ=0.95\varphi=0.95φ=0.95. In the form Δxt=γxt−1+εt\Delta x_t=\gamma x_{t-1}+\varepsilon_tΔxt​=γxt−1​+εt​, what is γ=φ−1\gamma=\varphi-1γ=φ−1?

gamma=gamma =gamma=accepted: ± 0.002
2Numeric answer15 ptsNot answered

A spread follows a stationary AR(1) with φ=0.9\varphi=0.9φ=0.9 per day. After how many days does half of a shock remain, ln⁡(0.5)/ln⁡(0.9)\ln(0.5)/\ln(0.9)ln(0.5)/ln(0.9)? Give it to one decimal.

days=days =days=accepted: ± 0.1
3Numeric answer15 ptsNot answered

A Dickey-Fuller regression gives γ^=−0.08\hat\gamma=-0.08γ^​=−0.08 with standard error 0.030.030.03. What is the test statistic γ^/se(γ^)\hat\gamma/\mathrm{se}(\hat\gamma)γ^​/se(γ^​)? Give it to two decimals.

stat=stat =stat=accepted: ± 0.02
4Choice15 ptsNot answered

An ADF test on a stock's price gives a statistic of −1.8-1.8−1.8. The 5% critical value is −2.86-2.86−2.86. What do you conclude?

5Match15 ptsNot answered

Match each term with its meaning.

Pick the partner of each item on the left.

ADF null
KPSS null
Dickey-Fuller critical value
Half-life
6Order the steps10 ptsNot answered

Put the steps in order.

Drag to reorder, or focus an item, press Space to lift it, the arrow keys to move it and Space to drop it.

  1. 1Compare the statistic with the Dickey-Fuller critical value
  2. 2Choose a constant and a trend from the plot
  3. 3If you cannot reject, difference the series and test again
  4. 4Choose enough lagged differences to whiten the residuals
7Explain in words15 ptsNot answered

In one or two sentences, explain why failing to reject the unit root in an ADF test does not prove that the series is a random walk.

Math modeKeyboard or LaTeX inputTask 1 of 7 · Ctrl ⏎ to check

Log in to run your code.

Every lecture is free to read. Create an account or log in to run code, run tests and submit this lab.

  • In-browser IDE with a bash terminal — nothing to install
  • Instant grading, XP and your place on the skill
Create an accountLog in
OR
Continue with GitHub