qqfrontier
v0.1.1MIT licencePython ≥ 3.95 modulesvalidated against R & Stata

qqfrontier

Frontier quantile-on-quantile econometrics in Python: QQ connectedness, the cross-quantilogram, quantile Granger causality robust to instability, quantile coherency and the quantile-on-quantile ARDL — with journal-quality tables, heatmaps and 3D surfaces.

pip install "qqfrontier[full]"

GitHub repositoryPyPI package Step-by-step guide
qqfrontier banner

What it doesFive methods, one consistent interface

Every result object prints journal tables, exports LaTeX and Markdown, draws Parula heatmaps, static and interactive 3D surfaces, and writes a plain-language interpretation.

M1

Quantile-on-quantile connectedness

Spillovers between quantiles of several markets: Gabauer–Stenfors (2024), kernel Q-on-Q-QVAR (2026), TVP-QQVAR (2026).

M2

Cross-quantilogram

Directional predictability between quantiles with stationary-bootstrap inference (Han, Linton, Oka & Whang, 2016).

M3

Robust quantile Granger causality

Causality in quantiles robust to structural breaks, with dated regimes (Mayer, Wied & Troster, 2025).

M4

Quantile coherency

Dependence between quantiles across short, medium and long cycles (Baruník & Kley, 2019).

M5

Quantile-on-quantile ARDL

Bounds test, long run, short run and ECT on quantile series (Destek et al., 2025).

InstallationInstall in one line

pip install qqfrontier            # core
pip install "qqfrontier[plotly]"  # + interactive 3D surfaces
pip install "qqfrontier[fast]"    # + numba / joblib acceleration
pip install "qqfrontier[full]"    # everything (recommended)

New to Python? Install Anaconda, open Anaconda Prompt and type the line above. The step-by-step guide shows how to load your own Excel or CSV file and write every line of code.

Requirements: numpy, scipy, pandas, matplotlib, statsmodels (installed automatically). Bounds-test p-values of M5 use the Kripfganz–Schneider (2020) critical values (case III), shipped with the package, as in Destek et al. (2025).

TheoryThe five estimators in brief

M1

QQ connectedness

Each equation of the QVAR is estimated at its own quantile, \(Q_{\tau_j}(y_{jt}\mid y_{t-1}) = c_j(\tau_j) + A_j(\tau_j) y_{t-1}\). The generalized FEVD $$\theta_{ij}(H)=\frac{\sigma_{jj}^{-1}\sum_{h=0}^{H-1}(e_i'\Psi_h\Sigma e_j)^2}{\sum_j \sigma_{jj}^{-1}\sum_{h}(e_i'\Psi_h\Sigma e_j)^2}$$ gives TO, FROM, NET and the adjusted total connectedness \(TCI=\tfrac{k}{k-1}\overline{TO}\) for every quantile configuration \((\tau_1,\tau_2)\).
M2

Cross-quantilogram

$$\hat\rho_\tau(k)=\frac{\sum_{t}\psi_{\tau_1}(y_{1t}-\hat q_{1t})\,\psi_{\tau_2}(y_{2,t-k}-\hat q_{2,t-k})}{\sqrt{\sum_t\psi^2_{\tau_1}}\sqrt{\sum_t\psi^2_{\tau_2}}},\qquad \psi_a(u)=\mathbb 1[u<0]-a$$ with the Box–Ljung test \(\check Q^{(p)}_\tau=T(T+2)\sum_{k\le p}\hat\rho_\tau^2(k)/(T-k)\) and stationary-bootstrap critical values.
M3

Robust quantile Granger causality

From the subgradient \(H_n(\lambda,\tau)=(X'X/n)^{-1/2}n^{-1/2}\sum_{i\le\lambda n}x_i\psi_\tau(y_i-w_i'\hat\alpha(\tau))\): $$\mathrm{expLM}=\int_{\mathcal T}\exp\Big[\tfrac12\Big(\sup_\lambda\big\|R'(H_n(\lambda)-\lambda H_n(1))\big\|_\infty+\|R'H_n(1)\|_\infty\Big)\Big]d\tau$$ jointly tests no causality and parameter stability.
M4

Quantile coherency

$$R(\omega;\tau_1,\tau_2)=\frac{f_{12}(\omega;\tau_1,\tau_2)}{\sqrt{f_{11}(\omega;\tau_1,\tau_1)f_{22}(\omega;\tau_2,\tau_2)}}$$ estimated from smoothed rank-based copula cross-periodograms, with pointwise confidence intervals.
M5

QQARDL

On the quantile series of Li (2022), \(\Delta Y_t=a_0+d_0Y_{t-1}+d_1\Delta X_t+b_1X_{t-1}+e_t\) for every pair \((\tau,\theta)\): bounds test of \(g_1=g_2=0\), long run \(-b_1/d_0\), short run \(d_1\), error correction \(d_0\).

Faithful to the papers

Every code step is mapped to the equation it implements in docs/methods.md. M1 reproduces the R package qqconnect and Fig. 1(a) of Bonaccolto et al. (2026) cell by cell; M2 equals quantilogram; M5 reproduces the Stata command qqardl table by table.

Complete applications on real dataEvery table and figure, generated by one script

Data shipped with the package: daily FRED changes of the US 2-year Treasury yield (US2Y) and the 10Y–2Y spread (US2Y10Y), 1998–2023 (public domain); World Bank WDI CO₂ and GDP per capita of Algeria and Egypt (CC BY 4.0). Script: examples/qqfrontier_empirical.py.

Summary statistics

import qqfrontier as qf
yl = qf.load_us_yields(main_only=True)
print(qf.descriptive_table(yl[["US2Y", "US2Y10Y"]]))
======================================================================================================================
                                                  Summary statistics                                                  
======================================================================================================================
                       Mean     Variance     Skewness  Ex.Kurtosis           JB          ERS        Q(20)       Q2(20)
----------------------------------------------------------------------------------------------------------------------
US2Y                 -0.009       29.550    -0.413***     8.926*** 20935.593***    -9.490***    27.299***  1558.579***
US2Y10Y              -0.015       15.069     0.315***     6.259*** 10311.451***    -8.881***    23.535***   680.318***
----------------------------------------------------------------------------------------------------------------------
Unconditional correlations
US2Y                  1.000       -0.253
US2Y10Y              -0.253        1.000
======================================================================================================================
Notes: *** p<0.01, ** p<0.05, * p<0.10. Skewness: D'Agostino (1970) test; Ex.Kurtosis:
Anscombe-Glynn (1983) test; JB: Jarque-Bera (1980); ERS: unit-root test with
a constant; Q(20) and Q2(20): Fisher-Gallagher (2012) weighted portmanteau
tests on the series and on their squares.

M1 Quantile-on-quantile connectedness

x = yl[["date", "US2Y", "US2Y10Y"]]
taus = np.arange(0.05, 1.0, 0.10)
gs  = qf.qqc_gs(x, taus=taus, window=200, horizon=20)                  # Gabauer & Stenfors (2024)
qoq = qf.qqc_kernel(qf.load_us_yields()[["date","US2Y","US2Y10Y"]], taus=taus,
                    window=200, horizon=20, bandwidth=0.15, presample=100, n_jobs=8)   # BCG (2026)
tvp = qf.qqc_tvp(x, taus=taus, horizon=30)                               # TVP-QQVAR (2026)
print(gs.summary()); print(gs.interpret())
gs.plot("heatmap"); gs.plot("dynamic"); gs.plot("net"); gs.plot("surface"); gs.plot("panel")
US2Y quantile \ US2Y10Y quantile0.050.150.250.350.450.550.650.750.850.95
0.9571.656.640.724.411.39.517.230.349.366.8
0.8556.445.233.722.312.911.114.421.433.747.7
0.7540.933.927.020.414.713.414.116.622.731.2
0.6522.922.120.618.816.515.413.912.311.913.4
0.5512.014.215.716.817.016.615.112.79.87.4
0.457.29.411.814.216.317.217.015.913.710.6
0.3513.812.012.112.915.416.818.820.822.523.1
0.2530.222.217.013.414.015.219.926.234.140.7
0.1546.833.222.614.111.913.221.432.746.057.2
0.0564.947.531.317.09.911.323.740.158.573.0
Reading the results. Averaged dynamic quantile-on-quantile total connectedness: the surface averages 24.3 over 100 quantile pairs (range 7.2 to 73.0). The largest value (73.0) occurs when US2Y quantile is at its 0.05 quantile and US2Y10Y quantile at its 0.95 quantile; the smallest (7.2) at (0.45, 0.05). Values in the joint tails (average 40.3) are stronger than around the joint median (average 16.2), pointing to tail-dependent (asymmetric) behaviour. On average, reversely related (opposite-tail) quantile pairs dominate (reverse 36.1 vs direct 29.2). Over time, reversely related quantiles exceed directly related ones on 54.8% of the dates (mean difference 6.88 points, 5th-95th percentile range -21.49 to 36.66). US2Y is the net transmitter of shocks in 69% of the quantile configurations. US2Y10Y is the net transmitter of shocks in 31% of the quantile configurations. The strongest net position of US2Y (+3.0%) arises at (0.95, 0.65), where it is a net transmitter.
Averaged dynamic quantile-on-quantile TCI (GS 2024, Fig. 2 layout).
Averaged dynamic quantile-on-quantile TCI (GS 2024, Fig. 2 layout).
Reverse, direct and ΔTCI over time (GS 2024, Fig. 3).
Reverse, direct and ΔTCI over time (GS 2024, Fig. 3).
Heatmap, 3D surface and contour of the averaged TCI.
Heatmap, 3D surface and contour of the averaged TCI.
3D surface of the averaged TCI (Parula).
3D surface of the averaged TCI (Parula).
NET connectedness of each series (blue: receiver, red: transmitter).
NET connectedness of each series (blue: receiver, red: transmitter).
Interactive 3D surface: drag to rotate, hover for values.
GS vs Q-on-Q, second moments vs covariance (Bonaccolto, Caporin & Gupta 2026, Fig. 1 layout).
GS vs Q-on-Q, second moments vs covariance (Bonaccolto, Caporin & Gupta 2026, Fig. 1 layout).

Decomposition of TCI differences (BCG 2026, Table A.2)

MeanMAMinP5P95Max
('Direct TCI', 'Total difference')-8.5214.87-28.37-24.5620.3827.94
('Direct TCI', '(3) Method')2.563.42-6.21-2.769.8117.24
('Direct TCI', '(3) Centering')-11.0817.92-30.45-27.3723.0331.27
('Direct TCI', '(4) Method')2.554.95-11.55-6.788.9519.21
('Direct TCI', '(4) Centering')-11.0816.49-34.54-30.8612.2822.32
('Reverse TCI', 'Total difference')-14.9815.04-27.53-24.3-2.544.07
('Reverse TCI', '(3) Method')3.023.37-6.22-1.139.1517.67
('Reverse TCI', '(3) Centering')-1818.04-29.69-27.02-3.165.03
('Reverse TCI', '(4) Method')1.224.15-13.19-6.667.2811.99
('Reverse TCI', '(4) Centering')-16.216.55-32-28.321.3410.95
Reversely related quantiles: TCI over time.
Reversely related quantiles: TCI over time.
TVP-QQVAR: reverse vs direct TCI.
TVP-QQVAR: reverse vs direct TCI.

M2 Cross-quantilogram: does the 2-year yield predict the spread?

y1 = yl.set_index("date")["US2Y10Y"]; y2 = yl.set_index("date")["US2Y"]
cq = qf.cross_quantilogram_test(y1, y2, tau1=[.05,.1,.2,.3,.5,.7,.8,.9,.95], tau2=[.1,.9],
                                max_lag=20, n_boot=1000, sup_range=np.arange(.10,.31,.02), seed=1)
print(cq.summary()); cq.plot("correlogram", tau2=0.10); cq.plot("heatmap", k=1)
tau1k=1k=2k=3k=5k=10k=20
0.050.0360.039*0.0360.043*0.0180.033
0.100.0300.0280.0380.046*0.0100.026*
0.200.0300.038*0.048*0.058*0.023*0.028*
0.300.0330.0260.0310.046*0.049*0.017
0.500.0020.0080.0070.0140.0010.018
0.700.0080.0150.0020.0210.0010.006
0.80-0.019-0.016-0.0180.005-0.029-0.015
0.90-0.007-0.021-0.0210.001-0.021-0.023
0.95-0.022-0.036-0.027*-0.022-0.026*-0.026*
Reading the results. At lag 1, 38% of the 100 quantile pairs show significant directional predictability from US2Y to US2Y10Y (5% level). The strongest effect is rho = 0.072 at (tau1 = 0.85, tau2 = 0.55): when US2Y is below its 0.55 quantile, the probability that US2Y10Y falls below its 0.85 quantile 1 period(s) later is higher than unconditionally (equivalently, an exceedance of that quantile makes the event less likely). Significant positive values: 38, negative: 0. The Box-Ljung test up to lag 5 rejects 'no predictability' for 44% of the quantile pairs.
Cross-quantilogram with the 95% bootstrap band for no predictability (HLOW Fig. 2a layout).
Cross-quantilogram with the 95% bootstrap band for no predictability (HLOW Fig. 2a layout).
Box–Ljung Q(p) and bootstrap critical values.
Box–Ljung Q(p) and bootstrap critical values.
Sup-Box–Ljung test over τ ∈ [0.10, 0.30].
Sup-Box–Ljung test over τ ∈ [0.10, 0.30].
Quantile-on-quantile map of the cross-quantilogram at lag 1 (stars: bootstrap p-values).
Quantile-on-quantile map of the cross-quantilogram at lag 1 (stars: bootstrap p-values).
3D surface over lag × τ₁.
3D surface over lag × τ₁.

M3 Quantile Granger causality robust to instability

gc = qf.qgc_instability(y1, y2, lags=1, n_boot=499, seed=3, alpha=0.10)
print(gc.summary()); gc.plot("cusum"); gc.plot("lm"); gc.plot("cusum_map")
print(qf.qgc_table(y1, y2, lags=(1, 3, 6), n_boot=249))      # MWT Table 3 layout
============================================================================================
                      Quantile Granger Causality Robust to Instability                      
                              (Mayer, Wied and Troster, 2025)                               
============================================================================================
H0: US2Y does not Granger-cause US2Y10Y in quantiles, with stable effect
Lags of cause (q)         : 1                Observations        : 6252
Regressors in w (incl. 1) : 2                Sample              : 1998-07-15 to 2023-07-11
Critical values           : bootstrap (B=499)Quantile grid       : 0.05-0.95 (91 points)
--------------------------------------------------------------------------------------------
Quantile range         supWald   p-value         expLM   p-value       supLM   p-value
--------------------------------------------------------------------------------------------
[0.05, 0.95]            21.117  0.000***         1.664  0.012**        1.690  0.080*  
[0.05, 0.20]             1.662  0.553            0.200  0.359          0.757  0.513   
[0.40, 0.60]            21.117  0.000***         0.405  0.040**        1.674  0.056*  
[0.80, 0.95]             8.284  0.018**          0.295  0.000***       1.654  0.004***
--------------------------------------------------------------------------------------------
LM(tau) at selected quantiles
--------------------------------------------------------------------------------------------
     tau     LM(tau)     sup LM1         LM2     p-value     p (asy)
--------------------------------------------------------------------------------------------
    0.05       2.434       0.298       0.233    0.130          0.106
    0.10       1.672       0.247       0.254    0.487          0.406
    0.25       1.578       0.233       0.451    0.503          0.464
    0.50       3.189       0.644       0.950    0.022**        0.022
    0.75       2.800       0.445       0.768    0.054*         0.058
    0.90       4.547       0.381       0.983    0.000***       0.001
    0.95       4.331       0.320       0.624    0.000***       0.002
--------------------------------------------------------------------------------------------
Regimes of Granger causality (Algorithm 2, Sidak-corrected levels)
--------------------------------------------------------------------------------------------
  1998-07-15 -> 2023-07-11  ( 6252 obs.)   GC: yes             expLM p = 0.012
  Step 1: expLM p = 0.012 <= 0.1: reject H0.
  Step 2: expCUSUM p = 0.159 > 0.0513: stable Granger causality on the whole sample.
============================================================================================
Significance: *** p<0.01, ** p<0.05, * p<0.10. supLM/expLM: MWT Eq. (8); supWald: Koenker and
Machado (1999) with pairs-bootstrap covariance; LM(tau) = h(tau)(sup LM1 + LM2), Sec. 3.1.

p-values (%) by lag order and quantile range (MWT 2025, Table 3 layout)

[0.05, 0.95] supWald[0.05, 0.95] expLM[0.05, 0.95] supLM[0.05, 0.20] supWald[0.05, 0.20] expLM[0.05, 0.20] supLM[0.40, 0.60] supWald[0.40, 0.60] expLM[0.40, 0.60] supLM[0.80, 0.95] supWald[0.80, 0.95] expLM[0.80, 0.95] supLM
q = 101.2054.41863.0536.14553.41404.4183.6141.100
q = 320.7256.42634.1375026.10457.4337.42522.08837.75170.4022.811
q = 627.82527.71153.81573.67550.20162.65135.17546.98841.36510.0250.8036.827
Reading the results. Over the quantile range [0.05, 0.95], the expLM test rejects the joint null of no and stable Granger causality from US2Y to US2Y10Y in quantiles (p = 0.012); supLM gives p = 0.080. The conventional supWald test, which ignores instability, gives p = 0.000. Causality is detected in the ranges [0.40, 0.60], [0.80, 0.95]. Quantile by quantile, LM(tau) is significant at 5% for 42 of 91 levels (from 0.22 to 0.95). The instability component (sup LM1) dominates the causality component (LM2) at 5% of the quantiles, so the rejection is driven mainly by a stable non-zero effect.
CUSUM detector with break dates; Granger-causality regimes shaded (MWT Fig. 2).
CUSUM detector with break dates; Granger-causality regimes shaded (MWT Fig. 2).
LM(τ) and its instability and causality components.
LM(τ) and its instability and causality components.
Time × quantile map of the instability detector.
Time × quantile map of the instability detector.
Quantile Granger coefficients γ(τ).
Quantile Granger coefficients γ(τ).

M4 Quantile coherency

coh = qf.quantile_coherency(yl["US2Y"], yl["US2Y10Y"], taus=np.arange(.05,.96,.05),
                            periods={"W": 5, "M": 22, "Y": 250})
print(coh.summary()); coh.plot("frequency"); coh.plot("quantile"); coh.plot("surface", period="M")
====================================================================================
                    Quantile Coherency (Barunik and Kley, 2019)                     
====================================================================================
Series j1 / j2     : US2Y / US2Y10Y
Observations       : 6253           Kernel / bandwidth : epanechnikov / 0.0562
Quantile levels    : 19 x 19      Frequencies       : 3126
------------------------------------------------------------------------------------
Real part of quantile coherency by period (columns) and quantile pair (rows)
------------------------------------------------------------------------------------
   tau1|tau2         W (5)        M (22)       Y (250)     Short (2)
------------------------------------------------------------------------------------
   0.05|0.05         0.034         0.003        0.268*         0.023
   0.10|0.10         0.004        -0.059        0.193*       -0.128*
   0.50|0.50         0.018        -0.069        -0.107         0.036
   0.90|0.90        -0.035        -0.029        0.170*        -0.109
   0.95|0.95        -0.008         0.011        0.317*        -0.084
   0.05|0.95       -0.156*       -0.183*       -0.408*       -0.180*
   0.95|0.05       -0.091*       -0.097*       -0.341*       -0.183*
====================================================================================
* the pointwise CI of Re R excludes zero.
Notes: rank-based quantile coherency (Barunik and Kley, 2019); n = 6253; epanechnikov kernel, b_n = 0.0562; 95% pointwise CIs (Supp. S5.2); stars: CI of Re R excludes zero.
Reading the results. At the W period (5), coherency between the lower tails (-0.00) is stronger than between the upper tails (-0.03), i.e. downside co-movement dominates. At the M period (22), coherency between the lower tails (-0.02) is weaker than between the upper tails (-0.01). At the Y period (250), coherency between the lower tails (0.20) is weaker than between the upper tails (0.20). For the 0.05|0.05 pair, Re R moves from 0.02 at the shortest cycle (2 periods) to 0.27 at the longest named period, so long-run cycles are more strongly connected in the tails. The opposite-tail pair 0.05|0.95 has Re R = -0.41 at the longest period (negative: a low US2Y tends to coincide with a high US2Y10Y over those cycles).
Re R across frequencies with 95% CIs; top axis: weekly, monthly, yearly (BK Fig. 3).
Re R across frequencies with 95% CIs; top axis: weekly, monthly, yearly (BK Fig. 3).
Re R along τ₁ = τ₂ at fixed periods (BK Fig. 3, right).
Re R along τ₁ = τ₂ at fixed periods (BK Fig. 3, right).
Quantile-on-quantile coherency at the monthly period.
Quantile-on-quantile coherency at the monthly period.
3D surface of the monthly coherency.
3D surface of the monthly coherency.
3D surface over frequency × quantile.
3D surface over frequency × quantile.

M5 Quantile-on-quantile ARDL: CO₂ and growth in Algeria

d = qf.load_wdi_co2_gdp("Algeria").set_index("year")
r = qf.qqardl_fit(d["lnCO2"], d["lnGDP"])
print(r.summary()); r.plot("heatmap", stat="lr"); r.plot("surface", stat="lr"); r.plot("coint")
------------------------------------------------------------------------------------------------------------------------
Quantile-on-Quantile ARDL (QQARDL)              Number of obs   =     53
Destek et al. (2025); QSER of Li (2022)         ARDL order      = (1,1)
Dependent: lnCO2   Regressor: lnGDP             Quantile pairs  =    121   Sample: 1970-2024
------------------------------------------------------------------------------------------------------------------------

Bounds test F-statistic, Eq. (1) (H0: no cointegration)
theta|tau       0.05      0.10      0.20      0.30      0.40      0.50      0.60      0.70      0.80      0.90      0.95
------------------------------------------------------------------------------------------------------------------------
     0.95  42.775*** 14.646***     4.259     3.445     4.069     3.731     2.927     2.749     2.857     1.858    4.936*
     0.90  44.935*** 13.423***    4.989*     3.567     4.475     3.951     3.685     3.473     1.732     0.985     4.855
     0.80  30.036*** 12.660***     4.581     3.031     3.832     3.595     3.429     2.935     3.074     0.644    5.458*
     0.70  40.653*** 13.414***     4.171     2.629     4.121    5.260*   8.216**    5.022*    5.060*     3.696   7.139**
     0.60  38.934*** 12.601***   6.047**     4.402   6.240**   6.529**   8.166**     2.796     3.299     2.325     0.794
     0.50  37.163*** 13.839***    4.944*     4.117  8.694***   7.028**  9.082***     2.505     1.969     2.723     2.634
     0.40  36.210*** 14.345***   8.026**  8.796***   7.131**     4.578     4.643     1.741     2.235     2.605     1.666
     0.30  38.503*** 13.794***  8.755***   6.841**   7.147**    5.234*     4.723     2.101     1.931     1.881     1.855
     0.20  36.609*** 14.502***  9.521***  8.918***   6.687**   6.043**    5.702*     3.037     2.235     1.996     1.953
     0.10  35.985*** 19.243*** 11.694***   7.347**   6.848**     4.802     3.262     1.931     1.802     1.023     2.198
     0.05  38.599*** 16.394***     3.336     2.721     2.736     2.567     1.837     1.517     1.192     0.420     1.552

Long-run coefficient  LR = -b1/d0  [cointegrated pairs only]
theta|tau       0.05      0.10      0.20      0.30      0.40      0.50      0.60      0.70      0.80      0.90      0.95
------------------------------------------------------------------------------------------------------------------------
     0.95     -1.833     0.075         .         .         .         .         .         .         .         .  1.531***
     0.90     -0.881     0.384    0.571*         .         .         .         .         .         .         .         .
     0.80     -0.767     0.537         .         .         .         .         .         .         .         .  1.503***
     0.70      0.634   0.689**         .         .         .  0.844***  1.101***  1.235***  1.089***         .  0.983***
     0.60      0.506    0.514*  0.462***         .  0.544***  0.631***  0.813***         .         .         .         .
     0.50      0.642   0.560**  0.502***         .  0.615***  0.704***  0.836***         .         .         .         .
     0.40      0.769    0.524*  0.579***  0.657***  0.662***         .         .         .         .         .         .
     0.30      0.397    0.463*  0.458***  0.485***  0.498***   0.538**         .         .         .         .         .
     0.20      0.848   0.638**  0.484***  0.582***  0.568***  0.629***  0.782***         .         .         .         .
     0.10     1.316*  0.739***  0.427***   0.479**   0.482**         .         .         .         .         .         .
     0.05   1.387***  0.606***         .         .         .         .         .         .         .         .         .

Short-run coefficient d1 on D.x (Eq. 4)
theta|tau       0.05      0.10      0.20      0.30      0.40      0.50      0.60      0.70      0.80      0.90      0.95
------------------------------------------------------------------------------------------------------------------------
     0.95     4.517*   1.914**    0.545*     0.347     0.453    0.600*    0.625*  0.831***  1.839***     0.512  0.733***
     0.90    4.706**  1.900***     0.376   0.457**   0.470**   0.555**   0.542**   0.518**  1.991***  0.621***  0.537***
     0.80   4.134***  1.512***   0.344**  0.434***  0.496***   0.468**  0.524***  0.574***  1.435***  0.661***  0.737***
     0.70   4.853***  1.712***  0.449***  0.413***   0.395**   0.467**  0.590***  0.633***  1.135***  0.482***    0.289*
     0.60     1.640*  0.855***  0.303***    0.160*    0.189*   0.277**   0.268**   0.244**   0.379**    0.188*  0.262***
     0.50      1.102   0.822**  0.439***  0.290***    0.213*  0.334***  0.336***    0.224*   0.495**     0.064     0.005
     0.40   3.521***    0.734*   0.293**   0.247**    0.249*   0.365**  0.393***  0.362***   0.581**     0.131     0.070
     0.30    2.660**  1.030***   0.292**   0.275**    0.279*   0.365**  0.403***  0.369***    0.508*     0.138     0.010
     0.20    2.445**  1.125***   0.252**  0.315***     0.148     0.172   0.268**     0.146     0.365     0.112     0.067
     0.10   3.150***   0.770**     0.151     0.118    0.204*     0.173     0.189  0.337***   0.577**     0.128     0.134
     0.05   2.125***  0.529***   0.098**     0.058     0.061   0.126**    0.088*  0.136***    0.165*    0.082*     0.031

Error-correction term d0 on L.y (Eq. 4)
theta|tau       0.05      0.10      0.20      0.30      0.40      0.50      0.60      0.70      0.80      0.90      0.95
------------------------------------------------------------------------------------------------------------------------
     0.95  -0.882*** -0.748*** -0.459*** -0.312*** -0.417*** -0.390*** -0.351***  -0.220** -0.734*** -0.345*** -0.427***
     0.90  -0.841*** -0.738*** -0.494*** -0.346*** -0.486*** -0.456*** -0.399***  -0.239** -0.689***  -0.313** -0.406***
     0.80  -0.862*** -0.765*** -0.497*** -0.317*** -0.430*** -0.440*** -0.411*** -0.291*** -0.743***  -0.269** -0.300***
     0.70  -0.917*** -0.814*** -0.604*** -0.382*** -0.534*** -0.608*** -0.556*** -0.307*** -0.718*** -0.294*** -0.310***
     0.60  -0.914*** -0.834*** -0.628*** -0.425*** -0.510*** -0.444*** -0.411***  -0.242** -0.699***  -0.264** -0.297***
     0.50  -0.899*** -0.866*** -0.640*** -0.539*** -0.616*** -0.554*** -0.496*** -0.259*** -0.679***  -0.252** -0.280***
     0.40  -0.809*** -0.812*** -0.698*** -0.571*** -0.634*** -0.498*** -0.338***  -0.185** -0.614***  -0.205**  -0.245**
     0.30  -0.902*** -0.841*** -0.667*** -0.447*** -0.543*** -0.446*** -0.307***  -0.170** -0.617***   -0.193* -0.249***
     0.20  -0.842*** -0.761*** -0.653*** -0.406*** -0.566*** -0.469*** -0.322***  -0.184** -0.594***   -0.176*  -0.229**
     0.10  -0.955*** -0.986*** -0.544*** -0.344*** -0.400*** -0.371*** -0.262***   -0.145* -0.541***    -0.148  -0.201**
     0.05  -0.936*** -0.963*** -0.458*** -0.274*** -0.369*** -0.300***  -0.221**    -0.119 -0.543***    -0.118  -0.199**

------------------------------------------------------------------------------------------------------------------------
Rows: quantiles (theta) of lnGDP; columns: quantiles (tau) of lnCO2.
*** p<0.01, ** p<0.05, * p<0.10. Bounds test: Kripfganz-Schneider (2020) I(1) p-values; N = 53.
Coefficients: t(50) with OLS standard errors; LR SE by the delta method.
Cointegrated pairs (p<0.10): 53 of 121
Reading the results. Cointegration between the quantiles of lnCO2 and lnGDP is found for 53 of 121 quantile pairs (44%). It is most frequent at low quantiles of lnCO2 (88% of pairs with tau <= 0.2) versus high quantiles (12% with tau >= 0.8). Among cointegrated pairs, the long-run coefficient ranges from -1.833 to 1.531 (median 0.582); 36 are significant at 5%. The largest significant long-run effect (1.531) arises when lnGDP is at its 0.95 quantile and lnCO2 at its 0.95 quantile: a 1% rise in lnGDP is associated with a 1.53% change in lnCO2 in the long run (log-log specification). The error-correction term is negative and significant for 115 of 121 pairs (median -0.447: about 45% of a deviation from equilibrium is corrected each period). Short-run effects are significant for 76 pairs, with median 0.393.
Long-run coefficients, cointegrated pairs (stars: p-values).
Long-run coefficients, cointegrated pairs (stars: p-values).
3D surface of the long-run coefficients.
3D surface of the long-run coefficients.
Bounds-test F; framed cells are cointegrated (p < 0.10).
Bounds-test F; framed cells are cointegrated (p < 0.10).
Observed ln CO₂ and its quantile series (Li, 2022).
Observed ln CO₂ and its quantile series (Li, 2022).
Short-run coefficients.
Short-run coefficients.
Error-correction term.
Error-correction term.

Egypt

Reading the results. Cointegration between the quantiles of lnCO2 and lnGDP is found for 6 of 121 quantile pairs (5%). It is most frequent at low quantiles of lnCO2 (6% of pairs with tau <= 0.2) versus high quantiles (3% with tau >= 0.8). Among cointegrated pairs, the long-run coefficient ranges from 0.692 to 1.101 (median 0.782); 6 are significant at 5%. The largest significant long-run effect (1.101) arises when lnGDP is at its 0.05 quantile and lnCO2 at its 0.10 quantile: a 1% rise in lnGDP is associated with a 1.10% change in lnCO2 in the long run (log-log specification). The error-correction term is negative and significant for 104 of 121 pairs (median -0.365: about 37% of a deviation from equilibrium is corrected each period). Short-run effects are significant for 94 pairs, with median 0.231.
Egypt: long-run coefficients.
Egypt: long-run coefficients.
Egypt: 3D long-run surface.
Egypt: 3D long-run surface.

SyntaxMain functions

Every result has .summary(), .to_latex(), .to_markdown(), .to_frame(), .interpret() and .plot(kind). Full argument lists are in the docstrings (help(qf.qqc_gs)) and in the guide.

M1

qqfrontier.connectedness

qqc_gs(x, taus, nlag=1, window=200, horizon=20, cov_type='uncentered')
qqc_kernel(x, taus, window=200, horizon=20, bandwidth=0.15, presample=100, noncross='bondell', n_jobs=1)
qqc_tvp(x, taus, horizon=30, delta=0.99, kappa=0.99)

Also: gfevd, connectedness_table, decompose_tci, compare_heatmaps, cond_pit, dqlm, sim_qqvar, mc_qqvar

M2

qqfrontier.quantilogram

cross_quantilogram(y1, y2, tau1, tau2, k)
cross_quantilogram_test(y1, y2, tau1, tau2, max_lag=20, n_boot=1000, sup_range=None, self_normalized=False)
partial_cross_quantilogram(y1, y2, controls, tau1, tau2, tau_z, k=1)

Also: block_length, stationary_bootstrap_index

M3

qqfrontier.causality

qgc_instability(y, x, lags=1, taus=0.05..0.95, n_boot=499, method='bootstrap', moment=1, regimes=True)
qgc_table(y, x, lags=(1,3,6,9))
qgc_map(y, x, lags=(1,...,6))

Also: simulate_null

M4

qqfrontier.coherency

quantile_coherency(x, y, taus, bandwidth=0.5 n^-1/4, kernel='epanechnikov', ci=True, periods={'W':5,'M':22,'Y':250})

Also: kernel_weights

M5

qqfrontier.qqardl

qqardl_fit(y, x, tau=(.05,.10,...,.95), theta=None, lags=(1,1), btest='eq1', vce='ols', lrtype='multiplier')
qser(y, taus)
ardl_bounds_pvalue(F, n, k=1, sr=2)

ReferencesPapers implemented

  1. Baruník, J. and Kley, T. (2019). Quantile coherency. The Econometrics Journal, 22(2), 131–152. doi:10.1093/ectj/utz002
  2. Bonaccolto, G., Caporin, M. and Gupta, R. (2026). Rethinking quantile-on-quantile connectedness. Finance Research Letters, 114, 111095.
  3. Bondell, H. D., Reich, B. J. and Wang, H. (2010). Noncrossing quantile regression curve estimation. Biometrika, 97(4), 825–838. doi:10.1093/biomet/asq048
  4. Candelo-Viáfara, J. M. and Orrego-Reyes, J. E. (2026). A TVP quantile-on-quantile VAR approach. SSRN. doi:10.2139/ssrn.7434976
  5. Chatziantoniou, I., Gabauer, D. and Stenfors, A. (2021). Economics Letters, 204, 109891. doi:10.1016/j.econlet.2021.109891
  6. Destek, M. A., Radulescu, M., Ozkan, O. and Balsalobre-Lorente, D. (2025). Journal of Environmental Management, 389, 126089. doi:10.1016/j.jenvman.2025.126089
  7. Diebold, F. X. and Yilmaz, K. (2012). International Journal of Forecasting, 28(1), 57–66. doi:10.1016/j.ijforecast.2011.02.006
  8. Gabauer, D. and Stenfors, A. (2024). Finance Research Letters, 60, 104852. doi:10.1016/j.frl.2023.104852
  9. Han, H., Linton, O., Oka, T. and Whang, Y.-J. (2016). The cross-quantilogram. Journal of Econometrics, 193(1), 251–270. doi:10.1016/j.jeconom.2016.03.001
  10. Kripfganz, S. and Schneider, D. C. (2020). Oxford Bulletin of Economics and Statistics, 82(6), 1456–1481. doi:10.1111/obes.12377
  11. Li, T.-H. (2022). Quantile Fourier transform, quantile series, and nonparametric estimation of quantile spectra. arXiv:2211.05844. doi:10.48550/arXiv.2211.05844
  12. Mayer, A., Wied, D. and Troster, V. (2025). Quantile Granger causality in the presence of instability. Journal of Econometrics, 249, 105992. doi:10.1016/j.jeconom.2025.105992
  13. Pesaran, M. H., Shin, Y. and Smith, R. J. (2001). Journal of Applied Econometrics, 16(3), 289–326. doi:10.1002/jae.616
  14. Politis, D. N. and Romano, J. P. (1994). The stationary bootstrap. JASA, 89(428), 1303–1313. doi:10.1080/01621459.1994.10476870

AuthorDr Merwan Roudane

MR

Dr Merwan Roudane — econometrician, author of R, Python and Stata packages for quantile-on-quantile and frequency-domain econometrics.
✉ merwanroudane920@gmail.com · github.com/merwanroudane

Cite this package

@software{roudane2026qqfrontier,
  author  = {Roudane, Merwan},
  title   = {qqfrontier: Frontier Quantile-on-Quantile Econometrics in Python},
  year    = {2026},
  version = {0.1.1},
  url     = {https://github.com/merwanroudane/qqfrontier}
}

Please also cite the original paper of each method you use (see References).