Skip to content

Add DF-GLS (Elliott-Rothenberg-Stock) unit-root test #2

Description

@cacoleman16

What: Add the Elliott-Rothenberg-Stock DF-GLS unit-root test — an ADF variant on GLS-detrended data, more powerful than ADF against local alternatives and a first-line test in applied work.

Why it's a good first issue: the validation target runs in the test environment, so there is no ambiguity about whether it is right. arch.unitroot.DFGLS gives the statistic, p-value, and sample-size-dependent critical values.

Where the pattern lives: phillips_perron in crates/tsecon-diag/src/phillips.rs is the same shape of contribution, landed recently — GLS-detrend, reuse the existing ADF regression/lag-selection machinery in crates/tsecon-diag/src/unitroot.rs, then a critical-value table.

Acceptance criteria

  • Rust core in crates/tsecon-diag/ (new module), a #[pyfunction] binding, and a type-stub entry
  • A fixture generator under fixtures/ that never imports tsecon (uses arch), plus the fixture JSON
  • A golden test matching arch.unitroot.DFGLS for both regression="c" and "ct" at a stated tolerance
  • A row in docs/reference/validation-matrix.md naming the reference and tolerance

Bonus: this builds the GLS-detrending engine that Ng-Perron M-tests reuse (see the other issue).

See CONTRIBUTING.md for the validation-first workflow. Happy to advise on scope in the comments.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions