Nouveautés de la version 9

Découvrez ci-dessous, les nouveautés de la version 9 de RATS. Le texte source de l'éditeur a été conservé afin d'éviter toute perte d'information.

Updated Manuals

With each new major version, we need to decide what’s new and needs to be explained, what’s important and needs greater emphasis, and what’s no longer topical and can be moved out of the main documentation. For Version 9, the chapters in the User’s Guide that received the most attention were “ARCH/GARCH and related models”, “Threshold, Breaks and Switching” and “Cross Section and Panel Data”.


This partly reflects the fact that these were the topics of our three most recent e-courses, and the GARCH and panel data instructions saw quite a bit of change as a result. Also GARCH and the regime-switching models can often require a bit of care to get reasonable results (or results at all), which has produced many of our technical questions in recent years. As much as possible, we try to address those issues in the revised documentation.

Interface Improvements

Version 9.0 adds the following:

• The on-line help that we used in prior versions has been completely redone. It now has pretty much the full content of the Reference Manual, with some important extras: there are pages describing over 100 of the most important procedures, most with a full description of the syntax, plus examples, similar to what we’ve had all along with the regular instructions. There are also pages with the main examples. In all, it has the equivalent of about 2000 pages of printed documentation. And this is all linked up with cross-references for ease of use.

• The GARCH wizard has been split into separate wizards for univariate and multivariate models. A new wizard for handling estimation of cointegration models provides easy-to-use access to the @JOHMLE, @FM and @SWDOLS procedures.


File-Properties shows the full file name of an open file (in a form where you can easily copy and paste). This can be handy when you have long paths so the name gets truncated.

Help-News... gets a “news feed” off our web site with links to updated information.

• With version 8.3, we replaced the editor which actually runs most of the program with a new public domain editor called Scintilla. This adds the ability to put markers at locations in your program and includes “regular expressions” for more sophisticated searches. A few oddities in its operation (particularly skipping lines if you hold down the Enter key) have been corrected with version 9.

• Another important change with v8.3 that’s even better with v9 is Find in Files. This allows you to search for a string (or “regular expression”) across the full set of example programs so you can quickly locate example programs that use DLM or do a BEKK GARCH or an SPGRAPH, etc. It gives a huge boost to your productivity.


The most important change to the program itself is that you can now pass functions as parameters and options. This was a big hole in the rats programming language—we haven’t even begun to figure out all the things that will be made easier or (even) possible using this. Just as an example, we have revised the commonly used @MONTEVAR and @MCVARDODRAWS procedures to allow a FUNCTION to be used to provide a non-standard factorization. In the past, you would have to create a custom version of the full procedure do that.


We introduced the HASH and LIST aggregators with version 8.2, but with version 9, we’ve added enough support to these to make them truly useful. These have been added to the documentation and examples of their use is now included.

The diagnostics for attempts to access out-of-range array elements have been improved, pointing you towards the likely source. You also now get better information about mistyped identifiers, as the program will list possible near-matches.

New and Updated Programs

The files below contain example programs and (in most cases) data files replicating results from significant econometrics papers or demonstrating other useful techniques. These are available on our web site, and are included with version 9.0 of RATS.
This is a replication file for Balke(2000), “Credit and Economic Activity: Credit Regimes and Nonlinear Propagation of Shocks,” Review of Economics and Statistics, vol 82, pp 344-349. This includes both a search for the optimal threshold and computes the generalized irf’s as described in the paper, averaging responses across all observed periods in a given regime.
This is a replication file for Grier, Henry, Olekalns & Shields(2004), “The Asymmetric Effects of Uncertainty on Inflation and Output Growth,” Journal of Applied Econometrics, vol 19, no. 5, pp 551-565.This does a VARMA(2,1)-GARCHM mean model with an asymmetric BEKK GARCH on inflation and growth. Because the BEKK asymmetry in this model is sign-dependent, this uses a feature added with RATS 8.2 to allow an adjustment to the sign of the asymmetric effect.
This estimates the two-observable models (real GDP and inflation) from Laubach and Williams(2003), “Measuring the Natural Rate of Interest”, Review of Economics and Statistics, vol. 85, no 4, pp 1063-1070. This is a state-space model with a combination of regression equations and latent variables.
This is from West and Cho(1995), “The Predictive Ability of Several Models of Exchange Rate Volatility,” Journal of Econometrics, vol. 69, no 2, 367-391. It does descriptive analysis of volatility and estimates and does diagnostics on univariate GARCH models. This is covered in some detail in the “ARCH/GARCH and Volatility Models” e-course.

With version 9, we’ve revised many of the standard examples that are discussed in the documentation. And we’ve also added quite a few new ones. The most important of these are:

This demonstrates how to use the @GMAUTOFIT procedure and the automatic outlier detection of the BOXJENK instruction to fit (automatically) fit a complicated seasonal ARIMA model to a series.



Fits a state-space model with a common “local trend” (the trend model underlying the hp filter) to a pair of series.

Demonstrates the process of fitting a state-space model to a set of time series using a common cycle (with varying loadings) plus variable-specific noise.

This fits a “rolling” GARCH model and uses it to “back test” a simple calculation of VaR.

Uses the @FLUX procedure to identity stability problems
in a univariate GARCH model. @FLUX is a very handy but underutilitized procedure for checking for stability issues in models where simple sample split calculations won’t work.

This provides an example of the calculation of decomposition of long-run variance using the techniques from Hasbrouck(1995) “One Security, Many Markets: Determining the Contribution to Price Discovery”, Journal of Finance, vol 50, no 4, pp 1175-1199.

This demonstrates estimation of a “RegARIMA model” which is a regression with an arima error process. This uses quite a few specialized features of the BOXJENK instruction to identify pre-adjustment trading day factors for seasonal adjustment.

This is an example of estimation of a structural VECM with short-and-long run restrictions for structural model. This is more complicated in several ways from a similar model for a regular VAR: first, the calculation of the long-run matrix can’t be done by simply inverting the lag sum matrix, because the lag sum matrix is singular by construction. Second, the existence of the long-run restrictions imposed by the VECM structure changes the set of non-trivial restrictions.

This demonstrates several of the procedures for testing for unit roots allowing for breaks.

This does a fluctuations test for stability on a full VAR. This is an alternative to a test like that in Bai, Lumsdaine and Stock(1998), “Testing For and Dating Common Breaks in Multivariate Time Series”, Review of Economic Studies, vol 65, no 3, 395-432, which looks for common breaks. The fluctuations test provides for a less-structured alternative.

New Textbook Examples

We have three new sets of textbook examples, plus one set of updates for a new edition.

Martin, Hurn and Harris(2013)
Econometric Modelling with Time Series: Specification, Estimation and Testing, Cambridge Univ Press is a relatively advanced text which covers a wide range of subjects, and includes some often quite sophisticated models taken from the literature. At this point, we’ve focused mainly on their examples with real-world data.

While the econometrics sometimes isn’t simple, in most cases, the rats code itself is fairly straightforward, by making use of procedures like @SHORTANDLONG and @ADFAUTOSELECT. The most interesting examples are likely to be:

mhhp342.rpf and mhhp381.rpf, which estimate the ckls model using maximum likelihood and gmm respectively.
mhhp528.rpf, mhhp535.rpf and mhhp537.rpf, which estimate various structural var’s with short-and-long run constraints
mhhp563.rpf and mhhp564.rpf, which estimate dynamic factors models, the first by maximum likelihood, and second by principal components
mhhp744.rpf and mhhp745.rpf, which estimate univariate and bivariate star models respectively.
mhhp798.rpf which estimates dcc and deco garch models.
mhhp799.rpf which estimates an SVAR-GARCH model (that is, a model with an SVAR which is assumed to produce independent univariate garch components). This is covered in considerable detail as part of the ARCH, GARCH and Volatility Course.



Introduction to Econometrics, 4th ed, Oxford University Press, is an introductory book with a general emphasis on cross section data. It’s not clear whether it was intended that the students be able to do these, but we’ve included the programs for doing the Monte Carlo experiments in the book. None of these are particularly difficult and can serve as an introduction to simulation methods in RATS.

Novales, Fernandez & Ruiz(2009)
Economic Growth: Theory and Numerical Solution Methods, 1st ed, Springer-Verlag. The examples all use the dsge instruction for solving small macroeconomic models. About half are comparisons of steady-state solutions with changes to exogenous processes and about half are simulations of the economies with a given structure. The second group typically use DLM with TYPE=SIMULATE to simulate the linearized or log-linearized economy.

Durbin and Koopman(2012)
Time Series Analysis by State Space Methods, 2nd ed, Oxford University Press, is an updated edition of a book for which we have had worked examples for several years. Most of the examples are carried over from the 1st edition.; the new ones are durkp202.rpf (dynamic factor model), durkp284.rpf and durkp288.rpf (particle filters, the only examples which don’t use the DLM instruction).

RATS Version 9.0 Changes to Instructions

You can now write data to XLSX and not just XLS. This applies to any instruction which writes data and to the export operations from REPORT windows.

SPGRAPH can now put keys out the outside of a matrix of graphs.

The GARCH instruction adds the new option VARIANCES=KOUTMOS to compute the univariate variances for CC and DCC models using the EGARCH formulation from Koutmos(1996) “Modeling the Dynamic Interdependence of Major European Stock Markets”, Journal of Business Finance and Accounting, vol 23, 975-988. It also adds the STDRESIDS option for computing standardized residuals (univariate or jointly standardized multivariate).

IMPULSE has a new FLATTEN option for more easily saving into %%RESPONSES in Monte Carlo methods. Its FACTOR option can accept reduced numbers of columns (shocks), which makes it easier to handle situations where you are particularly interested in only a subset of the structural shocks.



HEIGHT and WIDTH have been added to GRPARM to allow standardized sizing of graphs.

GRAPH has a new SERIES option which can take a VECTOR of SERIES or a VECT[INTEGER] with series handles as input. This is particularly handy for doing graphics in Vector Autoregressions, where the number of graphs needed can change from application to application.

DATA adds the option ORG=MULTILINE, which allows you to pull data out of a spreadsheet file when a particular series occupies a block of rows.