Implementation of the Multiple-Threshold Nonlinear ARDL (MT-NARDL)
7 minute read
Introduction
The Multiple Threshold Nonlinear ARDL (MT-NARDL) approach, introduced by Verheyen (2013), extends the ARDL to incorporate nonlinearity, building upon the Nonlinear ARDL (NARDL) model.
Unlike NARDL, which focuses on decomposing the series around zero, with an emphasis on the median value as the threshold point, the MT-NARDL model extends its focus to include more than one threshold point.
The graphical representation below illustrates the concept of MTARDL, where each vertical line represents a threshold point in the series distribution. While arbitrary partitioning is possible, it is more reasonable to opt for sensible partitioning. This post adopts the approach of partitioning into quantiles for a more justified and appealing analysis.
The method
Let $x$ be the series of interest to be portioned into sub-units, and let the $Q(τ|Δx)$ be the $τ$ quantile of $Δx$. The portion of $x$ below the quantile is given by:
\[x_t ^{Q(\tau_b|\Delta x)}=\sum_{j=1}^t\{\Delta x_j\lt Q(\tau_b|\Delta x)\}\Delta x_j\]Above a given quantile, the generated series is given by:
\[x_t ^{Q(\tau_a|\Delta x)}=\sum_{j=1}^t\{\Delta x_j>Q(\tau_a|\Delta x)\}\Delta x_j\]For the regime that lies in between, the generated series is given by:
\[x_t ^{Q_{a|b}(\tau|\Delta x)}=\sum_{j=1}^t\{Q(\tau_a|\Delta x) \lt\Delta x_j\lt Q(\tau_b|\Delta x)\}\Delta x_j\]Long-run Relationship
Assume our focus is on examining the connection between $y$ and $x$, particularly exploring the quantile-based impact of $x$ on $y$. The relevant long-run relationship can be expressed as:
\[y_t =\alpha +\beta x_t^{Q(t_a)}+\chi x_t^{Q(t_b)}+\gamma x_t^{Q(t_{a|b})}+\epsilon_t\]Adopting an ARDL framework for the model, we have an ARDL(k,l,m,n) as specified:
\[y_t =\lambda +\sum_{j=1}^k \varphi_j y_{t-j}+\sum_{j=0}^l \phi_j x_{t-j}^{Q(t_a)}+\sum_{j=0}^m \psi_j x_{t-j}^{Q(t_b)}+\sum_{j=0}^n \eta_j x_{t-j}^{Q(t_{a|b})}+\epsilon_t\]The equation above can be re-parameterised as: \(y_t =\lambda +\sum_{j=1}^k \varphi_j y_{t-j}+\sum_{j=0}^l \phi_j x_{t-j}^{Q(t_a)}+\sum_{j=0}^m \psi_j x_{t-j}^{Q(t_b)}+\sum_{j=0}^n \eta_j x_{t-j}^{Q(t_{a|b})}+\epsilon_t\)
To test for the presence or otherwise of a cointegrating relationship between the series, based on Pesaran et al. (2001), the following hypothesis is tested:
\[\theta_1 = \theta_2 = \theta_3 = \theta_4 =0\]To rule out the degenerate cases by t-ratio tests of each of the level variables in the model, an inbuilt Eviews code needed most for the implementation of the MT-NARDL is given as:
Q(τ|x)=@quantile(x,τ)$$
Implementing of the MT-NARDL in EViews
So, the implementation of the MT-NARDL follows simple five steps:
(1) First, decide on the variable to decompose (for instance, exchange rate, interest rate, etc.), and the thresholds (25% and 75% or 20% and 80%). In other words, determine which variable (your interest variables) you want to decompose to various thresholds (Let’s denote this variable as $x$).
(2) Second, compute the first difference of the variable (i.e., $Δx$)
(3) Third, compute the thresholds for the variables. This can be done in EViews using the formula below
series Q1 = @quantile(Δx,τ1)
series Q2 = @quantile(Δx,τ2)
Please note that the quantile is computed from the difference ($Δx$) and NOT $x$.
(4) Based on the computed threshold value for $Δx$ above, generate the series for the lower-tail regime, upper-tail regime, and the inner-corridor:
a. series for the lower-tail regime:
series x_low=@cumsum((Δx<Q1)*Δx)
b. series for the upper-tail regime:
series x_up=@cumsum((Δx>Q2)*Δx)
c. series for the inner-corridor regime:
series x_mid=@cumsum(((Δx>Q1) and (Δx<Q2))*Δx)
Note: There can be more than one inner-corridor regime if there are more than two threshold points. For instance, if there is a third threshold ($Q3$), the two inner-corridor regimes will be given by
series x_mid1=@cumsum(((Δx>Q1) and (Δx<Q2))*Δx)
series x_mid2=@cumsum(((Δx>Q2) and (Δx<Q3))*Δx)
(5) Lastly, after computing the series for all the regimes, an ARDL model can be estimated within the ARDL equation environment in EViews. This can be done by typing the following in the equation Estimation dialog box, for the two-threshold/three-regime model:
y x_low x_up x_mid
and the following for a three-threshold/four-regime model:
y x_low x_up x_mid1 x_mid2
…. the EViews program for the implementation
I wrote an EViews program to perform all steps on the go. You can download the program file for two thresholds, and three partial sums here. It is, however, presented below:
'CODE SNIPPET TO PERFORM THE MULTIPLE THRESHOLD NONLINEAR AUTOREGRESSIVE DISTRIBUTED LAG (MT-NARDL) MODEL
'The following code snippet is for two thresholds, and three partial sums
'----------------------------------------------------------------------------------------------------------------------
'SECTION A: SPECIFICATIONS OF THE VARIABLES
'Specify the variable to be decomposed (variable of interest)
genr decvar = x 'Change "x" to the name of the variable of interest to be decomposed
'Specify the dependent variable
genr depvar = y 'Change "y" to the name of the dependent variable
'Specify the independent variable (excluding the decomposed variables):
group explvars x1 x2 x3 'Change "x1", "x2", and "x3" to the controle variables in the model. Note: the variable to be decomposed (specified at line 7) should not be included
'--------------------------------------------------------------------------------------------------------
'SECTION B: COMPUTATION OF THE THRESHOLDS
'Create the threshold series for two thresholds, three partial sums:
genr thresh1 = @quantile(d(decvar), 0.25) 'Note: the specified thresholds can be changed from 25 and 75 quantiles to, say for instance, 40-60 quantiles or 20-80 quantiles
genr thresh2 = @quantile(d(decvar), 0.75)
'Next we create the regimes (three partial sums).
genr x_up = @cumsum((d(decvar) <= thresh1)*d(decvar))
genr x_mid = @cumsum(((d(decvar) > thresh1) and (d(decvar) <= thresh2))*d(decvar))
genr x_low = @cumsum((d(decvar) > thresh2)* d(decvar))
explvars.add x_up x_mid x_low 'This line of code adds the partial sums to the group created for explanatory variables in line 14
'Lastly, I create a group object to hold the partial sums created above, then I generate a line graph to visualise the partial sums
graph ps_graph.line x_up x_mid x_low
show ps_graph
'--------------------------------------------------------------------------------------------------------
'SECTION C: ESTIMATING THE MT-NARDL MODEL
'Now we estimate the Multiple Threshold Nonlinear ARDL (MT-NARDL) model with the inclusion of the partial sums (x_up, x_mid, x_low)
equation mtnardl.ardl(ic = aic, deplags=4, reglags=4) depvar explvars 'This line of code estimates the ARDL model with lags selection based on AIC criterion. it can be changed to “bic” for SIC; “hq” for HQC; or “rbar2” for Adjusted R-squared
'If you're using a finite sample, you may want to reduce the maximum lag order from 4 to something smaller.
show mtnardl
… explanation of the codes
The code is pretty quite straight forward and easy to use. All you need to to is specify you dependent variable, the variable you want to decompose, and your control variable in section A of the program file.
There are two ways to do this. The first approach involves naming your variables to follow the letter used so that you don’t need to change anything in the code. That is name your dependent variable as ‘y’ (small letter). The variable you want to decompose as ‘x’, and the control variables to ‘x1, x2, and x3’. If you are using just three control variables, you don’t need to change the code. But If you have more, you will just include them in the code after group explvars x1 x2 x3. You can as well include or change you controls after the MT-NARDL model is estimated.
The other approach is replacing y with your dependent variable; x with the variable to be decomposed; and x1, x2, and x3 with your control variables.
Note: After estimating the MT-NARDL model, the variables x_up, x_mid, and x_low represent the upper-tail regime, inner-corrido regime, and the lower-tail regime, respectively.
If you are interested in considering more than two thresholds, use this program file to estimate a four-thresholds/five-regime MT-NARDL model.
I will include the three-threshold/four-regime MT-NARDL code at a later date.
Please read this blog post by Professor Olayeni Olaolu Richard of the Obafemi Awolowo University, Nigeria for more information on the MT-NARDL technique.