Wednesday, December 9, 2015

Seasonal Unit Root Testing in EViews

When we're dealing with seasonal data - e.g., quarterly data - we need to distinguish between "deterministic seasonality" and "stochastic seasonality". The first type of seasonality is what we try to remove when we "seasonally adjust" the series. It's also what we're trying to account for when we include seasonal dummy variables in a regression model.

On the other hand, "stochastic seasonality" refers to unit roots at the seasonal frequencies. This is a whole different issue, and it's been well researched in the time-series econometrics literature.

This distinction is similar to that between a "deterministic trend" and a "stochastic trend" in annual data. The former can be removed by "de-tending" the series, but the latter refers to a unit root (at the zero frequency).

The most widely used procedure for testing for seasonal unit roots is that proposed by Hylleberg et al. (HEGY) (1990), and extended by Ghysels et al. (1994).

In my graduate-level time-series course we always look at stochastic seasonality. Recently, Nicolas Ronderos has written a new "Add-in" for EViews to make it easy to implement the HEGY testing procedure (see here). This will certainly save some coding for EViews users.  

Of course, stochastic seasonality can also arise in the case of monthly data - this is really messy - see Beaulieu and Miron (1993). In the case of half-yearly data, the necessary theoretical framework and critical values are developed and illustrated by Feltham and Giles (2003)

And if you have unit roots at the seasonal frequencies in two or more time-series, you might also have seasonal cointegration. The seminal contribution relating to this is by Engle et al. (1993), and an short empirical application is provided by Reinhardt and Giles (2001)

I plan to illustrate the application of seasonal unit root and cointegration tests in a future blog post.

(Also, note the comment from Jack Lucchetti, below, that draws attention to a HEGY addon for Gretl, written by Ignacio Diaz Emparanza.)


Beaulieu, J. J., and J. A. Miron, 1993. Seasonal unit roots in aggregate U.S. data. Journal of Econometrics, 55, 305-328.

Engle, R. F., C. W. J. Granger, S. Hyleberg, H. S. Lee, 1993. Seasonal cointegration: The Japanese consumption function. Journal of Econometrics, 55, 275-298.

Feltham, S. G. and D. E. A. Giles, 2003. Testing for unit roots in semi-annual data. in D.E.A. Giles 
(ed.), Computer-Aided Econometrics. Marcel Dekker, New York, 175-208. (Pre-print here.)

Ghysels, E., H. S. Lee, and J. Noh, 1994. Testing for unit roots in seasonal time series: Some theoretical extensions and a Monte Carlo investigation. Journal of Econometrics, 62, 415-442.

Hylleberg, S., R. F. Engle, C. W. J. Granger, and B. S. Yoo, 1990. Seasonal integration and cointegration. Journal of Econometrics, 44, 215-238.

Reinhardt, F. S. and D. E. A. Giles, 2001. Are cigarette bans really good economic policy?. Applied Economics, 33, 1365-1368. (Pre-print here.)

© 2015, David E. Giles


  1. Dave, we need more of these articles.

    Is it possible to get say one a week at all?

    These are really educational

  2. be kind to your 1000's of fans Dave

  3. Really interesting topic!!!!!!!!! looking forward to read your post.

  4. Ignacio Diaz Emparanza has written a very nice gretl addon for the HEGY test, which incorporates response surfaces as per his own paper on CSDA (

    1. Thanks Jack - I have updated the post above.

    2. Thanks Dave. Also note that Ignacio computed response surfaces for arbitrary periodicities. So if for example you want to run a HEGY test on daily data with weekly spectral peaks, it's easy to do so.

  5. Dear Sir,

    Is it enough just to use Dickey Fuller test to ensure we get rid of autocorrelation by differencing the data until we can reject Ho? Because I have a time series data, and for some variables, even after differencing them until I can reject the DF test for unit root, the AC and PAC graphs still look very very weird. Also, is it satisfactory to reject at 5% significant level but not 1%?

    Another question which is not so related to this post which I want to ask is: I have in my model some variables that are integrated of order 0, some are 1, and some are 2. Can I use the ARDL model?

    I'm writing my dissertation and your posts are of so much help. Thank you very much and best regards,


    1. Chelsea: The DF test has nothing to do with autocorrelation. If your data are I(1) and you difference, this might help with error autocorrelation, but that's just incidental. There's no "magic" significance level - it's arbitrary. In ARDL models, you cannot have any series that are I(2) - this is something I have stressed in my various posts about these models.

  6. Hi Dave,
    Are you aware of any software procedures (codes) that perform seasonal cointegration test for monthly data?

  7. "I plan to illustrate the application of seasonal unit root and cointegration tests in a future blog post." ....looking forward to it

  8. I read that HEGY was written to deal with quarterly data. What are the implications of running this test on monthly data???

    1. Maria - if you have monthly data then HEGY is not appropriate. The appropriate testing is described by Beaulieu and Miron, J. Econometrics 1993. See this link:

  9. Dear professor Giles. After reading this article, can I conclude that when dealing with quarterly or monthly series, the first step is to perform seasonal unit root tests to assess if the seasonality is deterministic or not? Is this correct? If yes, I have two possible outcomes. One is that the series has deterministic seasonality and in that case I can seasonally adjust it.

    However, if the outcome of the unit root test is tha the seasonality is stochastic, What is next (considering that you reply to a comment in this post that regarding to the availability of codes for cointegration "Nothing comes to mind - sorry")?

    Kind Regards,


    1. Reynaldo - your interpretation. My earlier remarks are specifically in reference to code for MONTHLY cointgegration. In the case of seasonal cointegration at the quarterly level you don;t need any special "code" the steps are straightforward and can easily be implemented with regular data transformations in EViews, Gretl, Stata, R, etc. See my comments and references towards the end of the above post.

    2. I should have said "You interpretation is correct". Sorry. DG