Reconciling Output Gaps: Unobserved Components Model and Hodrick-Prescott Filter

Angelia Grant and Joshua Chan (2017)
Journal of Economic Dynamics and Control, 75, 114-121
[ Journal Version | Working Paper | Code ]

This code estimates the output gap from a new unobserved components model with a second-order Markov process for the trend. It improves upon the HP filter by allowing serial correlation in the cyclical component.

The code also computes the marginal likelihood for each model using the improved cross-entropy method developed in Chan and Eisenstat (2015).