My goodness, it's Him...


Contents


Do you like the eye glasses... Cointegration & Common Trends
Cointegration & Common Trends

Now how can I explain the idea of cointegration without getting too technical... (By the way, do you like the eye glasses; I put 'em on to make me look schmarter!)
e
Well, imagine the case when one variable (your yearly income) depends on two factors, your day job and your night job. The first factor (your day job income) increases by, say, 5 percent per year on average, while your night job pays you roughly the same every year.
e
Suppose that you save 10 percent of your yearly income from your day job, and spend all the money you get from your night job (at your local pub). Then both your total yearly income and your yearly savings are trending (or "integrated" given appropriate mathematical assumptions), while your yearly savings minus 10 percent of your yearly income (equal to minus 10 percent of your night job income) is fairly constant from year to year. Accordingly, your yearly income and savings trend for the same reason (they have one common trend), while a particular combination of the two remains quite constant (or is cointegrated.)
e
Remove me!
Hmm... Must be some really hot stuff... Markov Switching VAR's
Markov Switching VAR's

Still wearing them spectacular eye glasses! Whaddaya think? Pretty cool, huh? Should I get a pair like that...
e
When I first tried to visualize a Markov switching VAR model, I had the picture of a volcano in mind. Most of the time it's kind of quiet, occasionally letting off some steam, but with little variability in terms of seismic activity. (In case you're wondering, I know nothing about geology.) Then, every once in awhile, it's behavior changes dramatically (sort of like the 3rd movement of Alan Hovhaness' "Mount St. Helens" symphony - check out the recording on Delos with Seattle Symphony and Gerard Schwarz).
e
Now, suppose you want to predict the behavior (seismic activity) of a fairly active volcano. It's probably true that a linear VAR (or AR) model will do a pretty good job except when you really want it to. Once the volcano goes into a pre-eruptive state, a different (linear) model may be better able to predict its behavior. In other words, the (optimal) weighting of the past and current information is likely to have changed once the volcano is in such a state relative to when it's in a state of "sleep". For instance, past pre-eruptive (and eruptive) times will probably be given higher weights, while the periods of sleep may be completely uninformative.
e
Remove me!

GAUSS & RATS Code

You can download zip files with my code for estimating Common Trends and Markov Switching VAR models below. The common trends code was originally written for RATS version 3.x and it has been updated for RATS version 4.x by my good friend and colleague, Henrik Hansen, at the Department of Economics and Natural Resources, the Royal Veterinary and Agricultural University in Copenhagen. Both versions are available for download. The code for MSVARs, on the other hand, is written for GAUSS version 3.2.x and can be run on both the MS-DOS (16-bit) and Windows 9x/NT (32-bit) versions of GAUSS; it will probably also work for all operating systems that support GAUSS. If you find any bugs, please report them to me so that the code can be corrected.

Downloads

e RATS 4 Code for Estimating A Common Trends Model (latest release: 1/5/2000)
e • Download zip-file: ctmodel.zip (25KB)
eInformation about the Code
The zip-file includes a total of 6 files. The main source code is found in the 3 procedures CT.SRC, CTAIR.SRC, and CTAVD.SRC. The remaining files are an example of a CT model specification file (HW97.PRG), a data file for the example (CTDATA.WK1), and a file describing the available options and their syntax for running a model specification file using the 3 procedures (CTREAD.ME).

The CT model estimation code is found in CT.SRC, while code for estimating asymptotic 95 percent confidence intervals for impulse response functions and standard errors for variance decompositions is given in the CTAIR and the CTAVD files, respectively. Note that these procedures must be run in the correct order: CT, CTAIR, and CTAVD. Moreover, the program is not interactive, so any changes to the model can only be made in the CT model specification file.

A useful source on the theory behind CT modelling is "A Common Trends Model: Identification, Estimation and Inference", available for download from my Working Papers web page.

e GAUSS Code for Estimating Markov Switching VAR Models (latest release: 1/5/2000)
e • Download zip-file: msvar.zip (50KB)
eInformation about the Code
The zip-file includes 4 files in the parent folder/directory (MSVAR), and 11 procedures in the child folder (PROGRAMS). The main MSVAR program file is REGIME.PGM, while the MSVAR model specification is handled by the SETUP.MOD file.

The REGIME program is run from the GAUSS prompt. It calls the model specification file (where the data-file is also specified), prepares the data for ML estimation via the EM-algorithm, and calls the 10 procedures in the PROGRAMS folder for execution of various tasks.

Typically, you should only have to edit the SETUP.MOD file. However, the beta versions of GAUSS for 32-bit Windows seem to require that the absolute path is specified when a program calls external procedures. Hence, you may have to edit the REGIME.PGM file prior to executing the code.

For additional information, please consult the README.TXT and the SETUP.MOD files. The latter file contains information on syntax, how to specify an MSVAR model, and information about various hypothesis tests. There are 9 basic model specifications, allowing you to restrict different aspects of the influence of the underlying Markov process on the VAR-model. In addition, you can include linear restrictions on all parameters except the transition probabilities, while restrictions on the transition probabilities are limited to (i) a serially uncorrelated process, and (ii) the process representing several independent 2-state processes (requires a minimum of 4 regimes).

Readme files are included in all packages and I advice you to read them before you attempt to run the code.

NOTE: You may use the code only if you accept the conditions that (1) Anders Warne (and Henrik Hansen whenever this applies) is not liable for any software or hardware problems you encounter that may be linked to using the code (i.e. you use it at your own risk); and (2) you must give Anders Warne (and Henrik Hansen) credit in your papers where the code has been used to obtain empirical results.


[Home]

[GAUSS & RATS Code | Research Papers]

[NoteTab | TeXlips]

[Curriculum Vitae | Another Story | Feedback]


Last Updated: August 29, 2000

Get NoteTab
Anders
Anders
Warne
Warne