IDEAS home Printed from https://ideas.repec.org/p/vic/vicddp/2401.html
   My bibliography  Save this paper

An Aggression-Consistent Implementation of the Hamilton Filter

Author

Abstract

I propose a modified implementation of the popular Hamilton filter, to make the cyclical component extracted from an aggregate variable consistent with the aggregation of the cyclical components extracted from its underlying variables. This procedure is helpful in many circumstances, for instance when dealing with a variable that comes from a definition or when the empirical relationship is based on an equilibrium condition of a growth model. The procedure consists of the following steps: 1) build the aggregate variable, 2) run the Hamilton filter regression on the aggregate variable and store the related OLS estimates, 3) use these estimated parameters to predict the trends of all the underlying variables, 4) rescale the constant terms to obtain mean-zero cyclical components that are aggregation-consistent. I consider two applications, exploiting U.S. and Canadian data. The former is based on the GDP expenditure components, while the latter on the GDP of its Provinces and Territories. I find sizable differences between the cyclical components of aggregate GDP computed with and without the adjustment, making it a valuable procedure for both assessing the output gap and validating empirically DSGE models.

Suggested Citation

  • Marco Cozzi, 2024. "An Aggression-Consistent Implementation of the Hamilton Filter," Department Discussion Papers 2401, Department of Economics, University of Victoria.
  • Handle: RePEc:vic:vicddp:2401
    Note: ISSN 1914-2838
    as

    Download full text from publisher

    File URL: https://www.uvic.ca/socialsciences/economics/_assets/docs/ddp_2401.pdf
    Download Restriction: no
    ---><---

    References listed on IDEAS

    as
    1. Günes Kamber & James Morley & Benjamin Wong, 2018. "Intuitive and Reliable Estimates of the Output Gap from a Beveridge-Nelson Filter," The Review of Economics and Statistics, MIT Press, vol. 100(3), pages 550-566, July.
    2. Hodrick, Robert J & Prescott, Edward C, 1997. "Postwar U.S. Business Cycles: An Empirical Investigation," Journal of Money, Credit and Banking, Blackwell Publishing, vol. 29(1), pages 1-16, February.
    3. James D. Hamilton, 2018. "Why You Should Never Use the Hodrick-Prescott Filter," The Review of Economics and Statistics, MIT Press, vol. 100(5), pages 831-843, December.
    4. Nicolas Caramp & Sanjay R Singh, 2023. "Bond Premium Cyclicality and Liquidity Traps," The Review of Economic Studies, Review of Economic Studies Ltd, vol. 90(6), pages 2822-2879.
    5. Harvey, A C & Jaeger, A, 1993. "Detrending, Stylized Facts and the Business Cycle," Journal of Applied Econometrics, John Wiley & Sons, Ltd., vol. 8(3), pages 231-247, July-Sept.
    Full references (including those not matched with items on IDEAS)

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Martin Boďa & Mariana Považanová, 2023. "How credible are Okun coefficients? The gap version of Okun’s law for G7 economies," Economic Change and Restructuring, Springer, vol. 56(3), pages 1467-1514, June.
    2. Schüler, Yves S. & Hiebert, Paul P. & Peltonen, Tuomas A., 2020. "Financial cycles: Characterisation and real-time measurement," Journal of International Money and Finance, Elsevier, vol. 100(C).
    3. Morana, Claudio, 2024. "A new macro-financial condition index for the euro area," Econometrics and Statistics, Elsevier, vol. 29(C), pages 64-87.
    4. Viv B. Hall & Peter Thomson, 2021. "Does Hamilton’s OLS Regression Provide a “better alternative” to the Hodrick-Prescott Filter? A New Zealand Business Cycle Perspective," Journal of Business Cycle Research, Springer;Centre for International Research on Economic Tendency Surveys (CIRET), vol. 17(2), pages 151-183, November.
    5. Melina Dritsaki & Chaido Dritsaki, 2022. "Comparison of HP Filter and the Hamilton’s Regression," Mathematics, MDPI, vol. 10(8), pages 1-18, April.
    6. Josefine Quast & Maik H. Wolters, 2022. "Reliable Real-Time Output Gap Estimates Based on a Modified Hamilton Filter," Journal of Business & Economic Statistics, Taylor & Francis Journals, vol. 40(1), pages 152-168, January.
    7. Fritz, Marlon, 2019. "Steady state adjusting trends using a data-driven local polynomial regression," Economic Modelling, Elsevier, vol. 83(C), pages 312-325.
    8. Fernandes, Mário Correia & Dutra, Tiago Mota & Dias, José Carlos & Teixeira, João C.A., 2023. "Modelling output gaps in the Euro Area with structural breaks: The COVID-19 recession," Economic Analysis and Policy, Elsevier, vol. 78(C), pages 1046-1058.
    9. Jalles, João Tovar & Karras, Georgios, 2023. "Macroeconomic volatility and the current account: Extending the evidence," Economic Modelling, Elsevier, vol. 125(C).
    10. Biolsi, Christopher, 2021. "Labor productivity forecasts based on a Beveridge–Nelson filter: Is there statistical evidence for a slowdown?," Journal of Macroeconomics, Elsevier, vol. 69(C).
    11. James Morley & Benjamin Wong, 2020. "Estimating and accounting for the output gap with large Bayesian vector autoregressions," Journal of Applied Econometrics, John Wiley & Sons, Ltd., vol. 35(1), pages 1-18, January.
    12. Duarte, Cláudia & Maria, José R. & Sazedj, Sharmin, 2020. "Trends and cycles under changing economic conditions," Economic Modelling, Elsevier, vol. 92(C), pages 126-146.
    13. Schüler, Yves S., 2020. "On the credit-to-GDP gap and spurious medium-term cycles," Economics Letters, Elsevier, vol. 192(C).
    14. Chalmovianský, Jakub & Němec, Daniel, 2022. "Assessing uncertainty of output gap estimates: Evidence from Visegrad countries," Economic Modelling, Elsevier, vol. 116(C).
    15. Alfred A. Haug & India Power, 2022. "Government Spending Multipliers in Times of Tight and Loose Monetary Policy in New Zealand," The Economic Record, The Economic Society of Australia, vol. 98(322), pages 249-270, September.
    16. Tihana Škrinjarić, 2023. "Credit-to-GDP Gap Estimates in Real Time: A Stable Indicator for Macroprudential Policy Making in Croatia," Comparative Economic Studies, Palgrave Macmillan;Association for Comparative Economic Studies, vol. 65(3), pages 582-614, September.
    17. Donayre, Luiggi, 2022. "On the behavior of Okun's law across business cycles," Economic Modelling, Elsevier, vol. 112(C).
    18. Yao, Fang, 2022. "Estimating the Trend of the House Price to Income Ratio in Ireland," Research Technical Papers 8/RT/22, Central Bank of Ireland.
    19. Arčabić, Vladimir & Škrinjarić, Tihana, 2021. "Sharing is caring: Spillovers and synchronization of business cycles in the European Union," Economic Modelling, Elsevier, vol. 96(C), pages 25-39.
    20. Robert J. Hodrick, 2020. "An Exploration of Trend-Cycle Decomposition Methodologies in Simulated Data," NBER Working Papers 26750, National Bureau of Economic Research, Inc.

    More about this item

    Keywords

    Business cycles; Filtering; Hamilton filter; Output gap; Trend-cycle decomposition. JEL Classifications: C22; E30; E32.;
    All these keywords.

    JEL classification:

    • C22 - Mathematical and Quantitative Methods - - Single Equation Models; Single Variables - - - Time-Series Models; Dynamic Quantile Regressions; Dynamic Treatment Effect Models; Diffusion Processes
    • E30 - Macroeconomics and Monetary Economics - - Prices, Business Fluctuations, and Cycles - - - General (includes Measurement and Data)

    NEP fields

    This paper has been announced in the following NEP Reports:

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:vic:vicddp:2401. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: Kali Moon (email available below). General contact details of provider: https://edirc.repec.org/data/devicca.html .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.