NBB time series toolkit: towards a seasonal adjustment framework

Introduction

For more than 10 years, the R&D unit of the department of Statistics of the National Bank of Belgium (NBB) has developed a library in the time series domain. The paper provides in a first part a short description of that work. A similar approach has been proposed to the Eurostat/ECB Seasonal Adjustment Steering Group (SASG), for the replacement of the current software (DEMETRA) by a more modular solution. The second part of the paper develops first ideas on the way a common framework on seasonal adjustment could be built, reusing some parts of the NBB’s library and with the collaboration of other institutions.

NBB Time series toolkit

Goals

Providing a reusable set of solutions in the time series domain

The goal of the package is not to implement a general-purpose set of functionalities but to provide efficient solutions to specific time series problems encountered in the production and in the analysis of official time series statistics.

Providing a common solution for a variety of contexts

Using a reusable solution should decrease drastically the implementation costs. It should also improve the coherence of the production process (identical results, common users' practices...).The technical solution should be aimed at batch processing as well as at advanced graphical tools; it should not be linked to too specific characteristics like databases...

Functionalities

Apart from base functionalities on time series, the library provides solutions for the following problems:

  • Seasonal adjustment
  • Forecasting
  • Outliers detection
  • Benchmarking, temporal disaggregation
  • Retropolation
  • Cycle detection
  • ...

It should be noted that most of the considered problems have to deal with time series modelling

Technical choices

Technology

The library is composed of object-oriented components implemented in standard technologies.

It was initially developed for the Windows platforms, using the COM (ATL/C++) technology. The current library is now based on the .NET framework (C#). A quasi-complete Java implementation, based on the same objects-model, is also available.

Apart from the .NET or Java frameworks, the NBB modules don’t depend on any other library.

Design

The design of the library follows some important rules

  • Strict splitting of the different layers.
  • Core conceptual model
  • Algorithmic layer
  • Formatting
  • Graphical interfaces
  • Database connectivity modules are not considered as part of the library.
  • Fine granularity: access to low-level entities (Complex numbers, Polynomials ...) as well as to high-level modules (TramoSeats, ChowLin ...).
  • Huge use of OO features: polymorphism (through abstract interfaces), to encourage and to make extensions easier.
  • Fast processing (through the use of specialized algorithmic solutions).

The diagrams in the appendix (1-2) give a simplified overview of the different layers of the library and of the way it can be connected to data sources.

From the first diagram, it should clearly appear that the TS toolkit is not a ready-made solution: it provides the building blocks that can be reused in the development of applications that fit the specific needs of each situation (some final applications are available, however).

As shown on the second diagram, the TS library is completely decoupled from the data providers (databases, files …). Specific modules need to be added to translate the information coming from each database to time series concepts. They can be ranged from very light libraries accessing DBs through ODBC to complex packages providing remote servers and browsers interfaces..

Seasonal adjustment framework

SASG

The Seasonal Adjustment Steering Group (joint Eurostat and ECB group) is aimed at formulating seasonal adjustment guidelines and recommendations for the ESS.

It is also in charge of defining a strategy concerning the IT tools for seasonal adjustment. This group includes seasonal adjustment experts from the NSIs of France, UK, Slovenia and Italy and from the NCBs of Germany, Belgium, Spain and Latvia.

The most advanced methods for seasonal adjustment have been developed by A. Maravall (Bank of Spain, BDE) and by The US Census Bureau (USCB). They are implemented in the two basic seasonal adjustment engines “Tramo-Seats” (TSW for its Windows interface) and “X12 / X13”. Beside those applications, statisticians can use Demetra, which provides a common interface to both algorithms. Demetra has been developed and is maintained by Eurostat.

Faced with the new recommendations of the SASG, with the improvement of the SA methods and with the emergence of better technological solutions, the IT sub-group of the SASG has recently been created. This IT subgroup has proposed a complete reengineering of the current Demetra software. A modular approach – similar to the NBB’s solution – based on the current core engines developed in FORTAN has been proposed. That framework is shortly described below.

Framework

Main goals

  • Integration of the two leading algorithms (Tramo-Seats and X13)
  • Common view of both algorithms
  • Flexible solution, which can satisfy a large range of users' needs, from batch processing to detailed analysis.
  • Implementation of the SASG methodological recommendations (ESS Seasonal Adjustment Guidelines).

Constraints

  • Minimal impact on the existing code
  • Windows solution first (a portable solution will be considered later)

The proposed solution, which implies the collaboration of several institutions (initially NBB, BDE and USCB, with the organizational support of Eurostat) is summarized below (see appendix 3-4).

Proposed solution (still under discussion - NBB's point of view)

  • light API around the FORTRAN modules (using COM)
  • Already available for Tramo-Seats (BDE)
  • Joint work of USCB and NBB for X13.
  • Common encapsulation of the two COM modules in a coherent object-model
  • Goals:
  • Easier use of the algorithms
  • Single model for the next layers (see below)
  • NBB development, based on the current TS library.
  • Common services around the two algorithms in the form of independent modules able to interface with the two basic engines.
  • Goals:
  • Common implementation of the SASG recommendations (no impact on the core engines)
  • Increased comparability of SA methods
  • Contents (non exhaustive)
  • Utilities: national calendars, DB interfaces ...
  • Analysis tools (revision history, quality measures ...)
  • Auxiliary algorithmic modules (benchmarking, direct/indirect adjustment ...)
  • Presentation tools
  • Reporting (XML, SDMX ...)
  • Developments (should be clarified)
  • Reuse of the current NBB's library (partim).
  • Call to other institutions
  • Call to external (commercial) enterprises
  • New final application(s)
  • Built on top of the previous layers: no direct access to the FORTRAN code.
  • Should enforce the ESS seasonal adjustment Guidelines.
  • Outsourcing of some developments under Eurostat responsibility
  • Other remarks:
  • The framework should be flexible enough to integrate new SA methods
  • The solution is completely open and allows other uses; for instance, advanced developers should be able to access directly the COM interfaces and to build their own modules.

Challenges, organization

Beside the technical aspects, the success of such a solution depends on several critical factors, which should be further analyzed.

  • Versioning policy
  • Tests strategy
  • Documentation, education
  • Emergence of a users' community
  • Open source policy; opinions differ on the subject; however, it seems desirable, at least for less sensitive modules (NBB's library).

The organizational aspects of the project will be ensured by Eurostat.

  • Logistics
  • SLA with the participating institutions
  • Call for tenders

The contents of the framework will be defined by the SASG.

Concluding remarks

As it has been shown by the experience of the R&D unit of the NBB, an IT solution based on reusable OO components is also a valuable approach in the statistical domain. The building of a common seasonal adjustment framework, based on the collaboration of several entities, is a challenging attempt in that way.

Annex 1

TS Library

Annex 2

Connection to data providers

Annex 3.

Seasonal adjustment framework: integration of the FORTRAN engines.

Annex 4.

Seasonal adjustment framework