Worksheet – Case #10 – Calculating moving average & adding recession bands

Finding Data

In this example, we are using three time series on Germany: Retail Trade, Consumer expectations and a recession indicator.

Therefore, we will use the “Country & Region” view.

 

To find the Retail Trade series, go to:

Country & Region > Germany > Trade > Domestic Trade > Retail Trade > Turnover > Totals

Locate and select the following series, which has an exclamation mark:

  • Total, Excluding Vehicle Trade, Calendar Adjusted (X-12 ARIMA), Constant Prices, SA (X-12 ARIMA), Index

Add the series to a new document.

 

To find the Consumer expectations series, go to:

Country & Region > Germany > Surveys > Consumer Surveys > GfK > Consumer Climate

Locate and select:

  • Economic Expectations

Add it to the document you just created.

To find the recession indicator, go to:

Country & Region > Germany > Leading Indicators > Macrobond

Locate and select:

  • Germany, Macrobond, Business Cycle Reference Dates

Add it to the document.

Analysis

Rate of change

  • Select “Time chart” in the tree
  • Click the “Insert” button
  • Select Rate of Change

In the analysis tree, go to Rate of Change, and apply these settings for the Retail Trade series only

  • “Method” is set to Change over period %
  • “Length” is set to Year and specified to be 1 year

Smoothing

By looking at the Time chart, you can notice that the Retail Trade is difficult to read as it fluctuates a lot. You can smooth it by calculating a 1 year moving average.

  • Select “Time chart” in the tree
  • Click the “Insert” button
  • Select Smoothing

In the analysis tree, go to Smoothing, and apply these settings for the Retail Trade & the Consumer Expectations series (for harmonization purposes):

  • Click on the “Add” button for the first series
  • Select “Moving average”
  • Set the length to “1 year”
  • Apply the same settings for the Consumer Expectations series.

Charting

Alternate Scale

The Consumer Expectation series has been displayed on an alternate scale.

Graph Layout

The recession indicator has either the value 1 or value 0, with value 1 indicating a recession. Instead of displaying it as a line, you should represent it as a Fill, so that it highlights the recession period in the chart.

  • Go to Graph Layout
  • Select the recession indicator under the tab “Graph” (RHS)
  • Click on “Fill”

Make sure the order is set so that the “Fill” graph is listed above the “Line” graph.

Adding transparency to the "fill" series

You should add transparency to the recession indicator. To do so:

  • Click on the series to activate its properties in the Presentation Tab
  • Go to the tab "Appearance", and choose "Custom" as graph style
  • Click on the "…" button close to the color section
  • In the new window, set opacity to 30%

Other changes

The following changes have also been applied to the document:

  • Title
  • Subtitle
  • Horizontal line to 0