**4. The HP filter**

The Hodrick-Prescott filter has been the common use of filtering approach in many documented works studying the cyclicity of the economic system. Our first part of the study will study the real GDP and the trend through the HP filter. The trend of the data series *yt* � �, *<sup>t</sup>* <sup>¼</sup> 1, … , *<sup>T</sup>*, is the solution f g *xt* of the following minimization:

$$\sum\_{t=1}^{T} \left( y\_t - \mathbf{x}\_t \right)^2 + \lambda \sum\_{t=3}^{T} \left( \Delta^2 \mathbf{x}\_t \right)^2 \tag{1}$$

T is the sample size and Δ denote the difference operator. *yt* is the log of real GDP and \* is the potential or unobserved level

$$
\Delta y\_t^\* = \Delta y\_{t-1}^\* + \varepsilon\_{0,t}, \ \varepsilon\_{0,t} \sim N\left(0, \sigma\_0^2\right) \tag{2}
$$

$$y\_t = y\_t^\* + \varepsilon\_{1,t}, \ \varepsilon\_{1,t} \sim N(0, \sigma\_1^2) \tag{3}$$

$$
\Delta \mathbf{x}\_t = \mathbf{x}\_t - \mathbf{x}\_{t-1} \text{ and } \Delta^2 \mathbf{x}\_t = \Delta \mathbf{x}\_t - \Delta \mathbf{x}\_{t-1} = \mathbf{x}\_t - \mathbf{2} \mathbf{x}\_{t-1} + \mathbf{x}\_{t-2} \tag{4}
$$

### *The Global Business Cycle within the New Commodities and the Financial Cycle… DOI: http://dx.doi.org/10.5772/intechopen.111482*

The first component in Eq. (1) measures the error *yt* � *xt*, the second component measures the smoothness of the trend. Δ<sup>2</sup> *xt*, *λ*≥0 is a regularization or smoothing parameter (or a turning parameter) that controls the trade-off between the size of the error and the smoothness of the trends. Eq. (1) is penalized the least square problem, penalizing the smoothness of its solution. The solution of the Eq. (1) is denoted as *xhp*ð Þ*<sup>λ</sup>* <sup>∈</sup> *RT*. It is common to calibrate the variance error term so that their ratio is equal *λ* ¼ 1600, which correspond to a business cycle of 8 year, for quarterly data is not always appropriate.

Within our study we refer to the minimization of Eq. (1) to find the value of *λ*. **Figure 1** denotes the real global GDP, shown in red and the trend shown in blue. At a further step later in the model we ask which HP trend is close to the estimated trend of global GDP from the multivariate UC model. The search for *λ* in Eq. (1) is limited to positive integers. We find that the HP trend with *λ* ¼ 540,000 minimizes Eq. (1).

**Figure 2** shows the global GDP from 1984 to the fourth quarter of 2020, which is our sample data in the study and the trend using the HP filter. Based on that filtering

### **Figure 1.**

*Global real GDP and the estimated smoothed trend, 1984:Q1–2020:Q4. The red line shows the global real GDP, and the blue line is the estimated smoothed trend. Source: Own study.*

we have 6 downswings, 1984–1986, 1993–1996, 2001–2004, 2008–2012, 2015–2018, and 2020 and 4 upswings, 1987–1992, 1997–2000, 2005–2007, 2013–2014. The analyzed swings are short as the data sampled cycle is for 36 years, we have an average of 4 years of upswings and 3 years of downswings. We can understand from this figure, considering the second petroleum shock and the Asiatic, the Mexican, the Russian crisis and the subprime crisis, that we have an average of 4 years of upswing and an average downswing of about 3 years, for a total average cycle length of 7 years. The presence of several crises and monetary shocks impulsion as well as the petroleum shock are bringing down this average.

In order to reframe the trend of the global GDP with a close trend to the smoothed estimated trend in **Figure 2**, we calculate the value of *λ* based on the minimization of the Eq. (1). The blue line shows the HP trend with a smoothing parameter equal to 400,000. Making a comparison between **Figures 1** and **2** for the trends we can understand that both trends are not identical, which we can affirm that a standard choice of *λ* ¼ 16000 for quarterly data is not appropriate to show the real trend.
