ForeTESS, System for Automatic Seasonal Adjustment and Forecasting of Time Series Albert PRAT1, Víctor GÓMEZ2, Ignasi SOLÉ1 and Josep M. CATOT1 1
Department of Statistics and Operational Research UPC Av. Diagonal 647 08028 Barcelona e-mail:
[email protected] 2 Ministerio de Economía y Hacienda Paseo de la Castellana 162 28046 Madrid
Abstract: ForeTESS is a system for automatic seasonal adjustment and forecasting of time series. Is the result of UPC’s research and development efforts employed in the DOSIS / EPROS project TESS(*1). ForeTESS is a sophisticated software tool for forecasting based on time-series data, and its underlying statistical foundation represents the state of the art in linear time-series analysis. In addition to its range of standard methods of analyses of various trend and seasonality aspects, ForeTESS benefits in particular from three unique features: 1.
The package automatically determines whether it is more suitable to forecast based on component time series and then aggregate the results, or to aggregate the components and forecast based upon the aggregate. The same holds for the seasonal adjustment of a time series that is an aggregated of several components.
2.
The ability of ForeTESS to decompose trends more deeply than in competing packages allows users to analyse (a small number of) time-series particularly thoroughly.
3.
The package automatically fits a transfer-function model linking an output and several inputs time series.
(*1) ESPRIT IV project (Number 29.741) that started on January 1999 and finished on June 2000 (more information can be found in http://esl.jrc.it/tess). Keywords: Time Series, Knowledge Based Systems, ARIMA models, TRACE, TRAMO, SEATS, Seasonal Adjustment.
387
Albert Prat, Víctor Gomez, Ignasi Sole and Josep M. Catot
1.
Introduction
ForeTESS is a system for automatic seasonal adjustment and forecasting of time series. Is the result of UPC’s research and development efforts employed in the DOSIS / EPROS project TESS. ForeTESS is a sophisticated software tool for forecasting based on time-series data, and its underlying statistical foundation represents the state of the art in linear time-series analysis. The graphical user interface is well-developed, albeit that the sophistication of the product leads to some inevitable complexity; however, it is anticipated that with good documentation and other learning tools users are likely to find ForeTESS fairly userfriendly and intuitive. An inherent part of ForeTESS is the graphics subset which is purpose-built to handle time-series data in an easy-to-understand format. All in the entire product offers a familiar and feature-rich user interface. In addition to its range of standard methods of analyses of various trend and seasonality aspects, ForeTESS benefits in particular from three unique features: ·
The package automatically determines whether it is more suitable to forecast based on component time series and then aggregate the results, or to aggregate the components and forecast based upon the aggregate. The same holds for the seasonal adjustment of a time series that is an aggregated of several components.
·
The ability of ForeTESS to decompose trends more deeply than in competing packages allows users to analyse (a small number of) time-series particularly thoroughly.
·
The package automatically fits a transfer-function model linking an output and several inputs time series.
ForeTESS is a software package designed to work under WINDOWS95/98 operating system for univariate time series analysis. There are 4 main programs that can be invoked for that purpose within ForeTESS. These are: TRAMO (Time series Regression with Arima noise, Missing observations and Outliers), SEATS (Signal Extraction in Arima Time Series), TRACE (1999) (TRend And Cycle Estimation) and SSAG (1999) (State Space form for AGgregation) (1999). It performs a fairly complete statistical treatment of time series, be that in routine largescale applications or, for example, in careful analysis for short-term economic policy, control and monitoring. Although other frequencies are possible, our attention centres mainly on monthly and quarterly series. The statistical treatment we have in mind includes short-term forecasting, interpolation of missing values, seasonal adjustment, deciding whether to forecast or seasonally adjust the aggregate or its component series, estimation of short-term and long-term trends, estimation of the business cycle, estimation of special effects and removal of outliers, perhaps for a large number of series. ForeTESS uses a methodology that solves all the previous problems with an internally consistent model-based approach. The TRAMO, SEATS and TRACE programs available
388
ForeTESS, System for Automatic Seasonal Adjustment and forecasting of Time Series
in ForeTESS can be applied in an entirely automatic way. The use of signal extraction techniques in ARIMA models (even regression variables, missing observations, and outliers) facilitates statistical inference. In this way it is possible to provide precise answers to many questions of applied interest in short-term data analysis. Many of the series generated by TRAMO, SEATS and TRACE together with different models and diagnostics obtained can be stored in the system for further analysis.
2.
Functionalities
To perform the above complete statistical treatment of time series, ForeTESS provides the following type of functionalities: 2.1
Visualisations aspects
The graphic interface and the graphic system that ForeTESS incorporates have been specially designed to make the use of ForeTESS very user-friendly. The user interface allows the user to interact with the system to perform all the functionalities that FORETESS offers, in a homogenous way. ForeTESS provides plots of many of the series generated by TRAMO, SEATS and TRACE. The graphical possibilities allow the user to visually understand the main characteristics of the results of the different functions of the system. 2.2
Data Base System
The data are organised in domains. A domain is composed of time series with the same seasonality or some other common characteristics. It is possible to create several levels within each domain (industry, sector, etc.), in a very flexible way. ForeTESS allows to aggregate series, assign weights to the components, duplicate series, edit series, import/export data, including multiple time series, automatic update of the database when new data become available, and also store and retrieve models, parameters, trends, and cycles, etc. The time series manager window works in a way very similar to the explorer window in Microsoft Windowsã. The window is splitted into two parts: the left side allows to open the tree structure and go deeper inside a time series to show properties of the model, forecasts, etc. The right side shows the time series when a domain is selected, its beginning year and the seasonality. All these operations can be performed with individual or aggregated time series. 2.3
Configuration of the pre-existing software
ForeTESS allows a flexible configuration of the main parameters of TRAMO, SEATS and TRACE for modelling and forecasting, seasonal adjustment and trend and cycle estimation.
389
Albert Prat, Víctor Gomez, Ignasi Sole and Josep M. Catot
The systems include several default configurations created by the authors. Furthermore, a user can create his/her personal configurations for each time series and can save these configurations for future use. 2.4
Time series modelling and forecasting
For modelling and forecasting, ForeTESS uses a DLL to access the program TRAMO (Time Series Regression with ARIMA Noise, Missing Observations and Outliers). TRAMO is a program for estimation and forecasting of regression models with possibly nonstationary (ARIMA) errors and any sequence of missing values. The program interpolates these values, identifies and corrects for several types of outliers, and estimates special effects such as Trading Day and Easter and, in general, intervention variable type of effects. Fully automatic model identification and outlier correction procedures are available. Intervention analysis is performed in a very user-friendly way. 2.4.1
Forecasting a large number of series and monitoring the forecast error.
ForeTESS allows for batch forecasting of a group of series. The system has been prepared to run automatically. The system can import automatically many time series, each with its previously selected configuration or with the default configuration, obtain forecasts and export the results to a file in only one step. In this case, FORETESS works like a black box, where we introduce time series and obtain forecasts. Another feature related with forecasting is the automatic control of the forecast errors. Two control charts are used in order to monitor the forecast errors given by a model, and provide alarm signals that point out possible model’s changes. These charts are the EWMA (see Page (1954 and 1961) and Barnard (1959)), and CUSUM (see Roberts (1959) and Hunter (1986)). 2.5
Treatment of special time series in the automatic modelling.
When automatically forecasting a great number of time series, a test is performed in order to identify time series with intermittent demand (i.e. many zeroes followed by a period of demand). An improved version of the method developed by Croston (1972) is used to forecast this type of series. ForeTESS also offers the possibility to model very short time series (more than 6 values), this is made possible, in automatic way, by an extension of TRAMO. The method used to forecast short series is a sort of exponential smoothing, in which airline models with different seasonalities are specified and estimated.
390
ForeTESS, System for Automatic Seasonal Adjustment and forecasting of Time Series
2.6
Seasonal adjustment.
SEATS is a program for estimation of unobserved components in time series following the so--called ARIMA--model--based method. Trend, seasonal, irregular, and transitory components are estimated and forecasted with signal extraction techniques applied to ARIMA models. The standard errors of the estimates and forecasts are obtained and the model--based structure is exploited to answer questions of interest in short--term analysis of the data. When used for seasonal adjustment, TRAMO preadjusts the series to be adjusted by SEATS. ForeTESS can integrated the use of TRAMO/SEATS for one or more time series using different configurations of SEATS. It can also create and use different configuration for each time series and save the results of seasonal adjustment together with a variety of plots. 2.7
Trend and cycle estimation.
FORETESS integrates the new software TRACE. This is a program for the estimation of trends and cycles. The filters used by the program are fixed ARMA filters of three types. First, low--pass filters to estimate trends which are the two--sided forms of the well known Butterworth filters of electrical engineering, like the Hodrick--Prescott filter. Second, band—pass filters based on Butterworth filters to estimate cycles. Third, trend-cycle filters which are the finite versions of the Wiener--Kolmogorov filters corresponding to the trend in a canonical decomposition of an airline model. These last filters can also be used for seasonal adjustment assigning appropriate values to the parameters,. The main purpose of TRACE is the estimation of trends, with various degrees of smoothness, and business cycles. To this end, it is strongly recommended that the program be always used as a second step in a two--step procedure. The first step in this procedure should consist of the estimation of the trend--cycle component by means of the application of a model--based method, like the one implemented in the TRAMO and SEATS programs. In this way, undesirable effects, like the generation of spurious cycles, are avoided. The TRACE program is structured so as to be used both for in--depth analysis of a few series or for automatic routine applications to a large number of series. FORETESS interfaces TRACE in a user-friendly way allowing for: · · · · 2.8
Trend a cycle estimation using differents configuration of TRACE. Possibility of creating and using different configuration types for each time series. Possibility of multiple time series selection and trend and cycle estimation. Save low pass (trend) and band pass (cycle). Seasonal adjustment and forecasting of aggregated time series.
Suppose that the series to be seasonally adjusted, Xt, is the sum of component series Xt=X1t+X2t+...+Xkt
391
Albert Prat, Víctor Gomez, Ignasi Sole and Josep M. Catot
Then, in addition to the series obtained by direct adjustment of the Xt, a second seasonally adjusted version of the series can be obtained by summing the adjusted component series. This second approach is called indirect adjustment. A solution to the problem of aggregation of time series for seasonal adjustment is to choose between direct and indirect adjustment using a criterion based on the minimization of data revisions. The revision statistics used in ForeTESS are the average absolute percent revision (AAPR) and the absolute average revision (AAR). These statistics are calculated for both the aggregate series and its components. The criterion chooses the minimum AAPR or AAR value. The formulas are:
AAPR = 100
-A A t |t 1 T +M t|N å M t =T +1 A t |t
AAR =
1 T +M A -A å t |t M t =T +1 t | N
where At|N is the final adjustment and At|t the concurrent adjustment A new routine has been added to the FORETESS system. This routine (SSAG) computes both the average absolute percent revision (AAPR) statistic and the root mean square error of the one-step-ahead forecasts (RMSE1) . The two tests are based on the minimisation of revisions (AAPR) or (AAR) and the agreement of forecast (RMSE1). The last test is used in FORETESS to select whether it is better to use the aggregate (direct) or its components (indirect) to forecast. The formula is: RMSE1 =
1 N -T
N
å (Y
t
t =T +1
- Yt / t -1 )
2
where Yt is the real data and Yt/t-1 denote the forecast of Yt based on the data up to t-1. 2.9
Transfer function modelling
With this new feature, ForeTESS allows for the study dynamic relationships between time series. Transfer function models relate a response time series, Yt, to other input time series X1t, X2t, X3t, etc.. Transfer function models estimated by ForeTESS are linear distributed lag models, and explain the response variable as a linear combination of several lagged input variables. The model with only one input time series is: Yt = n ( B ) X t -b +
q ( B) at j ( B)
The individual n weights in n(B), (n0,n1, n2,…), are called the impulse response weights. The entire set of n weights is called the impulse response function. n(B) tells us how Yt 392
ForeTESS, System for Automatic Seasonal Adjustment and forecasting of Time Series
reacts through time to a given change in each Xt. The individual n weights state how Yt reacts to a change in Xt at specific time lags. (q(B)/j(B))at is a SARIMA model for disturbance. b is the delay or dead time before the response to a given input change begins to take effect. ForeTESS estimates a certain number of n weights of the lagged input variables, eliminates the non significant ones, and identifies and estimates a univariate model for the disturbance. The models obtained can be used for forecasting, and for understanding the dynamic relationships between the input and output series. Transfer function models can also be used in signal extraction studies.
3.
Technical details and licences
The software is designed to run exclusively under MS-Windows (32-bit) and can therefore be used on the majority of modern PCs, although more elaborate analyses and/or extensive data-sets will require a relatively fast Pentium-class computer. For NSI’s, a free licence for the use of the system can be obtained from UPC (at the same address as given at the head of this paper). In order to get the free licence, the interested NSI has to nominate a person in the organisation that will be the interface between the NSI and UPC. The details can also be obtained from the web page http://alexandria.upc.es/seccio_tqg/research/remei/products/tess.html.
Licences for organisations will be available in the near future throughout VSN International Ltd (Web page http://www.vsn-intl.com/).
4.
Conclusion
There is a clear need for forecasting and seasonal adjustment methods for a broad spectrum of European organisations. From industrial and commercial companies to national statistical institutes, all have the real need of using these methods. It is also clear that the usage of these methods is a potential improving competiveness for industrial and commercial companies. ForeTESS was designed to perform modelling (univariate and transfer function), forecasting, seasonal adjustment and trend - cycle estimation from time series. It is endowed with the most recent available methodologies and deals with the problem in a user-friendly way. It suits both advanced and non-expert users. The non-expert will find software that produces forecasts of time series automatically taking into account all the possible errors that might affect the series. The expert will find an adaptable system that allows modifying its configuration in the most suitable way. 393
Albert Prat, Víctor Gomez, Ignasi Sole and Josep M. Catot
Professional statisticians will find a system that allows them to work with constantly updating series in an automatic way. Last, but not least, users of TRAMO, SEATS and TRACE will find that all the procedures are available within the software while the Graphical User Interface is much easier to handle. Acknowledgements ForeTESS has been partially funded by ESPRIT IV and the CICYT, grant TIC99-1280CE. References [1] [2] [3] [4] [5] [6] [7] [8] [9]
Barnard, G.A. (1959). Control charts and stochastic processes. Journal of the Royal Statistical Society, Series B, 21, 239-271. Box, G.E., Jenkins, G.M., Reinsel, G.C. (1994). Time series analysis, forecasting and control. Third Edition. Holden-Day, San Francisco. Croston, J.D. (1972). Forecasting and stocks control for intermittent demands. Operational Research Quarterly, Vol. 23 N. 3, pp. 289-303. Gomez, V. and Maravall, A. (1992). Time Series Regression with ARIMA Noise and Missing Observations – Program TRAM. Eui Working Paper Eco N. 92/81, Department of Economics, European University Institute. Hunter, J.S. (1986). The exponentially weighted moving average. Journal of Quality Technology, 18, 203-210. Maravall, A. and Gomez, V. (1992). Signal Extraction in ARIMA Time Series – Program SEATS. Eui Working Paper Eco N. 92/65, Department of Economics, European University Institute. Page, E.S. (1954). Continuous inspection schemes. Biometrika, 41, 100-114. Page, E.S. (1961). Cumulative sum charts. Technometrics, 3, 1-9. Prat, A., Sole, I., Catot, J. and Lores, J. (1998). FORCE4/R, A new software product for forecasting and seasonal adjustment. NTTS’98, New Techniques and Technologies for Statistics, Sorrento, 1998. Contrib. paper, pp. 429-43
References to programmes [10] [11] [12]
FORCE4/R (1997). Software. It is a forecasting, modelling and signal extraction software that was developed by UPC as part of FORCE4, an ESPRIT IV project number 20.704. TRACE (1999). Software (DLL). Trend and Cycle Estimation, done by Victor Gomez and integrated into TESS by UPC. SSAG (1999). Software (DLL). State Space form for Aggregation, done by Victor Gomez and integrated into TESS by UPC.
394