help qcointlib

Title

qcointlib -- Stata library for quantile cointegration analysis:
estimators and tests covering the modern literature (Xiao 2009, Kuriyama 2016,
Li-Zheng-Guo 2016, Furno 2020, Cho-Kim-Shin 2015, Tu-Liang-Wang 2022,
Li-Zhang-Zheng 2025).

Overview

qcointlib is a unified, dependency-free implementation in Stata/Mata of
the quantile cointegration framework. It provides:

- Eight estimators (FMQR, Median/LAD, Augmented FM-QR, Polynomial QR,
NP local-constant, Functional-coefficient LLQR, NFMQR, QARDL via SSC)

- Twelve hypothesis tests (CUSUM, Furno aux-QR, Wald, KS, CVM,
Sup, Constancy, Linearity, etc.)

- A master command that runs the whole battery with one call and
exports publication-quality graphs.

Commands

Click any command name to open its help page:

command

xqcoint FMQR (Xiao 2009) + CUSUM (Kuriyama 2016) + augmented option + Wald test

xqcoint_robust Robust cointegration test: Y_n(r) partial-sum with KS and CVM functionals (Xiao 2009 §3.3)

xqcoint_const Constancy test of β(τ): sup, KS, CVM functionals with Monte-Carlo CVs (Xiao 2009 §3.2)

qpolycoint Polynomial quantile cointegration + Wald linearity test (Li, Zheng & Guo 2016)

tuqcoint Nonparametric local-constant quantile cointegration with stationary covariate (Tu, Liang & Wang 2022)

liqcoint_fc Functional-coefficient QR cointegration + NFMQR option (Li, Zhang & Zheng 2025)

qcointall Master command — runs every estimator/test and produces a combined verdict table

Companion commands (already in your installation):

fqardl Fourier Quantile ARDL; type(qcoint) runs the Furno (2020) aux-QR test

qardl Cho, Kim & Shin (2015) QARDL with constancy Wald tests (SSC)

Paper-to-command map

reference

Xiao (2009) xqcoint, xqcoint_robust, xqcoint_const

Kuriyama (2016) xqcoint (CUSUM table)

Li, Zheng & Guo (2016) qpolycoint

Furno (2020) fqardl , type(qcoint)

Cho, Kim & Shin (2015) qardl (SSC)

Tu, Liang & Wang (2022) tuqcoint

Li, Zhang & Zheng (2025) liqcoint_fc

All of the above qcointall (master)

Quick start

Set up time-series data:

. tsset t

Run everything at once with tables and PNG graphs:

. qcointall y x, tau(0.1 0.25 0.5 0.75 0.9) full

Add a stationary covariate to enable tuqcoint and liqcoint_fc:

. qcointall y x, tau(0.1 0.25 0.5 0.75 0.9) zvar(z) full

Individual estimators:

. xqcoint y x, tau(0.25 0.5 0.75) graph // basic FMQR + CUSUM

. xqcoint y x, tau(0.25 0.5 0.75) leads(2) lags(2) // augmented FM-QR

. xqcoint y x, tau(0.1 0.5 0.9) waldtest(1) // joint H0: β = 1

. xqcoint_robust y x, tau(0.1 0.5 0.9) graph // KS / CVM test

. xqcoint_const y x, ngrid(19) graph // constancy of β(τ)

. qpolycoint y x, tau(0.25 0.5 0.75) porder(3) graph // linearity test

. tuqcoint y x z, tau(0.5) ngrid(20) graph // NP m̂(x,z)

. liqcoint_fc y x, tau(0.5) zvar(z) fm graph // NFMQR β̂(z)

What is quantile cointegration?

A classical cointegrating regression assumes a constant long-run relationship:
y_t = α + β'x_t + u_t, with y_t and x_t both I(1) and u_t
stationary. Quantile cointegration extends this to allow the
cointegrating vector β(τ) to depend on the conditional quantile of y_t:

Q_y(τ|x_t) = α(τ) + β(τ)'x_t + F⁻¹(τ)

This captures asymmetric long-run dynamics — useful when the slope at low
quantiles differs from the slope at high quantiles (financial markets,
interest-rate spreads, asymmetric price adjustment). Each command in this
library targets a different angle of this framework: linear vs polynomial vs
nonparametric vs functional-coefficient, with the FM (Phillips-Hansen)
correction for endogeneity in I(1) regressors.

Installation

From SSC:

. ssc install qcointlib

This installs all eight .ado files and corresponding help pages into
your Stata personal ado path.

Stored results

Each command stores its specific results in e() (or r() in the
case of qcointall); see the individual help pages for details. Typical
matrices include β̂(τ) across quantiles, test statistics, p-values, and
critical values.

Author

Dr Merwan Roudane

merwanroudane920@gmail.com

February 2026

References

Cho, J. S., Kim, T.-h. & Shin, Y. (2015). Quantile cointegration in the
autoregressive distributed-lag modeling framework. Journal of Econometrics
188, 281–300.

Furno, M. (2020). Cointegration tests at the quantiles.
International Journal of Finance & Economics 27, 1097–1110.

Hao, K. & Inder, B. (1996). Diagnostic test for structural change in
cointegrated regression models. Economics Letters 50, 179–187.

Kuriyama, N. (2016). Testing cointegration in quantile regressions with
an application to the term structure of interest rates.
Studies in Nonlinear Dynamics & Econometrics 20, 107–121.

Li, H., Zheng, C. & Guo, Y. (2016). Estimation and test for quantile
nonlinear cointegrating regression. Economics Letters 148, 27–32.

Li, H., Zhang, J. & Zheng, C. (2025). Functional-coefficient quantile
cointegrating regression with stationary covariates.
Statistics and Probability Letters 219, 110344.

Phillips, P. C. B. & Hansen, B. E. (1990). Statistical inference in
instrumental variables regression with I(1) processes.
Review of Economic Studies 57, 99–125.

Tu, Y., Liang, H.-Y. & Wang, Q. (2022). Nonparametric inference for
quantile cointegrations with stationary covariates.
Journal of Econometrics 230, 453–482.

Xiao, Z. (2009). Quantile cointegrating regression.
Journal of Econometrics 150, 248–260.

Also see

xqcoint, xqcoint_robust, xqcoint_const,
qpolycoint, tuqcoint, liqcoint_fc, qcointall,
fqardl, qardl