Economics Network CHEER Virtual Edition

Volume 9, Issue 3, 1995

Stamp 5.0

Structural Time Series Analyser, Modeller and Predictor by Siem Jan Koopman, Andrew C. Harvey, Jurgen A. Doornik and Neil Shephard

Guy Judge
University of Portsmouth

Stamp 5.0 is the latest version of Andrew Harvey's program for estimating structural time series models. Such models consist of time varying unobservable components for trend, cycle, seasonal and irregular contributions to a series or group of series. Each component is assumed to be stochastic, with its time varying nature governed by an associated hyperparameter. A detailed exposition of these models may be found in Harvey (1989) with more recent developments outlined in Harvey and Shephard (1993). There is also a brief treatment in Harvey (1993).

This new version of the package has been completely redesigned and rewritten with the assistance of Jurgen Doornik so that it operates in exactly the same way as PcGive. It has the same user interface, with a menu structure and graphics facilities which are immediately recognisable to anyone familiar with PcGive. The main innovation in terms of techniques is the ability to move beyond the univariate case and estimate multivariate (semingly unrelated time series equations) models. It is also straightforward to use the package to formulate, estimate and test dynamic regression models containing stochastic seasonal effects as exemplified by Harvey and Scott (1994).

Stamp requires DOS 3.3 or higher (it is not a Windows program but can be run in a DOS Window - see the note at the end of the review for information on future developments), and a hard disk with 3 Mb available. The package consists of two 3.5" diskettes containing the software, together with a 382 page manual. You get two versions of the program: the main one (stamp.exe) which uses a DOS extender to access memory above the 640K boundary on 386 + computers, and a small memory version (stamps.exe) which can run on older equipment. (I tried stamps on a 286 - it was quite satisfactory for univariate modelling but unusably slow for multivariate models - I had time to make and consume a cup of coffee during the time it took to estimate a two variable model).

The manual also has a similar look and feel to the one for PcGive. It is divided into six sections. The first part describes how to install the software (very straightforward) and then provides an introduction to STAMP and the various tutorial data sets which are used in sections II and III. The tutorials in section II are an introduction to the basic features of structural time series models while those in section III relate more to the use of STAMP itself for formulating, estimating and testing such models. Section IV looks in detail at the statistical output from STAMP while sections V and VI contain reference material relating to the STAMP program menus and the utility programs which come with the package (for data management and graph printing).

Click to download the graphic

Figure 1

Figure 1 shows the Select Components dialog box. Here the default settings for a Basic Structural Model are showing. This allows the trend component to have both a stochastic level and slope, together with stochastic seasonal and irregular components. Results obtained with the trigonometric and stochastic seasonal dummies will be equivalent, but the former method of modelling is more convenient for extracting the time variable seasonal coefficients using the Kalman filter after model estimation.

Click to download the graphic

Figure 2

Figure 2 shows the Results Window with part of the output from the fitted model. The estimated standard deviations of the different disturbance terms are shown as part of this output and this enables the user to see if the estimated coefficients are evolving over time or not. If the standard deviation (hyperparameter) of a component is zero then it is deterministic in nature. In this example the seasonals appear to be stochasic, that is their values are evolving over time.

Click to download the Graphic

Figure 3

Figure 3 (which is one of the graphs which can be generated from the Test menu) shows this visually.

Of course a univariate model will not explain the evolving pattern of seasonal electricity expenditure, which may be due to a variety of factors, some economic and some reflecting climatic or technological trends. Using Stamp one can go on to embed the stochastic seasonals within a dynamic regression model to examine the effects of changes in electricity and other energy prices, temperature, consumers' income etc.. The program is constructed in such a way that a data admissible model may first be found which passes a range of misspecification/diagnostic tests. This may require the introduction of additional dummy variables (interventions) to explain outlying observations or structural chnages in the data generation process. These intervention variables are easily introduced with Stamp and the auxiliary residuals part of the Test menu helps in identifying where such terms are needed. Once one has a model with satisfactory error diagnostics, one can return to the Model Formulation or Components menus to impose simplifying restrictions to see if a more parsimonious model can be found. Alternatively one might wish to look at multivariate models to see if a group of series have common patterns in their trend, seasonal or cyclical patterns.

As with PcGive, there is a full range of graphical output to support the statistical results and assist the modeller. I found the package easy to use and it made me want to find out more about the methodology and applications of models of this type. The manual and tutorials provide a good introduction to such models, but further backgound reading is essential if one is to be able to exploit this software properly in practical applications.

Notes: A more extensive review of Stamp 5.0 will appear in the July 1996 issue of the Economic Journal. Stamp is available from International Thompson Business Press, 168-173 High Holborn, London WC1V 7AA. Tel +44 (0)171 497 1422.


  1. Koopman, S J, Harvey A C, Doornik J A and Shephard N (1995) Stamp 5.0 (Structural Time Series Analyser, Modeller and Predictor). International Thompson Publishing, London.
  2. Harvey A C (1989) Forecasting Structural Times Series Models and the Kalman Filter. Cambridge University Press.
  3. Harvey A C (1993) Time Series Models. Second Edition. Harvester-Wheatsheaf. Hemel Hempstead.
  4. Harvey A C and Scott A (1994) Seasonality in Dynamic Regression Models. Economic Journal Vol 104 No 427 (Nov) pp 1324-1345.
  5. Harvey A C and Shephard N (1993) "Structural Time Series Models", in G S Maddala et. al. Handbook of Statistics Volume 11 Elsevier Science Publishers.

Postscript on future developments - GiveWin and Ox

Jurgen Doornik has been working on a new strategy for the PcGive group of programs (which as we have seen includes Stamp). The next releases of these programs will run under Windows with a common interface called GiveWin. The programs PcGive, PcFiml and Stamp will be separate from GiveWin, but linked to it through OLE automation. When you run one of these programs GiveWin will be automatically loaded (unless it is already active).

The data graphics, calculator and algebra will all be part of GiveWin. It will also be possible to open multiple databases. The model formulation and estimation procedures which go with the individual programs will then be contained in separate but linked modules.

This separation will make it easier to develop and update each module, and the interface too could be replaced independently of the modules. There is another intriguing advantage to this approach. Once documented, anybody would be able to write programs communicating with GiveWin (using Visual Basic, Visual C++ or other suitable compilers). Of course, they would need to have the requisite programming skills. But Doornik has more good news for use here. He has developed Ox, which is an object oriented matrix language with a C++ like syntax to help prototype the code. The fact that it is object oriented adds some overhead, but there are many advantages in calling preprogrammed routines. Doornik says that he has used it extensively for the Monte Carlo results in his thesis.

Doornik intends to work on a new version of PcNaive for publication. All the old PcNaive code will be discarded and he will develop a new set of dialogs which will use Ox code to do the simulations. The results will then be sent to GiveWin. This structure will also enable users to extend the code with their own tests etc.. Another project is underway (with Steve Bond and Manuel Arrellano) for panel data analysis, again with a dialog around Ox code reporting results to GiveWin.

More news on these and other GiveWin developments in future issues of CHEER.

See the entry for this item in the software catalogue for further contact details and pointers to on-line information.

Top | CHEER Home

Copyright 1989-2007