Professional Documents
Culture Documents
HP-Filter can be easily done in excel. To do so, we need to install the HP-Filter excel
After download and unzip, install it from the “HPFilter.xla” file. Create a folder for your
excel data file and save the .xla file in your folder.
Open the Excel workbook the contains the data you want to filter.
In the drop down menu click “Options” (lowest), and in the new box appearing click
A new box appears. In the “Manage” dropdown menu of this box (at the very bottom of
A new box comes up. If this already offers “Hodrick-Prescott Filter (HP-Filter)” among the
different add-ins, you can simply select this and then click “OK” (if the Excel workbook you
are in lies in the folder in which you have the filter this should be so). If not click “Browse”
and find and open the folder where you have put the filter, select “Hodrick-Prescott Filter
Now you should be able to use the HP Filter in the workbook you are in.
tiqbal@iba.edu.pk 1
HP Filter Tehseen Iqbal (IBA)
HP Filtering
Step 1: Prepare the original data. In our example, we have unemployment rate (LUR) and
loga- rithm of real GDP multiplied by 100 (lnY*100) of Alabama from 1976 to 2011. They
tiqbal@iba.edu.pk 2
HP Filter Tehseen Iqbal (IBA)
Step 2: Select the trend component area that is corresponding with the original data
tiqbal@iba.edu.pk 3
HP Filter Tehseen Iqbal (IBA)
Step 3: Keep the area selected, and type the command: =HP(C2:C37,100)1 , where
HP is the main command, C2:C37 is the range of the original data, 100 is the smoothing
1
For quarterly data, we use 1600 as smoothing parameter in place of 100
tiqbal@iba.edu.pk 4
HP Filter Tehseen Iqbal (IBA)
tiqbal@iba.edu.pk 5
HP Filter Tehseen Iqbal (IBA)
Step 5: We can follow the similar steps and get the trend component of real output.
tiqbal@iba.edu.pk 6
HP Filter Tehseen Iqbal (IBA)
Step 6: We can get the cyclical component by subtracting the trend component from the
original data:
tiqbal@iba.edu.pk 7