
GAUSS Programs for

Nonparametric specification tests for conditional duration models

by Marcelo Fernandes and Joachim Grammig
forthcoming Journal of Econometrics (2005)

the programs produce the results of
forthcoming version that can be downloaded until
publication data
http://www.uni-tuebingen.de/uni/wwo/Grammig/Hazard.pdf

Contact:
Marcelo Fernandes, Graduate School of Economics, Getulio Vargas Foundation,
Praia de Botafogo 190, 22253-900 Rio de Janeiro, RJ, Brazil.
Telephone: +55 21 2559 5827, Fax: +55 21 2553 8821. mfernand@fgv.br
Joachim Grammig, University of T\"{u}bingen,
Mohlstrasse 36, D-72074 T\"{u}bingen, Germany. Telephone: +49 7071
joachim.grammig@uni-tuebingen.de

The programs can be freely used for academic purposes if
this source is acknowledged.


To run the programs copy the contents of the zip file in a
directory. Retain the paths structure


Reproduce the Empirical results in table 2
==========================================

The GAUSS programs

joe_fini.prg

and

joe_fino.prg

produce the results in table 2 of the paper. joe_fini.prg delivers the
in-sample results and joe_fino.prg the out-of-sample results. Besides
the numerical results you also get graphs which compare the parametric
and the nonparametric density estimates.

The two programs  a series of source files which contain code
the estimation of various conditional duration models (more than
those included in the paper). These files are

highfreq.dec;
highfreq.ext;
svdDeflt.ext;
gammafm.src;
svd_h.src;
tacd.dec;
tacd.src;
dtyfcacd.src;
montcarl.prc;

These files have to reside in a directory where GAUSS can #include files.
You can copy them in your current directory and assign the GAUSS starting
directory to it.

The main procedures to compute the various versions of the test (bootstrap
and regular) are included in the procedure file

testacd.src.

The data is in a GAUSS matrix

xonqp18.fmt

The description of the columns is found in the text file
price duration info. Thanks again to Pierre Giot and Luc Bauwens
for their permission to use the data.

Simulation programs
===================

If you want to reproduce the simulations reported in figures 1-4
in the paper, the corresponding programs are found in the subdirectories

s_weib_1
s_gamm_1
s_expo_1
s_burr_p

newsim.prg performs the simulations and joe_fig2.prg produces the graphs
reported in the figures of the paper.  All the above mentioned source files
are also #included by these programs, so they have to be either be copied in the
working directory or, preferably, copied in a path where GAUSS looks for
executables (e.g. in GAUSS/examples) or a user defined path (to be
given in gauss.cfg).


Compatibility and requirements:
===============================

1. You need the GAUSS modules CML (Constrained ML)  and CO
(constrained optimization) on your machines. You can get rid of CO as the
models estimated in the paper only use CML. CO is used for the estimation
of other models. As the programs use some globals of CO, removing the CO
references requires some manual work. Otherwise the programs should run
without problems.

We have tested the programs and they run under GAUSS 3.2.3 and GAUSS 6.0
However, GAUSS 3.2.3. did not have a internal digamma function so the
file dtyfcacd.src has a procedure that computes it. Newer versions of
GAUSS have an internal digamma function and will complain if an
own function is declared. Hence, to run the programs under a newer version
of GAUSS you have to comment out the digamma procedure in dtyfcacd.src
The results reported in the paper are based on the digamma procedure in
dtyfcacd.src.
