# Case Studies

If you're interested in time series analysis and forecasting, this is the right place to be. The Time Series Lab (TSL) software platform makes time series analysis available to anyone with a basic knowledge of statistics. Future versions will remove the need for a basic knowledge altogether by providing fully automated forecasting systems. The platform is designed and developed in a way such that results can be obtained quickly and verified easily. At the same time, many advanced time series and forecasting operations are available for the experts. In our case studies, we often present screenshots of the program so that you can easily replicate results.

Did you know you can make a screenshot of a TSL program window? Press Ctrl + p to open a window which allows you to save a screenshot of the program. The TSL window should be located on your main monitor.

Click on the buttons below to go to our case studies. At the beginning of each case study, the required TSL package is mentioned. Our first case study, about the Nile data, is meant to illustrate the basic workings of the program and we advise you to start with that one.

# Business cycle and COVID

Date: August 11, 2022

Software: Time Series Lab - Home Edition

Topics: Business cycle and the COVID period

Batch program: business_cycle.txt

#### US quarterly Real Gross Domestic Product

In this case study we extract the business cycle from US GDP data. We show that without treatment of the COVID period, the estimation of the business cycle gets distorted. We show that in Time Series Lab, treatment of the COVID period is simple and can be automated. The time series is US quarterly Real Gross Domestic Product, seasonally adjusted, and can be downloaded from here. The time series consists of 302 observations ranging from Q1 of 1947 to Q2 of 2022.

#### Logarithm of US quarterly Real GDP

#### Univariate trend-cycle decomposition

In economic time series the cycle component is usually associated with the business cycle. The definition of a business cycle from NBER is typically adopted:

A cycle consists of expansions occurring at about the same time in many economic activities, followed by similar general recessions, contractions, and revivals which merge into the expansion phase of the next cycle; this sequence of changes is recurrent but not periodic; in duration business cycles vary from more than

**one** year to ten or **twelve** years; they are not divisible into shorter cycles of similar character with amplitudes approximating their own.

To let our cycle component resemble this definition, we specify the cycle as a stationary stochastic process.
The trend-cycle decomposition model is given by
\[
y_t = \mu_t + \psi_t + \varepsilon_t, \qquad \varepsilon_t \sim \text{NID}(0, \sigma^2_{\varepsilon}), \qquad t = 1,\ldots,T,
\]
where $\mu_t$ represents the trend, $\psi_t$ the cycle and $\varepsilon_t$ the irregular component.
$\mu_t$ is specified as a smooth trend and $\psi_t$ is modeled as an **ARMA(2,1)** process where the autoregressive part is designed to incorporate cyclical dynamics.
The use of a smooth trend with a cycle often leads to a more attractive decomposition. For more information see also Durbin and Koopman (2012).

#### Extracting the business cycle *without* the COVID period

From the **Build your own model page**, select a **Fixed** level, a time-varying slope, and a time-varying cycle component.
A model with a fixed level and time-varying slope is called a Integrated Random Walk model and this model usually gives a smooth trend.
Go to the **Estimation** page and make sure that the starting value of the **period** of the cycle is set to 20 quarters (5 years). Alternatively you can fix the period to 20 by clicking the Fix checkbox corresponding to the period but this is not strictly needed.

Set the end of the training sample to 2019-10-01 (292 observations) to exclude the COVID period.
We do this to see what the business cycle length was before COVID.
Estimate the model and after TSL is done with the work, we obtain the following text output. We can see that the estimated **Period** of the business cycle is 19 quarters (4.75 years) which is well within the range of the NBER definition. Furthermore, the **Damping factor** of the cycle is estimated at 0.90 which leads to persistent cycle dynamics.

```
██████████████████████████████ MODEL DESCRIPTION ███████████████████████████████
Database
Model number: TSL001
The database used is: C:/GDP.csv
The selection sample is: 1947-01-01 - 2019-10-01 (N = 1, T = 292 with 0 missings)
Selected components Type Specifications
Trend Time-varying Order: 1
Cycle 1 Time-varying Order: 1
Irregular Time-varying Order: 1
—————————————————————————————— PARAMETER SUMMARY ———————————————————————————————
Variance of disturbances:
Variance type Value q-ratio
Level variance 0.0000e+00 0.0000
Slope variance 1.4592e-06 0.0307
Cycle 1 variance 4.7495e-05 1.0000
Irregular variance 1.8616e-10 3.9195e-06
Cycle properties:
Parameter type Cycle 1
Variance 2.5422e-04
Period 19.0422
Frequency 0.3300
Damping factor 0.9018
Amplitude 0.0012
```

#### Extracted business cycle and confidence interval

#### Extracting the business cycle *with* the COVID period

Next, keep the model the same but change the training sample to 2022-04-01 (302 observations) to **include** the COVID period.
Make sure that the starting value of the **period** of the cycle is set to around 20 quarters (5 years).
Estimate the model.
We can see from the cycle properties that the business cycle period is estimated at 49.23 quarters (> 12 years), a shift from 5 years to more than 12 years due to the inclusion of the COVID period.
From the next figure we see that the COVID period is partially picked up by the cycle and the presence of a large outlier in the residuals.

```
Cycle properties:
Parameter type Cycle 1
Variance 7.6281e-04
Period 49.2315
Frequency 0.1276
Damping factor 0.9222
Amplitude 0.0033
```

#### Extracted business cycle, COVID included

#### Treatment of the COVID period

Next, go to the **Build your own model page** and add (Automatic) **Intervention variables** to the existing model.
Click on **Adjust selection** and on the **Settings** tab, set the **Lowerbound t-stat** to 5.0 so that only strongly significant intervention variables are selected.

Go to the **Estimation** page and make sure that the starting value of the **period** of the cycle is set to around 20 quarters (5 years).
Estimate the model.
We now see from the cycle properties that the business cycle period is estimated at 17.57 quarters (4.4 years) back to well within the range of the NBER definition of one to 12 years.
Furthermore, we see the detection of a strong outlier in the residuals which, unsurprisingly, is found at Q2 of 2020.
It should be noted that a structural break is not detected by TSL meaning that the influence of COVID in the US GDP series can be treated with an outlier intervention only and the underlying level process in not affected by COVID.

From the next figure we see that the COVID period is still partially picked up by the cycle (top panel).
The second panel show that the level smoothly continues its path since the intervention takes care of the downtick due to COVID.
Lastly, we see that the strong outlier that was present in the residuals, completely dissapeared.

```
Cycle properties:
Parameter type Cycle 1
Variance 2.3497e-04
Period 17.5696
Frequency 0.3576
Damping factor 0.8956
Amplitude 0.0074
Intervention coefficients:
Beta Value Std.Err t-stat Prob
β_outlier_2020-04-01 -0.0814 0.0054 -15.18 0
```

#### Extracted business cycle, COVID included and treated

#### Further exploration

- Verify that manually adding an outlier intervention at both Q2 and Q3 of 2022, does not lead to a significant outlier intervention at the 5% confidence level for Q3.

# Bibliography

### References

Durbin, J. and Koopman, S. J. (2012). Time series analysis by state space methods. *Oxford university press*.

Harvey, A. (1989). Forecasting, Structural Time Series Models and the Kalman Filter. *Cambridge: Cambridge University Press*. doi:10.1017/CBO9781107049994