Announcement

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

  • Identifying Business Cycle Dates Using Weekly Panel Data

    Dear Statalist members,

    I need to identify business cycle dates in Stata using weekly panel data, and I would be grateful for your support. All the information I can provide at this point is as follows:

    What do I do?
    I work with a panel dataset of around 1,200 companies observed over 156 weeks. There is an identifier for each company, the week variable in date format, and the weekly stock price. The data are xtset, and the panel is strongly balanced with around 190,000 observations.

    What have I learned so far?
    I have learned that it is possible to calculate the peaks and troughs of an economic time series using the Harding and Pagan (HP) algorithm (proposed by Don Harding and Adrian Pagan in 2002, detailed reference below). Specifically, Philippe Bracke at LSE wrote a Stata program to implement the algorithm, and it is available for download from the RePEc website (SBBQ).

    What do I need?
    I contacted Dr. Bracke and asked whether there is an updated version of the program, as it was written for Stata 9, and I use the current version, Stata 19. Also, I asked whether there is a program that would run for weekly data, as the SBBQ is for quarterly data. Dr. Bracke replied that the program has not been updated since 2012, and he is not aware of an alternative program for weekly data. So, I would like to know if there are current official or community-contributed programs for implementing the HP algorithm and identifying business cycle dates for weekly panel data.

    Thank you for your time and consideration.

    Reference
    Harding, Don, and Adrian Pagan. (2002). Dissecting the cycle: a methodological investigation. Journal of Monetary Economics, 49(2): 365-381. https://doi.org/10.1016/S0304-3932(01)00108-8

  • #2
    I have just glanced at this command and venture the following guesses:

    0. You don't need to update the code so far as I can see. It may be 20 years old, but it's not outdated.

    1. It doesn't appear to apply to panel data, except by running it separately on each panel.

    2. It's explicit that monthly data could be used and indeed weekly data would seem equally applicable.

    3. Manifestly the defaults are chosen with quarterly data in mind.

    Don't try to set up your data using Stata weekly dates: for what to do instead start with https://journals.sagepub.com/doi/pdf...6867X251341416 and the references in its Section 2.7.

    Comment


    • #3
      Thank you very much for your reply, dear Dr. Cox.

      I will try to install the program and see whether it works with weekly data.

      I will also read the article you have referenced.

      Best regards,
      Gayane

      Comment

      Working...
      X