Skip to main content

Nonlinear Hybrid Unit Root Tests — A comprehensive Python library for Fourier-based, ESTAR, Quantile, and Fractional Frequency nonlinear unit root testing.

Project description

hybridnonlinur

Nonlinear Hybrid Unit Root Tests — A comprehensive Python library for advanced econometric unit root testing.

Python 3.9+ License: MIT

Overview

hybridnonlinur implements 13 nonlinear unit root tests from the frontier of time series econometrics. Each test is faithfully translated from published papers and verified GAUSS source code.

Implemented Tests

# Test Python Function Reference
1 KSS kss() Kapetanios, Shin & Snell (2003)
2 Fourier-KSS fourier_kss() Christopoulos & Leon-Ledesma (2010)
3 Fourier-ADF fourier_adf() Enders & Lee (2012)
4 Fourier-KSS Bootstrap fourier_kss_bootstrap() Christopoulos & Leon-Ledesma (2010)
5 Fourier-Kruse fourier_kruse() Guris (2019)
6 FFKRUSE ffkruse() Biyikli & Hepsag (2025)
7 Fourier-Sollis fourier_sollis() Ranjbar et al. (2018)
8 FFSOLLIS ffsollis() Biyikli & Hepsag (2025)
9 Fourier-Sollis (Zero-Mean) fourier_sollis_zeromean() Hepkorucu & Cinar (2021)
10 QR-KSS qr_kss() Li & Park (2018)
11 QR-Fourier-KSS qr_fourier_kss() Bahmani-Oskooee et al. (2020)
12 KSS-FF kss_ff() Omay, Corakci & Hasdemir (2021)
13 FWKSS wavelet_kss() Haar Wavelet + Fourier-KSS

Installation

pip install hybridnonlinur

Or from source:

git clone https://github.com/merwanroudane/hybridnonlinur.git
cd hybridnonlinur
pip install -e .

Quick Start

import numpy as np
import hybridnonlinur as hnl

# Load your time series
y = np.cumsum(np.random.randn(200))

# Run individual tests
result = hnl.fourier_kss(y, model=1)
print(result.summary())

# Run ALL 13 tests at once
results = hnl.run_all(y, series_name="My Series", model=1)

# Quantile unit root test
qr_result = hnl.qr_kss(y, model=1, taus=np.arange(0.1, 1.0, 0.1))
print(qr_result.summary())

# Bootstrap critical values
boot_result = hnl.fourier_kss_bootstrap(y, model=1, nboot=1000)
print(boot_result.summary())

Visualization

# Publication-quality comparison table
fig = hnl.plot_comparison_table(list(results.values()))
fig.savefig('comparison.png', dpi=300)

# Quantile profile plot
fig = hnl.plot_quantile_results(qr_result)
fig.savefig('quantile_profile.png', dpi=300)

# Series with Fourier fit
fig = hnl.plot_series_with_fourier(y, model=1, k=1)
fig.savefig('fourier_fit.png', dpi=300)

Model Specifications

  • model=0: No deterministic components (QR-KSS only)
  • model=1: Intercept only
  • model=2: Intercept + trend

Test Categories

ESTAR Tests (t-statistic, reject if stat < CV)

KSS, Fourier-KSS, Fourier-ADF, KSS-FF, FWKSS

Kruse Tests (tau-statistic, reject if stat > CV)

Fourier-Kruse, FFKRUSE

AESTAR/Sollis Tests (F-statistic, reject if stat > CV)

Fourier-Sollis, FFSOLLIS, Fourier-Sollis (Zero-Mean)

Quantile Tests (t-statistic per quantile)

QR-KSS, QR-Fourier-KSS

Dependencies

  • NumPy, SciPy, Matplotlib, tabulate

Author

Dr. Merwan Roudane
Email: merwanroudane920@gmail.com
GitHub: https://github.com/merwanroudane/hybridnonlinur

License

MIT License — see LICENSE for details.

Citation

If you use this library in your research, please cite:

@software{roudane2026hybridnonlinur,
  author = {Roudane, Merwan},
  title = {hybridnonlinur: Nonlinear Hybrid Unit Root Tests in Python},
  year = {2026},
  url = {https://github.com/merwanroudane/hybridnonlinur}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hybridnonlinur-1.0.0.tar.gz (23.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hybridnonlinur-1.0.0-py3-none-any.whl (26.8 kB view details)

Uploaded Python 3

File details

Details for the file hybridnonlinur-1.0.0.tar.gz.

File metadata

  • Download URL: hybridnonlinur-1.0.0.tar.gz
  • Upload date:
  • Size: 23.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0

File hashes

Hashes for hybridnonlinur-1.0.0.tar.gz
Algorithm Hash digest
SHA256 f460f620b0a3679c3fcf45720862b31a6723357052c277a6341b9ecc999a0074
MD5 4a3ffd5a5bbd5d03c792ca9054c0446d
BLAKE2b-256 9a08c12eecfe6060432ce05e48d48e3bc621529ebe0bee36d4956494c7d4050c

See more details on using hashes here.

File details

Details for the file hybridnonlinur-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: hybridnonlinur-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 26.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0

File hashes

Hashes for hybridnonlinur-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6548056e108fd7e759bf8605cc9785cb8a5e4d1581a000eacb75d88863f730ea
MD5 76e0ec43da7d5d359247996072631d1d
BLAKE2b-256 5d92b266b86e2347630eb5f6b91498d1f2242627c2125e7c09a5f6b3361ba376

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page