ARDL Bounds Test

Calculate the ARDL bounds test for every ordered pair of tickers: whether a long-run relation runs from the second ticker to the first, without first having to decide whether each series has a unit root.

The Engle-Granger and Johansen tests need both series to be integrated of order one. The bounds test of Pesaran, Shin and Smith (2001) works whether the regressor is stationary, integrated or a mix: it tests the lagged levels in an error correction regression and compares the F-statistic with two bounds, one for a stationary and one for an integrated regressor. Above the upper bound a long-run relation exists either way, below the lower bound it does not, and in between the answer depends on the regressor’s order of integration. This makes it a common test for macroeconomic series and rates, where unit root tests are often inconclusive.

The formula is as follows:

\[\Delta y_{t} = c_{0} + c_{1} \cdot t + \pi_{y} \cdot y_{t-1} + \pi_{x} \cdot x_{t-1} + \sum_{i=1}^{p - 1} \phi_{i} \cdot \Delta y_{t-i} + \sum_{j=0}^{q - 1} \psi_{j} \cdot \Delta x_{t-j} + u_{t}\] \[F = \frac{\frac{\text{SSR}_{\text{restricted}} - \text{SSR}}{2}}{\frac{\text{SSR}}{n - k}}\] \[t = \frac{\hat{\pi}_{y}}{\text{SE}(\hat{\pi}_{y})}\] \[\theta = -\frac{\hat{\pi}_{x}}{\hat{\pi}_{y}}\]

The first line is the conditional error correction form of an ARDL(p, q), fitted by OLS, with the trend \(c_{1} \cdot t\) only when one is included, y the dependent and x the independent ticker’s column level (Adj Close by default). p = lags and q = exogenous_lags, or the pair from 1 to max_lag (4 by default) that minimises the AIC on a shared sample. F is the Wald F-statistic of \(\pi_{y} = 0\) and \(\pi_{x} = 0\), and t guards against a degenerate relation with \(\pi_{y} = 0\). theta is the long-run coefficient and hat(pi_y) the speed of adjustment. The pair is cointegrated when F is above its upper bound and t below its upper bound, not cointegrated when F is below its lower bound or t above its lower bound, and inconclusive otherwise, at 5% with the asymptotic bounds of Pesaran, Shin and Smith (2001) for one regressor (case III with a constant, case V with a constant and trend).

Also known as: ARDL bounds test, PSS bounds test, ARDL cointegration, UECM, conditional error correction model, autoregressive distributed lag.

Example · KO, PEP · 2021 to 2025

Install the Finance Toolkit with pip install financetoolkit -U, then call get_ardl_bounds_test:

from financetoolkit import Toolkit

toolkit = Toolkit(
    ["KO", "PEP"],
    api_key="FINANCIAL_MODELING_PREP_KEY",
    start_date="2021-01-01",
    end_date="2025-12-31",
)

ardl = toolkit.econometrics.get_ardl_bounds_test(period="weekly")

ardl[["F Statistic", "F Upper Bound 5%", "Bounds Decision (5%)", "Long-Run Coefficient"]]

Or, with the Finance Toolkit MCP set up, ask an AI assistant such as Claude or ChatGPT:

Were the weekly share prices of Coca-Cola and PepsiCo cointegrated from 2021 to 2025 by the ARDL bounds test, and what was the long-run coefficient?

Which returns:

ItemF StatisticF Upper Bound 5%Bounds Decision (5%)Long-Run Coefficient
('KO', 'PEP')0.11585.73Not Cointegrated0.0175
('PEP', 'KO')1.59945.73Not Cointegrated-0.5881

2 rows

Using Your Own Data

get_ardl_bounds_test runs on any data, not only prices: ratios, economic indicators, yield curves or your own dataset. Pass a DataFrame, a Series or a dictionary of them to Econometrics as data, with the dates in the rows or the columns, and set changes to how its changes are calculated: "percentage", "log", "difference" for rates and ratios, or None when the data are changes already. For example, for the monthly unemployment rates of the United States and Germany:

from financetoolkit import Economics, Econometrics

economics = Economics(start_date="2000-01-01")

unemployment = economics.get_unemployment_rate(
    countries=["United States", "Germany"], period="monthly"
)

econometrics = Econometrics(data=unemployment, changes="difference")

econometrics.get_ardl_bounds_test()

Parameters

get_ardl_bounds_test accepts the following parameters.

ParameterTypeDescriptionExample
periodstrThe data frequency (daily, weekly, monthly, quarterly, or yearly). Defaults to “daily”."weekly"
columnstrThe historical data column to use. Defaults to “Adj Close”."Return"
regressionstrThe deterministic terms. Options are: “c” (unrestricted constant, case III), “ct” (unrestricted constant and trend, case V). Defaults to “c”."ct"
lagsintThe order p of the dependent series. Defaults to None, chosen by the AIC.2
exogenous_lagsintThe order q of the independent series. Defaults to None, chosen by the AIC.None, chosen by the AIC
max_lagintThe largest order the AIC search tries. Defaults to 4.4
include_benchmarkboolWhether to include “Benchmark” among the tickers paired up. Defaults to False.True
roundingint | NoneThe number of decimals to round the results to. Defaults to None.2
show_columnsstr | list[str] | NoneThe columns to keep, a name or a list of names, matched on every column level, or the rows when no column has those names (such as the line items of a financial statement). Names that do not exist are logged, and when none exist the result is returned in full. Defaults to None, which keeps every column.None, which keeps every column

References

  • Paper Pesaran, M.H., Shin, Y. and Smith, R.J. (2001). “Bounds Testing Approaches to the Analysis of Level Relationships.” Journal of Applied Econometrics, 16(3), 289-326.
  • Paper Pesaran, M.H. and Shin, Y. (1999). “An Autoregressive Distributed Lag Modelling Approach to Cointegration Analysis.” In Strøm, S. (ed.), Econometrics and Economic Theory in the 20th Century, Cambridge University Press.
  • Library Referenced against statsmodels’ UECMResults.bounds_test
Share