Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • ARDL Co-Integration Approach

    Dear friends and colleagues,
    First of all, I would like to say that I'm new to this forum, so apologies for the foreseeable mistakes I'll do writing this post.
    I'm a last year economics student doing his bachelor thesis on a very interesting topic "Finding causal relations between the Spanish Stock Market Index and different Macroeconomic Variables". I'm using a similar approach to Hasan and Nasir (2008) where they used an ARDL of co-integration with monthly data to find causal relations between CPI, Interest rate, M1, Total Production Index, Exchange rate, oil prices and Foreign Portfolio Investment.
    I'm doing a similar methodology, but changing my country of interest to Spain, and I'm using almost all the data from the FRED. Also, I'm using monthly data from 2002 M1 to 2019 M1.
    The problem I've found is that after performing all tests, and finding that my methodology seems correct (no unit roots, no OVB, homoscedasticity, no structural break, evidence of L-R relationships...), my results are not significant. That is, that when I perform my ARDL, I don't find statistically significant results, and as you may think, this would make my thesis and all my work useless.
    Would love to hear any new ideas or any opinion on how I could approach this.
    I've added unemployment and economic uncertainty to see if, with some new variables, my model could change, but it didn't.
    Attached you will find my methodology.

    Thanks, and hoping to received feedback soon.





    Code:

    tsset date
    gen returns= log(equity/equity[_n-1])
    label variable returns "Returns of the Bolsa the Madrid Index "

    gen lnTPI= log(tpi/tpi[_n-1])
    label variable lnTPI "Log of Total Production Index "

    gen lnOil= log(oil/oil[_n-1])
    label variable lnOil "Log of Oil prices "

    gen lnM1= log(M1/M1[_n-1])
    label variable lnM1 "Log of Money Supply (M1)"

    gen lnR= log(interest/interest[_n-1])
    label variable lnR "Log of interest rate"

    gen lnXrate= log(exc/exc[_n-1])
    label variable lnXrate "Log of Foreign Exchange Rate"

    gen lnCPI= log(CPI/CPI[_n-1])
    label variable lnCPI "Log of Inflation "

    gen lnU= log(unem/unem[_n-1])
    label variable lnU "First Difference in Unemployment "

    gen lnEC= log(econ/econ[_n-1])
    label variable lnEC "First Difference in Economic Policy Uncertainty "

    gen lnS= log(shares)
    label variable lnS "First Difference in Growth Returns -Spain "

    *Generating the monthly data:
    generate datem = mofd(date)
    format datem %tm



    ************************************************** ****************************************
    * 2. UNIT ROOT ANALYSIS
    ************************************************** ****************************************

    *2. Analysing non-stationarity

    * A. Returns
    dfuller return , trend
    dfuller price , trend
    pperron price , trend
    pperron return , trend
    * Our p-value is 0.00, and thus, we reject the null hypothesis that our variable of interest contains a unit root, and we find that returns was generated by a stationary process (which makes sense since is I(1))

    *B. oil

    dfuller oil , trend
    pperron oil , trend
    dfuller lnOil , trend
    pperron lnOil , trend
    * Our p-value is 0.00, and thus, we reject the null hypothesis that our variable of interest contains a unit root, and we find that returns was generated by a stationary process (which makes sense since is I(1))
    *C.
    dfuller lnTPI , trend
    pperron lnTPI , trend
    dfuller tpi, trend
    pperron tpi , trend


    * Our p-value is 0.00, and thus, we reject the null hypothesis that our variable of interest contains a unit root, and we find that returns was generated by a stationary process (which makes sense since is I(1))
    *D.
    dfuller lnR , trend
    pperron lnR , trend
    dfuller interest , trend
    pperron interest , trend

    * Our p-value is 0.00, and thus, we reject the null hypothesis that our variable of interest contains a unit root, and we find that returns was generated by a stationary process (which makes sense since is I(1))

    *E.
    dfuller lnM1 , trend
    pperron lnM1 , trend
    dfuller M1, trend
    pperron M1, trend

    *F
    dfuller lnCPI
    dfuller CPI
    pperron lnCPI
    pperron CPI

    *G.
    dfuller returnNY, trend
    dfuller price_ny
    pperron returnNY, trend
    pperron price_ny

    *H Unemployment
    dfuller unem
    dfuller lnU

    *I. Economic Uncertainty Inde
    dfuller econ
    dfuller lnEC

    pperron shares
    estat ic


    ************************************************** ****************************************
    * 3. SELECTING LAG ORDER
    ************************************************** ****************************************
    varsoc return lnR lnM1 lnOil lnTPI lnCPI lnXrate

    *Optimal lag is 1
    * Using AIC, optimal lag is 3 (doesn't matter if we include NY_R or not')
    *Using SBIC, optimal lag is 1



    ************************************************** ****************************************
    * 4. DIAGNOSTIC TESTS
    ************************************************** ****************************************
    tsset date
    regress price oil tpi M1 CPI interest exc unem econ price_ny

    * A. Lagrange Multiplier Test

    estat bgodfrey, lag(1)
    * We reject H0 and thus, we conclude that there is no serial correlation
    tsset date
    regress return lnR lnM1 lnOil lnCPI lnTPI lnXrate returnNY lnU lnEC

    * B. TEST FOR SKEWNESS
    sktest return lnM1 lnOil lnR lnCPI lnTPI lnXrate returnNY lnU lnEC


    * C. WHITE TEST
    wntestb return
    wntestq return // we don't reject H0, and thus, the variable follows a WN process
    estat hettest // variable is homoscedastic

    *D. RAMSEY'S RESET TEST
    estat ovtest
    * At the 5% level, we don't reject H0 and thus we conclude that there is no significant evidence that our regression suffers from OVB.
    *P = 0.0738 , F=2.35
    *If we used the non-log regression, we would have OVB

    ************************************************** ****************************************
    * 4. ARDL APPLICATION
    ************************************************** ****************************************

    *A. ARDL TEST
    tsset date
    ardl return lnR lnM1 lnOil lnCPI lnTPI lnXrate lnU lnEC , lag(3)
    ardl return lnR lnM1 lnOil lnCPI lnTPI lnXrate lnU lnEC , ec lag(3)

    * B. Bound test to look for L-R relationships
    estat btest
    *Results: We Reject H0 and conclude thate there exists statistically significant evidence that there are L-R relationships between our variables

    *C. CUSUM
    regress return lnR lnM1 lnOil lnCPI lnTPI lnXrate returnNY lnEC lnU

    estat sbcusum
    *At the 5% level, we get a t-stat= 0.5672 and a p-value of 0.94, thus not rejecting our H0 and concluding that there is not a structural break in our variable of interest.

  • #2
    ardl is used to examine both long and short-run relationships between variables. It looks like you're using first differences and then running ardl. I suggest verifying that none of your variables are I(2) and then running ardl on the levels of your variables to capture the long-run relationship. The short term relationships are captured by the first difference terms of the levels in ardl, so you don't need to create them. Also, I would skip the varsoc step and let ardl select the lag order for your model. Hope this helps.

    Note:
    ardl is a community-contributed command from SSC by Sebastian Kripfganz and Daniel Schneider

    Comment


    • #3
      Hi Justin,
      Many thanks for your answer. I'm doing the first differences because I'm following a paper by Hasan and Nasir (2008). In there, they used as a variable of interest LN R= ln(Price(t)/Price(t-1)), and for their analysis, they used the variables in first differences (if I'm not mistaken).
      Given that my variables appear to have a unit root in their levels, do you think that applying the ARDL method without taking FD would be ok? As I understand it, you use the FD to take out the unit root effect of those variables, and that's when you run the ARDL, but maybe I'm wrong about that.
      Would you run the ARDL using prices (of the market index) or using returns without the log?
      Also, if I skip the varsoc step, an error appears saying "# of lag permutations (1562500) exceeds setting of 'maxcombs' (100000)".
      How do you think should I approach this?
      Many thanks again,
      Álvaro

      Comment


      • #4
        Hi, sorry to ask a different question here. I have been a little confused about interpreting my results from "ardl" command and "ardl, ec" command.

        Could anyone please help me with answering these questions?

        1. Prior to the bound test, I am running the command "ardl [indep.var] [dep.vars]" and I am getting coefficients for the variables under different lags. I was wondering whether these coefficients are the ones I am getting from the regression equation on Slide 5 from your presentation file (here)? If so, could you please tell me if it is correct to just interpret them as I would interpret normal regression results?


        2. If the above is correct, are the long-run and short-run coefficients I get from "ardl, ec" command is the coefficients from the regression equation in slide 12? What is the difference between the coefficients from Question 1 and coefficients from ARDL with EC?

        3. How do I explain it if the lagged terms of the same variables have different signs? For example, for variable x, lag 1 is positive and lag 2 is negative etc.

        4. I am running my error correction with the command "ardl, ec1" because I am losing two of my coefficients in the short run when I use ec. Could you please help me with how I should interpret my short-run results with ec1 with the adjustment term? I have seen a different post on a similar question, but I am still a little bit confused.

        I would highly appreciate it if anyone could answer my questions.

        Kind Regards,
        Munkhtuul

        Comment


        • #5
          Munkhtuul Gantumur I think you should start a separate thread for these questions.

          Many thanks for your answer. I'm doing the first differences because I'm following a paper by Hasan and Nasir (2008). In there, they used as a variable of interest LN R= ln(Price(t)/Price(t-1)), and for their analysis, they used the variables in first differences (if I'm not mistaken). Given that my variables appear to have a unit root in their levels, do you think that applying the ARDL method without taking FD would be ok? As I understand it, you use the FD to take out the unit root effect of those variables, and that's when you run the ARDL, but maybe I'm wrong about that.
          ardl does this step. Look at your regression output from running ardl on the levels when you use the error-correction form. This is shown on page six of the article you linked.


          Would you run the ARDL using prices (of the market index) or using returns without the log?
          Use log. The error-correction form will give you the first differences (returns) as the short-run dynamics.

          Also, if I skip the varsoc step, an error appears saying "# of lag permutations (1562500) exceeds setting of 'maxcombs' (100000)".
          How do you think should I approach this?
          Many thanks again,
          Álvaro
          I suggest using the maxlags() option, but you are able to adjust the maxcombs beyond the default.
          Last edited by Justin Niakamal; 04 Apr 2021, 12:15.

          Comment


          • #6
            Dear Justin Niakamal ,
            First of all, many thanks for your reply. This is highly appreciated. I'm running the Lagrange Multiplier test using the estat bgodfre function, after running the regression of prices and macroeconomic variables (in logs), and it appears to be a serial correlation problem. If I'm taking the first differences, the serial correlation disappears (as in theory should be). In the paper I cited before, they don't specify if they are applying the LM test in levels, logs, or how. What do you think would be the case?
            Also, would love to hear which function would you recommend in Stata to test skewness and kurtosis.
            Thanks again for everything.

            Best

            Comment


            • #7
              Take a look at pages 27-30 of Sebastian’s presentation (linked below) for both your questions on heteroskedasticity and skewness/kurtosis testing. Note that ardl doesn’t compute robust standard errors, but Sebastian shows how to get Newey-West standard errors on slide 41. Hope this helps.

              http://repec.org/usug2018/uk18_Kripfganz.pdf

              Comment

              Working...
              X