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.
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.DFGLSgives the statistic, p-value, and sample-size-dependent critical values.Where the pattern lives:
phillips_perronincrates/tsecon-diag/src/phillips.rsis the same shape of contribution, landed recently — GLS-detrend, reuse the existing ADF regression/lag-selection machinery incrates/tsecon-diag/src/unitroot.rs, then a critical-value table.Acceptance criteria
crates/tsecon-diag/(new module), a#[pyfunction]binding, and a type-stub entryfixtures/that never imports tsecon (usesarch), plus the fixture JSONarch.unitroot.DFGLSfor bothregression="c"and"ct"at a stated tolerancedocs/reference/validation-matrix.mdnaming the reference and toleranceBonus: 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.