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.


Author: Rutger Lit
Date: June 30, 2022
Software: Time Series Lab - Home Edition
Topics: cyclical patterns in data
Batch program: minks.txt

Minks and muskrats

In this case study we illustrate how to model the presence of a cycle using the numbers of furs of minks and muskrats traded annually by the Hudson Bay Company in Canada from 1848 to 1909. The main issue concerns the existence of a cycle in the pattern of traded furs of both minks and muskrats. Parts of this case study are from the STAMP manual.

The MINKMUSK dataset is part of the TSL installer and can be found in the data folder located in the install folder of TSL. It is instructive to carry out a preliminary analysis on the data. Go to the Database section and load the data in TSL and plot it by clicking the Lmink (L for logarithm) header in the database section. Click the autocorrelation function button in the bottom right of the screen. The autocorrelation function shows evidence of a cycle buried within the noise. The spectral density shows the same message. On this graph, the period is given by dividing 2 by the scaled frequency, on the horizontal axis. Thus there appears to be a cycle with a period of around 10 years.

Proceed to Build your own model and select a Fixed Level, a Stochastic Slope and a Cycle component. Before you estimate the model, go to the Graphics and Diagnostics page and switch Add lines to database on.

Estimation page ► Estimation ends at t = 1909 ► Estimate

Once the estimation has been finished we are automatically brought to the Graphics and diagnostics section.

Graphics and diagnosticsClear all ► select the Individual tab ► plot Y data and Level
Add subplot
plot Y data ► select the Composite tab and plot Composite signal
Add subplot
select the Individual tab and plot Cycle
Add subplot
select the Residuals tab, select Smoothing, and plot Residuals

Extracted components from Mink data

Data inspection and preparation page
Plot 1: mink data and level. Plot 2: mink data and composite signal. Plot 3: extracted cycle. Plot 4: residuals.

It can be seen in the Figure above that the estimated trends are relatively smooth. The smoothness arises because the level variances were constrained to be zero and the q-ratio (signal-to-noise ratio) for the slope are small. More precise information about the fitted cycle can be found in the written output on the Text output page.

The written output shows us (among other things) the Cycle properties:

Parameter type Cycle 1  
Variance 0.0642  
Period 9.6477  
Frequency 0.6513  
Damping factor 1.0000  
Amplitude 0.3550  

The parameters are as follows:
  • A variance parameter which is responsible for making the cycle stochastic
  • A period (in years), $\lambda $
  • A frequency (in radians) $2 \pi / \lambda$
  • A damping factor $\rho $
The cycle has a period parameter of 9.65 years. The relative importance of the cycle is indicated by the Amplitude. For data in logarithms, the amplitude of the cycle is a percentage of the trend. This is for Lmink 35.5%.

Now let's turn our attention to the Lmuskrat series. Repeat all steps as described above but now for the Lmuskrat series. We obtain the following cycle properties:

Parameter type Cycle 1  
Variance 0.2110  
Period 10.6821  
Frequency 0.5882  
Damping factor 0.8309  
Amplitude 1.0565  

Let's investigate the cycles of Lmink and Lmuskrat by plotting the cycles in one graph. For this we explore the Add plots to database functionality on the Graphics and diagnostics page. This functionality can be switched on and off with the switch in the top middle of the Graphics and diagnostics page. When switched on, every component that is plotted is stored in the Database on the Database page.

Go to the Database page and click on Cycle: Lmink followed by Ctrl-click Cycle: Lmuskrat. Both cycles are now plotted in one graph and from this you can see that the cycle extracted from the Lmuskrat series leads the cycle of Lmink by a couple of years.

Extracted cycles of Lmink and Lmuskrat

Data inspection and preparation page

Further exploration

  • [Not statistics] Why would the cycle of Lmuskrat lead the cycle of Lmink by some years?



Koopman, S.J., A.C. Harvey, J.A. Doornik, and N. Shephard (2012). STAMP: Structural time series analyser, modeller and predictor. London, Timberlake Consultants Ltd.