Skip to main content

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}
}

Metadata

Release files for hybridnonlinur 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hybridnonlinur 1.0.0
File Size Uploaded
hybridnonlinur-1.0.0.tar.gz 23.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for hybridnonlinur 1.0.0
File Interpreter ABI Platform
hybridnonlinur-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 50.2 kB

Release files / hybridnonlinur-1.0.0.tar.gz

Download URL hybridnonlinur-1.0.0.tar.gz
Size 23.5 kB
Tags Source
SHA-256 checksum
How to use checksums
f460f620b0a3679c3fcf45720862b31a6723357052c277a6341b9ecc999a0074
BLAKE2b-256 checksum
How to use checksums
9a08c12eecfe6060432ce05e48d48e3bc621529ebe0bee36d4956494c7d4050c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.0

Release files / hybridnonlinur-1.0.0-py3-none-any.whl

Download URL hybridnonlinur-1.0.0-py3-none-any.whl
Size 26.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6548056e108fd7e759bf8605cc9785cb8a5e4d1581a000eacb75d88863f730ea
BLAKE2b-256 checksum
How to use checksums
5d92b266b86e2347630eb5f6b91498d1f2242627c2125e7c09a5f6b3361ba376
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.0

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page