当前位置: 首页 > >

EMM a program for efficient method of moments estimation, Version 1.4, User's guide, Discus

发布时间:

EMM: A Program for E cient Method of Moments Estimation Version 1.5 User's Guide 1

A. Ronald Gallant Department of Economics University of North Carolina Chapel Hill NC 27599-3305 USA

George Tauchen Department of Economics Duke University Durham NC 27708-0097 USA

First draft: August 1993 Last revision: May 2000

1 Research supported by National Science

Foundation.

c 1994, 1995, 1996, 1997, 1998, 1999, 2000, by A. Ronald Gallant and George Tauchen. Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. This software is provided "as is" without any expressed or implied warranty. The program uses NPSOL, the nonlinear optimizer that accompanies the SNP package.

i

ABSTRACT
This Guide shows how to use the computer package EMM, which implements the estimator described in \Which Moments to Match," (Gallant and Tauchen, 1996a). The term EMM refers to E cient Method of Moments. The Guide provides an overview of the estimator, instructions on how to acquire the software, and a description of the package. It also walks the reader through two worked examples, one of which is estimation of a simple stochastic volatility model and the other is estimation of a stochastic di erential equation for the short term interest rate.

Contents
1.1 1.2 1.3 1.4 1.5 1.6

1 Introduction

Overview . . . . . . . . . The Estimator . . . . . . GARCH-SNP . . . . . . Availability-UNIX . . . . Availability-PC . . . . . Running EMM on a PC

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

1
1 2 3 3 4 5

2 The Elementary Stochastic Volatility Model 3 Fitting the Score Generator 4 Implementing the EMM Estimator: Description and Worked Example
4.1 User-Supplied Subroutines and Files 4.1.1 Setting lrho . . . . . . . . . . 4.2 Running the Program . . . . . . . . . 4.3 Interpreting the Output . . . . . . . 4.4 Fitting to More Realistic Scores . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . .

8 14 14 17 19

5 7 8

ii

5 Estimating a Stochastic Di erential Equation (SDE)
5.1 5.2 5.3 5.4 5.5 Speci cation of the SDE . . . . . . . . . Data and Score Generator . . . . . . . . Modi cations for Estimation of the SDE Estimation of the SDE . . . . . . . . . . Changing the Length of the Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . .

. . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

24
24 25 26 29 36

6 Troubleshooting, Numerical Stability, and Convergence Problems
6.1 6.2 6.3 6.4 6.5 6.6 Examine detail.dat . . . . . . . . . . . . . . . . . . . . . Problems with Standard Errors and Con dence Intervals Dynamic Stability of the Score Generator . . . . . . . . . Setting 0 . . . . . . . . . . . . . . . . . . . . . . . . . . Bullet Proo ng the DGP . . . . . . . . . . . . . . . . . . SNP Version Consistency . . . . . . . . . . . . . . . . . .

40
40 40 41 43 44 45

7 References

46

iii

1 Introduction
1.1 Overview
Gallant and Tauchen (1996a) develop a systematic approach to generating moment conditions for the generalized method of moments (GMM) estimator (Hansen, 1982) of the parameters of a structural model. The approach is an alternative to the common practice of selecting a few low order moments on an ad hoc basis and then proceeding with GMM. The idea is simple: Use the expectation under the structural model of the score from an auxiliary model as the vector of moment conditions. This score is the derivative of the log density of the auxiliary model with respect to the parameters of the auxiliary model. Thus, the moment conditions depend upon both the parameters of the auxiliary model and the parameters of the structural model. The parameters of the auxiliary model are replaced by their quasi-maximum likelihood estimates, which are computed by maximizing the pseudolikelihood of the auxiliary model. The auxiliary model is called the score generator. The score generator need not encompass (nest) the structural model. If it does, then the estimator is as e cient as the maximum likelihood estimator. Hence the approach ensures e ciency against a given parametric model. If the score generator closely approximates the actual distribution of the data, even though it does not encompass it, then the estimator is nearly fully e cient (Gallant and Tauchen, 1996a, Tauchen 1997, Gallant and Long, 1997), which motivates the term E cient Method of Moments (EMM). The estimation context is one where the structural model de nes a data generation process. The key feature of this data generation process is that it is relatively easy to compute the expectation of a nonlinear function given values for the structural parameters. An expectation may be computed by simulation, by numerical quadrature, or by analytic expressions, whichever is the most convenient. In the case of simulation, the structural model provides a means to generate simulated realization for given values of the structural parameters: ! fy ( ); x ?1( )gN=1 ^ ^ where is the vector structural parameters to be estimated, y are endogenous variables, ^ 1

and x are lagged endogenous variables. Lagged endogenous variables are generated through ^ the internal structural model, hence the dependence on . Examples of this estimation context are the panel data models motivating the simulated method of moments approach of Pakes and Pollard (1989) and McFadden (1989). Another is the asset pricing model that motivates the dynamic method of moments estimator of Du e and Singleton (1993). In these examples, the likelihood is di cult to compute, so maximum likelihood is infeasible. Simulation and moment matching thus naturally arise. The EMM estimator has some computational advantages relative to Indirect Inference (Smith, 1993; Gourieroux, Monfort, and Renault, 1993). EMM does not require computation of the binding function at each given simulated data set given and it does not require estimation of the Hessian matrix of the auxiliary model. Tauchen (1997) provides a general overview of EMM and references to current applications, while Tauchen (1998) analyzes the behavior of the EMM objective function.

1.2 The Estimator
This guide shows how to use a Fortran package that implements the estimator for the case in which the structural model de nes a strictly stationary process Markovian process and there are no covariates. The structural model is that of CASE 2 of Gallant and Tauchen (1996a). The setup subsumes a wide variety of situations in macroeconomics and nance. The SNP model is the score generator. A reader should be able to modify the code to accommodate other score generators and to accommodate covariates, as in CASE 1 or CASE 3 of Gallant and Tauchen (1996a). Let fyt; xt?1gn=1 denote the observed data set, where xt?1 = (~t0?L; : : : ; yt0?1)0; L 1: The ~ ~ t ~ y ~ rst step is quasi-maximum likelihood estimation of the score generator n ~n = argmax 1 X ln ft(~tjxt?1; ) y ~ n t=1 2 For the second step, the moment criterion is N 1X mn( ; ~n) = N (@=@ ) ln f y ( )jx ?1( ); ~n]; ^ ^ =1 and the GMM estimator of the structural parameter vector is ~ ^n = argmin m0n( ; ~n)(In )?1mn( ; ~n);
2R

2

can be used. This estimator only entails an outer-product-of-the-gradient computation and no weighted covariance matrix estimation. Conditions under which this estimator is valid are given in Gallant and Tauchen (1996a). To the extent the score generator provides a less good approximation a weighted covariance matrix estimator, i.e, a \HAC" estimator as ~ reviewed in Andrews (1991), should be used for In.

~ where (In)?1 is the weighting matrix. ~ The computations necessary to form In depend upon how well one thinks that the score generator approximates the true data generating process. If one is con dent that the score generator is a good statistical approximation to the data generating process, then the estimator n h ih i ~n = 1 X (@=@ ) ln ft(~tjxt?1; ~n) (@=@ ) ln ft(~tjxt?1; ~n) 0: I n y ~ y ~
t=1

1.3 GARCH-SNP
The most recent version of SNP is 8.7, which permits a GARCH speci cation for the conditional variance of the leading term of score generator. (See the SNP Manual for more details.) The worked examples in this EMM guide only use the ARCH feature, not the GARCH feature. However, in our on-going research, EMM works just ne with a GARCHSNP score generator. We use this feature in a project that entails estimation of stochastic volatility jump di usion models (Chernov, Gallant, Ghysels, and Tauchen, 1999). The SNP manual shows how to estimate SNP-GARCH models. Given an estimated SNP-GARCH model, one uses the score generator le from that estimation in just the same manner as is done for the applications presented in this manual.

1.4 Availability-UNIX
Fortran code and this Guide as a PostScript le are available via anonymous ftp at ftp.econ.duke.edu in directory ~ftp/pub/get/emm. (~ftp is the \home" directory for ftp; it is where one starts out when rst coming in under anonymous ftp.) The code is provided at no charge for research purposes without warranty of any kind, expressed or implied. It is known to run on SUN workstations and HP workstations. 3

Since it uses SNP model as the score generator, the code is tied to the SNP package, which is available is a similar manner: Fortran code, and a guide as a PostScript le, are available via anonymous ftp at ~ftp.econ.duke.edu in subdirectory ~ftp/home/arg/snp or from the Carnegie-Mellon University e-mail server by sending the one-line e-mail message \send snp from general" to statlib@lib.stat.cmu.edu. The code is provided at no charge for research purposes without warranty of any kind, expressed or implied. It has run on Sun and Hewlett-Packard workstations.

1.5 Availability-PC
A PC Version of the EMM Fortran code is available via anonymous ftp at ftp.econ.duke.edu in directory ~ftp/pub/get/emm. (~ftp is the \home" directory for ftp; it is where one starts out when rst coming in under anonymous ftp.) The available PC version is now consistent with SNP 8.7, which has both GARCH as well as ARCH. There is a PC version for Microsoft's PowerStation Fortran. Change directory to the appropriate subdirectory (microsft) and take the les in example for the stochastic volatility example of Section 4 or the les in sdedemo for the stochastic di erential equation example of Section 5. The les for either example must be in their own separate subdirectory before setting up. To set things up, follow these instructions: Microsoft's PowerStation Fortran : From an MS-DOS prompt, type install and the source code will be installed in appropriate subdirectories. Execute the .bat le setms.bat, cd to emmrun, and type nmake to start the make utility that builds emm.exe. To execute EMM, just type emm to execute emm.exe and follow instructions as given in this manual. The PC version is provided at no charge for research purposes without warranty of any kind, expressed or implied. The code and make les should be rather easily modi able for other PC-based Fortran compilers. We no longer support WATCOM Fortran compiler and do not plan to in the future unless there is demand for it from users.

4

1.6 Running EMM on a PC
For the most part, we have had good luck running EMM on a Pentium PC. We build and execute emm.exe within an MS-DOS window under Windows 95 or 98. The worked examples described below run basically the same way, except that to execute the program one types emm at the DOS prompt instead of running a shell script under UNIX. Most users might prefer to write their own .bat le (the DOS analogue of a shell script) to initiate their jobs. When comparing output produced by the PC to that printed in this manual, you might notice small discrepancies. The reason is that the architecture of the PC chip is di erent from that of the SUN workstation that produced the output printed here. We generally nd these discrepancies to be fairly small. The MicroSoft PowerStation Fortran seems robust, though the MicroSoft Fortran does not strictly adhere to the IEEE standard. The makefile processing under MicroSoft is similar to that of UNIX, which is convenient for those already familiar with make utility, but it not exactly the same. We think we have the dependencies correct in the make le, but the user should double check. Users need to take care to \bullet proof" their code to extent possible to prevent zero divides, over ows, and other numerical exceptions. We generally nd that PC-based compilers produce code that is less adaptable than UNIX compilers to numerical exceptions. On a PC, the job simply stops leaving no clue as to where the exception occurred. Thus, as indicated, bullet proo ng is highly recommended.

2 The Elementary Stochastic Volatility Model
In subsequent sections, we use the EMM method to estimate a simple form of the stochastic volatility model. The data set consists of 4044 observations on 100 times the log- rst di erence of the daily Standard and Poor's 500 index, 1977{92. Figure 1 displays the series. The distribution les includes the data set sample.dat. Let yt = 100 log(SPt) ? log(SPt?1)] where SPt is the closing value of the index on day t. The elementary univariate stochastic volatility for yt is

yt ?

= c(yt?1 ? ) + ew zt
t

5

S&P Index, 1977-92

-20 0

-15

-10

y -5

0

5

1000

2000 t

3000

4000

Figure 1. Daily percentage change in the S&P Composite Index, 1977{92.
wt ?
w

=

w zwt

where ; c, ; w ; and w are parameters, and fztg and fzwtg are mutually independent iid random processes with means zero and variance unity. A common assumption, which we make here, is that both zt and zwt are Gaussian (0; 1) random variables, though other distributional assumptions are possible. The rst two moments of the z0s are not separately identi ed from the other parameters | hence the restrictions to E (zt ) = E (zwt) = 0; and Var(zt) = Var(zwt) = 1. Likewise, w is not separately identi ed. A convenient normalization 2 is w = ? w ; which, together with the Gaussian assumption, implies Var(ytjyt?1) = 2. This model is due to Clark (1973) and is re ned in Tauchen and Pitts (1983). A more thorough investigation would take fwtg to be serially correlated as described in Gallant, Hsieh, and Tauchen (1991, 1997), Andersen (1994), and elsewhere in the stochastic volatility literature.

6

3 Fitting the Score Generator
The rst step to implement the EMM estimator is to estimate the score generator model. Statistical e ciency requires that the score generator should provide a reasonably good statistical description of the data. We employ the SNP model described in Gallant and Tauchen (1992) and in the SNP User's Guide (Gallant and Tauchen, 2000). Other score generators could be used, though this would require more coding. Before beginning, a word of caution. The EMM code includes the SNP source code. In order to ensure consistency, among things, it is perhaps best, but not required that the user estimate the score generator using the SNP code that comes with EMM. To do so, just change directory to the folder snprun and make the snp executable. The snp executable will run in that folder just as it would with the basic SNP package. If the score generator was estimated using source code from the SNP distribution, then it is a good idea to check things out by evaluating the snp objective function using the SNP source code that comes with EMM. That can be done by rst making the snp executable in the folder snprun and then running snp with the iteration limits set to zero, so snp simple evaluates the objective function. The values in the output parm le should agree exactly with those in the input parm le. With that proviso, let's begin. Instead of working through a full SNP speci cation search, we show how to implement the estimator using three reasonable SNP speci cations as score generators. The three speci cations are de ned by the les 20014000.fit, 20b14000.fit, and 20b14010.fit. The subdirectory snprun contains these les along with the necessary SNP code to make the SNP executable and run the SNP program using these parm les and the sample data. Executing the Bourne shell script snp.sh should reproduce these les. The settings of the tuning parameters for rst SNP score generator L = 2; Lg = 0; Lr = 0; Lp = 1; Kz = 4; Kx = 0. These settings de ne an AR(2) model for fytg with a time homogeneous nonparametric error density accommodated via Kz = 4. There is no dependence on the past except through the linear mean function. The settings for the second score generator are L = 2; Lg = 0; Lr = 11; Lp = 1; Kz = 4; Kx = 0. These settings de ne a model with the same conditional mean function 7

and error density as before but with an ARCH conditional variance function. (This example does not employ the GARCH feature of SNP.) Not surprisingly, this model with ARCH does substantially better on the Schwarz criterion than the rst. The selection Lr = 11 is optimal under the Schwarz criterion as Lr varies with the other settings left the same. The settings for the third score generator are L = 2; Lg = 0; Lr = 11; Lp = 1; Kz = 4; Kx = 1. This model accommodates additional conditional heterogeneity beyond that embodied in the linear mean function and the ARCH conditional variance. The ts of each of these score generators de nes a moment criterion for estimation of the stochastic volatility model. The second and third score generators are typical SNP models used in actual practice with high frequency nancial data. The rst, with only linear serial dependence and homogeneous errors without any ARCH, is overly restrictive, though it is useful for illustrative purposes.

4.1 User-Supplied Subroutines and Files

4 Implementing the EMM Estimator: Description and Worked Example
The user supplies three subroutines, a control le, and an input parameter le. The basic task of the three subroutines is to provide Fortran code for the data-generation-process ! fy ( ); x ?1( )gN=1; which takes a parameter vector and generates a simulated realization ^ from the structural model. In the example = ( ; c; ; w ): The control le is called emmcntl.dat. In our example, this le is
parm0.in parm0.out emm input and output files (a12,1x,a12)

is the name of the le containing control parameters and start values. parm0.out is the name of the le that EMM puts nal parameter estimates. If all has gone well, then parm0.out will contain the tted values at the end of the optimization. In the example, the input parameter le parm0.in is
parm0.in
# # This parmfile was written by EMM Version 1.5 # EMM CONTROL FILES (required, read by EMM routines)

8

20014000.fit score generator file (a12) scratch0.dat scratch file (a12) scratch1.dat second scratch file (a12) # OPTIMIZATION DESCRIPTION (required) 1.5 filver EMM Version of input file (5x,f5.1) 1 iopt iopt=1, call npsol for optimization (5x,i5) 200 itmax maximum number of iterations for NPSOL (5x,i5) 0.100E-05 tolemm convergence tolerance for NPSOL (e10.3) # INFERENCE DESCRIPTION (required) 1 iconf compute confidence intervals if iconf=1 (5x,i5) 1 iwald compute Wald standard errors if iwald=1 (5x,i5) 0.10E-05 sfdrho perturbation to rho for numerical derivs. (e10.2) 0.95 siglev significance level, only 0.95 or 0.99 (f10.2) 1.00 sfac1 scale factor for confidence intervals (f10.2) 2.00 sfac2 scale factor for confidence intervals (f10.2) # Notes: # 0 < sfac1 < sfac2 # CONTROL PARAMETERS (user defined, must immediately precede parameters) example pid Project identification, (a10) 10000 n Length of simulation, (i10) 100 n0 Length of initial stretch for the mean (i10) 061883 iseed Seed for simulations # PARAMETERS (read in as (e26.17,1x,i1), cols 29-78 copied by EMM) 0.42000000000000003E-01 1 mu (e26.17,1x,i1) 0.74000000000000003E-02 1 c (e26.17,1x,i1) 0.90000000000000002E+00 1 sigma (e26.17,1x,i1) 0.32000000000000001E+00 1 sigw (e26.17,1x,i1)

The EMM program reads the information in the block labeled EMM CONTROL FILES to get the names of three les: 20014000.fit, which de nes the score generator, and scratch0.dat and scratch1.dat, which are the (distinct) names of two scratch les. It reads the information in the block OPTIMIZATION DESCRIPTION for control parameters related to the optimization. If iopt=1, then EMM calls NPSOL to perform the nonlinear optimization starting from the parameter values in the parameter le. Setting iopt=0 would cause EMM to skip the nonlinear optimization but still perform all other tasks, including evaluating the objective function. itmax is the maximum number of iterations for NPSOL, while tolemm is the convergence toleration. The program reads the block INFERENCE DESCRIPTION for control parameters related to the computation of con dence intervals. If iwald=1, then the package computes Wald-type standard errors based on numerical derivatives. If iconf=1, then con dence intervals based on inverting the criterion di erence statistic will be computed and printed. The parameters sfac1 and sfac2 determine (in units of standard deviation) the perturbation the program uses in forming the con dence intervals. 9

The rst subroutine the user supplies is setsim. In the example, setsim is de ned in the statement
subroutine setsim(unit,n,rho,active,lrho)

The variable unit is the Fortran unit number assigned to the le parm0.in. The user can then read that le to obtain other control information. The variable n is the length of the simulated data set, rho is the vector of start values, active is a mask vector, and lrho is the length of rho and active. If active(i)=0 then rho(i) is pinned at its start value, while if active(i)=1 then rho(i) is free to vary during the optimization. These variables except unit are to be initialized by the user and passed back to the calling routine. On input, the variable lrho is set to the maximum allowable value. The user must check the actual value of lrho against the maximum allowable value and set lrho to the actual value. More detail is given in Subsection 4.1.1 below. Typically, the user would read the control parameters such as n and starting values for rho from the input le unit as in the following code fragment:
10 rewind(unit) read(unit,'(a)',end=19) line if (line(1:18) .eq. 'CONTROL PARAMETERS') then read(unit,'(a10)') pid read(unit,'(i10)') n read(unit,'(i10)') n0 read(unit,'(i10)') iseed lensim = n endif goto 10 continue

19 * * Read start values * rewind(unit) 20 read(unit,'(a)',end=29) line if (line(1:10) .eq. 'PARAMETERS') then do i=1,lrho read(unit,'(e26.17,1x,i1)') rho(i), active(i) enddo endif goto 20 29 continue

In the subroutine setsim the user should perform any initialization related to their problem. +n In the example, the values of fz ; zw gn=1 0 are initialized within setsim via the code fragment 10

do i=1,n0+n z(i) = unsk(iseed) zw(i) = unsk(iseed) enddo

The arrays z and zw are saved in a labeled common block within the include le emmuinc0.f, and are held xed throughout the throughout the optimization. The function unsk is a random number generator and n0 is the number of simulated observations at the front end that will be discarded to let the e ects of transients die out. A listing of emmuinc0.f is given farther below. The second subroutine is gensim. For the example, this subroutine is de ned by
subroutine gensim(rho,lrho,ientry)

where rho is a value of the parameter vector passed back by the optimization routine, lrho is its length, and ientry indicates whether this is the initial call (ientry=1), a production call (ientry=2), the nal call (ientry=3), or a call indicating that the objective function has decreased (ientry=4). In this subroutine the user should generate the simulated data set as a function of rho, and save the data in a labeled common block. In the example, the simulated data are generated within the code fragment
* mu c sigma sigw = = = = rho(1) rho(2) rho(3) rho(4)

* * *

Main loop to generate data for the stochastic volatility model d0 = 0.0d0 d1 = 0.0d0 do i=2,n0+n expn = -sigw**2 + sigw*zw(i) d0 = c*d1 + sigma*dexp(dmin1(expn,80d0))*z(i) d0 = dmax1(-1.d04,dmin1(d0,1.d04)) if ( i .ge. n0+1 ) d(i-n0) = d0 d1 = d0 enddo Add in the unconditional mean do i=1,n d(i) = d(i) + mu enddo

* * *

Note the use of the limit dmin1(expn,80d0) on the argument of the exponential and the bands that con ne the simulated output to 1.d04. This is a form of \bullet-proo ng" to 11

help ensure that the simulation always returns genuine numbers (instead of NaNs indicating over ows) for the simulated values when the parameter vector should happen to imply an explosive simulation. One can expect such explosive values of to imply extremely large values of the objective function and thereby be ignored by the optimizer, a point discussed at further length in Tauchen (1998). Nonetheless, it is a good idea to make sure that the simulation is still de ned, albeit to values of extremely large magnitude, instead of generating NaNs due to over ows. Our experience suggest that SUN and HP (HewelettPackard) compilers are much more tolerant of over ows and can keep the run going if a NaN is generated, while DEC and PC-based compilers are much less tolerant and simply stop the run at the rst NaN, regardless, implying a need for strong bulletproo ng for these compilers. At the end of the loop, the array d contains the simulated data set, which is stored in a labeled common block in emmuinc0.f. The le emmuinc0.f is
* * * * * emmuinc0.f Variables and parameters related to user's portion of EMM. save /emmui0/ save /emmur0/ save /emmuc0/ integer*4 integer*4 maxn maxn0

parameter (maxn = 100000) parameter (maxn0 = 1000 ) integer*4 n0 integer*4 lensim integer*4 iseed real*8 d, z, zw character*10 pid dimension d(maxn) dimension z(maxn0+maxn) dimension zw(maxn0+maxn) common /emmui0/ lensim, n0, iseed common /emmur0/ d, z, zw common /emmuc0/ pid

By testing the variable ientry in gensim, the subroutine can determine if the call is the nal call at the putative optimum. If so, then the user can write out the simulated data set at the optimal rho as is done in the fragment 12

if (ientry .eq. 3) then open(53,file='sv.sim',form='formatted',status='unknown') do i=1,n write(53,'(1x,i9,1x,e26.17)') i, d(i) enddo close(53) endif

The third subroutine the user must furnish is simdat. This subroutine has exactly the same structure as snpdat in the SNP package. Its job is to supply a simulated data set in precisely the same format as snpdat supplies an observed data set. In the example, simdat is
* * * subroutine simdat(data,m,nobs) implicit none Argument declarations integer*4 integer*4 real*8 dimension m, nobs i data data(m,nobs)

* * ---------------------------------------------------------------------* User modifications may begin here ----------------------------------* ---------------------------------------------------------------------* * Includes * include "emmuinc0.f" * * Begin * do 10 i=1,nobs data(1,i) = d(i) 10 continue return end

Here, subroutine simdat accesses the simulated data stored in the array d through a labeled common block in emmuinc0.f. Subroutine simdat is called immediately following the call to gensim, so the simulated data set passed back through simdat will be the one generated within gensim. In the distribution, the le emmusr.f contains the routines setsim, gensim, and simdat. The le emmuothr.f contains other routines needed for the simulation. The user is free to modify and add to these les to develop his or her own application. 13

4.1.1 Setting lrho
The user sets and checks the value of lrho. In the declaration section of setsim, include the variable sizrho as shown below:
integer*4 sizrho

The variable sizrho is used to save maximal permissible value which is the value of lrho on input. The rst executable statements of setsim should then be of the form
* * * * Save maximal length of rho, set actual length and test. User is responsible for error test. EMM code will process error. sizrho = lrho lrho = 4 if (lrho .gt. sizrho) then return endif

Observe that this code fragment saves the input value in sizrho. It then sets the actual value of lrho, tests for the error and returns if there is a problem. Upon return the package will detect the same error as well; it will print an error message and halt execution. Program control (via return) must immediately go back to the package at this point in order to avoid possible serious errors such as writing beyond the end of an array. The maximum allowable value is normally set at 200, which should be ample for most applications. If the particular application needs a longer length for lrho, then the user will need to change the value of maxpar in emmincl0.f and re-make the emm executable.

4.2 Running the Program
The EMM program runs alongside the SNP package, which is described in the SNP User's Guide. The makefile supplied with the example will build the executable for the example, though it might need to be edited to suit the user's preferences and system. To build it, change directory to example/emmrun and enter the command make. The executable program built by the makefile is emm. The set of distribution les contain the Bourne shell script emm.sh, which will submit the job. In other applications, users will want to craft their own shell scripts. 14

The input parameter le is parm0.in as listed in the subsection 4.1 above. Executing the Bourne shell script emm.sh generates the output le parm0.out:
# # This parmfile was written by EMM Version 1.5 # EMM CONTROL FILES (required, read by EMM routines) 20014000.fit score generator file (a12) scratch0.dat scratch file (a12) scratch1.dat second scratch file (a12) # OPTIMIZATION DESCRIPTION (required) 1.5 filver EMM Version of input file (5x,f5.1) 1 iopt iopt=1, call npsol for optimization (5x,i5) 200 itmax maximum number of iterations for NPSOL (5x,i5) 0.100E-05 tolemm convergence tolerance for NPSOL (e10.3) # INFERENCE DESCRIPTION (required) 1 iconf compute confidence intervals if iconf=1 (5x,i5) 1 iwald compute Wald standard errors if iwald=1 (5x,i5) 0.10E-05 sfdrho perturbation to rho for numerical derivs. (e10.2) 0.95 siglev significance level, only 0.95 or 0.99 (f10.2) 1.00 sfac1 scale factor for confidence intervals (f10.2) 2.00 sfac2 scale factor for confidence intervals (f10.2) # Notes: # 0 < sfac1 < sfac2 # CONTROL PARAMETERS (user defined, must immediately precede parameters) example pid Project identification, (a10) 10000 n Length of simulation, (i10) 100 n0 Length of initial stretch for the mean (i10) 061883 iseed Seed for simulations # PARAMETERS (read in as (e26.17,1x,i1), cols 29-78 copied by EMM) 0.40032170382978634E-01 1 mu (e26.17,1x,i1) 0.79210639673519670E-01 1 c (e26.17,1x,i1) 0.90362555395199018E+00 1 sigma (e26.17,1x,i1) 0.39030262819836548E+00 1 sigw (e26.17,1x,i1) # # Parameters, numerical Wald standard errors, and tratios 1 0.04003217 0.01509116 2.65268977 2 0.07921064 0.01778641 4.45343566 3 0.90362555 0.01452063 62.23044636 4 0.39030263 0.03050066 12.79653263 # # Parameters and 95.00% approximate criterion-difference confidence intervals 1 0.04003217 ( 0.01076237, 0.06915744) 2 0.07921064 ( 0.04451822, 0.11309354) 3 0.90362555 ( 0.87484523, 0.93194000) 4 0.39030263 ( 0.32428677, 0.44782297) # *************************************************************************** emm objective function value at final simulated data set *************************************************************************** chisquare( 4) = 5.134 zvalue = 0.401 icall = 110 Evaluated using score generator defined by the snp file 20014000.fit # *************************************************************************** sqrt(nobs) x mean score, unadjusted standard errors, and quasi-t-ratios *************************************************************************** : score: serror: tratio: label index

15

# *************************************************************************** sqrt(nobs) x mean score, adjusted standard errors, and t-ratios *************************************************************************** : score: serror: tratio: label index A( 2): 1.91279: 1.51506: 1.263: A( 2) 1 0 A( 3): -0.70387: 0.38303: -1.838: A( 3) 2 0 A( 4): 11.08736: 8.98723: 1.234: A( 4) 3 0 A( 5): 2.29434: 2.94590: 0.779: A( 5) 4 0 psi( 1): -0.13380: 0.22802: -0.587: psi( 1) psi( 2): -0.39697: 1.06986: -0.371: psi( 2) psi( 3): 0.96364: 0.58583: 1.645: psi( 3) tau( 1): 4.34387: 2.55177: 1.702: tau( 1)

A( A( A( A( psi( psi( psi( tau(

2): 3): 4): 5): 1): 2): 3): 1):

1.91279: -0.70387: 11.08736: 2.29434: -0.13380: -0.39697: 0.96364: 4.34387:

2.54012: 4.27771: 9.83828: 23.15852: 1.07680: 1.07190: 1.18401: 2.82651:

0.753: -0.165: 1.127: 0.099: -0.124: -0.370: 0.814: 1.537:

A( A( A( A( psi( psi( psi( tau(

2) 3) 4) 5) 1) 2) 3) 1)

1 2 3 4

0 0 0 0

During the optimization, the EMM package checks each function value against the best (lowest) value achieved up to that point. The parameter values associated with the best function value so far are written to the le parmhold.out. That le is formatted in the same manner as parm0.in, so it can serve as a input le for a restart. This is useful in case something goes awry, e.g., a power failure, during a long optimization. Since EMM writes out the parameter values using the e26.17 format speci cation, it is advisable to use the same (or compatible) speci cation when reading in the parameters. Right after the le parmhold.out is written, the package calls the subroutine gensim with ientry set to 4. This signals that the objective function has decreased, so the user might want to write out to a le the contents of the simulated data set as is done in the code fragment:
if (ientry .eq. 4) then open(53,file='parmhold.sim',form='formatted',status='unknown') do i=1,n write(53,'(1x,i9,1x,e26.17)') i, d(i) enddo close(53) endif

The simulated data associated with parmhold.out is useful in monitoring progress during the optimization. Note that there is a very small chance that something could go awry between the writing of the le parmhold.out by EMM and execution of the user's code in gensim to write 16

le parmhold.sim. For example, the le system could become lled. Thus, there is some small chance that the contents of parmhold.out could be inconsistent with the contents of parmhold.sim.

4.3 Interpreting the Output
The top portion of the le parm0.out is formatted in exactly the same manner as the input parm0.in, so it could be used as an input le using the tted parameter values as start values. The le shows the chi-square statistic. This is the normalized value of the optimized ~ objective function, nm0n(~n ; ~n)(In)?1mn (~n; ~n); where ~ 1 In = n
n Xh t=1

(@=@ ) ln ft(~tjxt?1; ~n) (@=@ ) ln ft(~tjxt?1; ~n) : y ~ y ~

ih

i0

Under correct speci cation of the structural model, the normalized value of the optimized objective function is asymptotically X 2 with degrees of freedom equal to the length of minus the length of : The zvalue is the z-statistic implied by the normal approximation to the chisquare distribution, and is accurate only for reasonably large numbers of degrees of freedom. It is printed only to give the user a quick assessment of statistical signi cance. For critical inference, the user should use a good table of the chisquare distribution. The le also shows conventional Wald-type standard errors and tratios based on numerical rst derivatives. These are handy and easy to interpret. Unlike the criterion-di erence con dence intervals, conventional con dence intervals obtained by inverting the Wald test must be symmetric and thus will not re ect asymmetries in the objective function. The 95% approximate con dence intervals obtained by inverting the criterion di erence test based on the asymptotic chi-square distribution of the optimized objective function (Gallant and Tauchen, 1996b, 1997). By way of explanation, let ~ qi( i) = n ;max mn( ; ~n)(In )?1mn( ; ~n); xed
i

denote the pro le normalized objective function with every parameter other than i opti2 mized out. The set f i : qi( i) ? qi(^i) X1? g is a level- con dence interval for parameter i obtained by inverting the criterion di erence test. (Technically, this set is a con dence 17

region, because it could be disconnected, though we shall continue to use the more intuitive term of con dence interval.) The interval is the set of all values of i for which the di erence ^i ? i is statistically insigni cant under a one-degree of freedom chi-square test. Simply put the interval is the set of acceptable null hypotheses for i: This con dence interval has better properties than conventional Wald-type con dence intervals. It re ects asymmetries in the objective function and is invariant under nonlinear reparameterization. The EMM program approximates these con dence intervals by using di erent quadratic approximations for positive and negative perturbations of i; and then inverting the criterion di erence test. The other elements of are perturbed as well to re ect the correlations among the parameters, which is asymptotically equivalent to optimizing them out of the objective function. Because di erent quadratic approximations are used depending upon the sign of the perturbations to i; these intervals will re ect asymmetries in the objective function. The intervals are not the same as those based on the usual quadratic asymptotic approximations to the objective function. The le also contains the normalized mean SNP scores under the model,

N =1 along with the unadjusted standard errors of the normalized scores, and the corresponding quasi-t-statistics. The unadjusted standard deviations are the square roots of the diagonal ~ elements of In ; and the quasi-t-ratios are the ratios of normalized scores to the unadjusted standard deviations. The quasi-t-ratios are not actually asymptotically N (0; 1) because they take account only of the randomness in ~n; while treating ^n as if it were the xed value 0 : Interestingly, the unadjusted standard errors are biased upwards (Newey, 1985) and (Tauchen, 1985) so the quasi-t-ratios are downward biased relative to 2.0. The quasi-t-ratios are still useful for assessing how well the model ts along various dimensions. A quasi-tstatistic above 2.0 still indicates failure to t the corresponding score. The quasi-t-ratios are particularly useful for assessing the underlying causes of a statistically signi cant chi-square statistic. The output le also shows the normalized mean SNP scores along with their adjusted standard errors and the corresponding t-ratios. The adjusted standard errors take into acn

pnm0 (~ ; ~ ) = 1
n n

N X

pn(@=@ ) ln f (^ (~ )jx (~ ); ~ ); y n ^ ?1 n n

18

count that both ~n and ^n are estimated and are asymptotically valid (Gallant and Tauchen, 1996b, 1997). The information needed to compute adjusted standard errors, which is a numerically determined Jacobian matrix, only becomes available at the end of the optimization during the computations for the con dence intervals. Adjusted standard errors and t-ratios can thus be printed only in the nal output le and if iconf=1. For this reason, the le parmhold.out displays only the unadjusted standard errors and quasi-t-ratios, so one must keep in mind the downward bias. There is no way to get the adjusted standard errors and asymptotically correct t-ratios until the successful termination of the run. The computational time for getting them on the y as would be prohibitive. The simple stochastic volatility model appears to t quite well the scores de ned by the le 20014000.fit. The reason is that this score generator contains no indicators for conditional heteroskedasticity and other higher conditional heterogeneity. In e ect, this estimation shows the results of tting a misspeci ed structural model an incomplete score generator, which could be misleading.

4.4 Fitting to More Realistic Scores
The score generator de ned by .fit is much more reasonable, as it contains ARCH-like components. To t to this score generator, we copy parm0.in to parm1.in and edit the line de ning the score generator le to read
20b14000.fit score generator file (a12)

We then edit the le emmcntl.dat to read
parm1.in parm1.out emm input and output files (a12,1x,a12)

and then run program. These steps produce the output le
# # This parmfile was written by EMM Version 1.5 # EMM CONTROL FILES (required, read by EMM routines) 20b14000.fit score generator file (a12) scratch0.dat scratch file (a12) scratch1.dat second scratch file (a12) #

19

OPTIMIZATION DESCRIPTION (required) 1.5 filver EMM Version of input file (5x,f5.1) 1 iopt iopt=1, call npsol for optimization (5x,i5) 200 itmax maximum number of iterations for NPSOL (5x,i5) 0.100E-05 tolemm convergence tolerance for NPSOL (e10.3) # INFERENCE DESCRIPTION (required) 1 iconf compute confidence intervals if iconf=1 (5x,i5) 1 iwald compute Wald standard errors if iwald=1 (5x,i5) 0.10E-02 sfdrho perturbation to rho for numerical derivs. (e10.2) 0.95 siglev significance level, only 0.95 or 0.99 (f10.2) 1.00 sfac1 scale factor for confidence intervals (f10.2) 2.00 sfac2 scale factor for confidence intervals (f10.2) # Notes: # 0 < sfac1 < sfac2 # CONTROL PARAMETERS (user defined, must immediately precede parameters) example pid Project identification, (a10) 10000 n Length of simulation, (i10) 100 n0 Length of initial stretch for the mean (i10) 061883 iseed Seed for simulations # PARAMETERS (read in as (e26.17,1x,i1), cols 29-78 copied by EMM) 0.38516709009460484E-01 1 mu (e26.17,1x,i1) 0.95504102929679549E-01 1 c (e26.17,1x,i1) 0.75480727297664130E+00 1 sigma (e26.17,1x,i1) 0.26193462931252476E+00 1 sigw (e26.17,1x,i1) # # Parameters, numerical Wald standard errors, and tratios 1 0.03851671 0.01208283 3.18772208 2 0.09550410 0.01586457 6.01996234 3 0.75480727 0.01756008 42.98427679 4 0.26193463 0.03447241 7.59838531 # # Parameters and 95.00% approximate criterion-difference confidence intervals 1 0.03851671 ( 0.01585360, 0.06209836) 2 0.09550410 ( 0.06675950, 0.12615968) 3 0.75480727 ( 0.71642555, 0.80499649) 4 0.26193463 ( 0.18155390, 0.32600481) # *************************************************************************** emm objective function value at final simulated data set *************************************************************************** chisquare( 15) = 51.306 zvalue = 6.629 icall = 121 Evaluated using score generator defined by the snp file 20b14000.fit # *************************************************************************** sqrt(nobs) x mean score, unadjusted standard errors, and quasi-t-ratios *************************************************************************** : score: serror: tratio: label index A( 2): 1.12039: 2.36939: 0.473: A( 2) 1 0 A( 3): 12.44351: 3.80264: 3.272: A( 3) 2 0 A( 4): 6.41478: 9.11100: 0.704: A( 4) 3 0 A( 5): 57.64852: 22.04164: 2.615: A( 5) 4 0 psi( 1): 0.10611: 1.28240: 0.083: psi( 1) psi( 2): -1.27632: 1.03523: -1.233: psi( 2) psi( 3): -0.23207: 0.97776: -0.237: psi( 3) tau( 1): 5.27454: 1.48678: 3.548: tau( 1) tau( 2): 4.33563: 1.09968: 3.943: tau( 2) tau( 3): 3.82312: 1.00506: 3.804: tau( 3) tau( 4): 5.92262: 1.75072: 3.383: tau( 4) tau( 5): 4.93573: 1.05771: 4.666: tau( 5)

20

# *************************************************************************** sqrt(nobs) x mean score, adjusted standard errors, and t-ratios *************************************************************************** : score: serror: tratio: label index A( 2): 1.12039: 1.42334: 0.787: A( 2) 1 0 A( 3): 12.44351: 2.24289: 5.548: A( 3) 2 0 A( 4): 6.41478: 8.26355: 0.776: A( 4) 3 0 A( 5): 57.64852: 9.81384: 5.874: A( 5) 4 0 psi( 1): 0.10611: 0.39106: 0.271: psi( 1) psi( 2): -1.27632: 1.02750: -1.242: psi( 2) psi( 3): -0.23207: 0.32502: -0.714: psi( 3) tau( 1): 5.27454: 1.04985: 5.024: tau( 1) tau( 2): 4.33563: 0.99036: 4.378: tau( 2) tau( 3): 3.82312: 0.87497: 4.369: tau( 3) tau( 4): 5.92262: 1.69948: 3.485: tau( 4) tau( 5): 4.93573: 0.95271: 5.181: tau( 5) tau( 6): 3.70699: 1.22019: 3.038: tau( 6) tau( 7): 4.02240: 1.05492: 3.813: tau( 7) tau( 8): 4.58330: 0.87688: 5.227: tau( 8) tau( 9): 4.66164: 1.26317: 3.690: tau( 9) tau( 10): 5.12462: 1.95075: 2.627: tau( 10) tau( 11): 3.64895: 1.50606: 2.423: tau( 11) tau( 12): 4.77233: 2.40798: 1.982: tau( 12)

tau( 6): tau( 7): tau( 8): tau( 9): tau( 10): tau( 11): tau( 12):

3.70699: 4.02240: 4.58330: 4.66164: 5.12462: 3.64895: 4.77233:

1.32149: 1.16174: 0.99252: 1.34502: 2.00190: 1.58858: 2.45108:

2.805: 3.462: 4.618: 3.466: 2.560: 2.297: 1.947:

tau( 6) tau( 7) tau( 8) tau( 9) tau( 10) tau( 11) tau( 12)

The simple stochastic volatility model cannot accommodate these scores. The t-statistics on the AR parameters, the psi's are ne; however, there are large t-statistics on the scores corresponding the quadratic and quartic terms of SNP model. These quasi-t-statistics indicate that the simulated data generated by the stochastic volatility model are conditionally too close to the Gaussian distribution relative to the observed data. Likewise, as expected given the iid speci cation for the latent volatility, there are large quasi-t-statistics on the parameters of the ARCH-like model, the tau's. Lastly, we t to the score generator de ned by 20014010.fit, which is a fully nonlinear model. Experimentation showed that, for tting to this score generator, it was best to use as start values the estimates obtained from the previous t to 20b14000.fit. We therefore copy parm1.out to parm2.in and edit the latter le to rename the score generator 20b14010.fit When creating a new input parameter le from an previous output le, it is a good idea to trim out with the editor unneeded material in the input parameter le. Though not necessary, this trimming can avoid confusion at later dates. After such trimming, the input 21

parameter parm2.in is
# # This parmfile was written by EMM Version 1.5 # EMM CONTROL FILES (required, read by EMM routines) 20b14010.fit score generator file (a12) scratch0.dat scratch file (a12) scratch1.dat second scratch file (a12) # OPTIMIZATION DESCRIPTION (required) 1.5 filver EMM Version of input file (5x,f5.1) 1 iopt iopt=1, call npsol for optimization (5x,i5) 200 itmax maximum number of iterations for NPSOL (5x,i5) 0.100E-05 tolemm convergence tolerance for NPSOL (e10.3) # INFERENCE DESCRIPTION (required) 1 iconf compute confidence intervals if iconf=1 (5x,i5) 1 iwald compute Wald standard errors if iwald=1 (5x,i5) 0.10E-05 sfdrho perturbation to rho for numerical derivs. (e10.2) 0.95 siglev significance level, only 0.95 or 0.99 (f10.2) 1.00 sfac1 scale factor for confidence intervals (f10.2) 2.00 sfac2 scale factor for confidence intervals (f10.2) # Notes: # 0 < sfac1 < sfac2 # CONTROL PARAMETERS (user defined, must immediately precede parameters) example pid Project identification, (a10) 10000 n Length of simulation, (i10) 100 n0 Length of initial stretch for the mean (i10) 061883 iseed Seed for simulations # PARAMETERS (read in as (e26.17,1x,i1), cols 29-78 copied by EMM) 0.38516709009460484E-01 1 mu (e26.17,1x,i1) 0.95504102929679549E-01 1 c (e26.17,1x,i1) 0.75480727297664130E+00 1 sigma (e26.17,1x,i1) 0.26193462931252476E+00 1 sigw (e26.17,1x,i1)

We then edit emmcntl.dat to read
parm2.in parm2.out emm input and output files (a12,1x,a12)

Running the program via emm.sh gives the results parm2.out shown below:
# # This parmfile was written by EMM Version 1.5 # EMM CONTROL FILES (required, read by EMM routines) 20b14010.fit score generator file (a12) scratch0.dat scratch file (a12) scratch1.dat second scratch file (a12) # OPTIMIZATION DESCRIPTION (required) 1.5 filver EMM Version of input file (5x,f5.1) 1 iopt iopt=1, call npsol for optimization (5x,i5) 200 itmax maximum number of iterations for NPSOL (5x,i5) 0.100E-05 tolemm convergence tolerance for NPSOL (e10.3) #

22

INFERENCE DESCRIPTION (required) 1 iconf compute confidence intervals if iconf=1 (5x,i5) 1 iwald compute Wald standard errors if iwald=1 (5x,i5) 0.10E-05 sfdrho perturbation to rho for numerical derivs. (e10.2) 0.95 siglev significance level, only 0.95 or 0.99 (f10.2) 1.00 sfac1 scale factor for confidence intervals (f10.2) 2.00 sfac2 scale factor for confidence intervals (f10.2) # Notes: # 0 < sfac1 < sfac2 # CONTROL PARAMETERS (user defined, must immediately precede parameters) example pid Project identification, (a10) 10000 n Length of simulation, (i10) 100 n0 Length of initial stretch for the mean (i10) 061883 iseed Seed for simulations # PARAMETERS (read in as (e26.17,1x,i1), cols 29-78 copied by EMM) 0.42411845091692789E-01 1 mu (e26.17,1x,i1) 0.87364443018568036E-01 1 c (e26.17,1x,i1) 0.72883292441282876E+00 1 sigma (e26.17,1x,i1) 0.21565817704533549E+00 1 sigw (e26.17,1x,i1) # # Parameters, numerical Wald standard errors, and tratios 1 0.04241185 0.01156778 3.66637867 2 0.08736444 0.01548250 5.64278713 3 0.72883292 0.01552239 46.95364772 4 0.21565818 0.03422307 6.30154332 # # Parameters and 95.00% approximate criterion-difference confidence intervals 1 0.04241185 ( 0.01964878, 0.06492585) 2 0.08736444 ( 0.05788696, 0.11724129) 3 0.72883292 ( 0.69675469, 0.76766795) 4 0.21565818 ( 0.13555812, 0.28363125) # *************************************************************************** emm objective function value at final simulated data set *************************************************************************** chisquare( 20) = 65.841 zvalue = 7.248 icall = 99 Evaluated using score generator defined by the snp file 20b14010.fit # *************************************************************************** sqrt(nobs) x mean score, unadjusted standard errors, and quasi-t-ratios *************************************************************************** : score: serror: tratio: label index A( 2): -0.49218: 0.57444: -0.857: A( 2) 0 1 A( 3): 1.07745: 2.40769: 0.448: A( 3) 1 0 A( 4): 1.70257: 2.31407: 0.736: A( 4) 1 1 A( 5): 15.80823: 3.86521: 4.090: A( 5) 2 0 A( 6): -4.12907: 3.78669: -1.090: A( 6) 2 1 A( 7): 7.13859: 9.20566: 0.775: A( 7) 3 0 A( 8): 15.89051: 8.94136: 1.777: A( 8) 3 1 A( 9): 78.36122: 22.17691: 3.533: A( 9) 4 0 A( 10): -18.90524: 21.55000: -0.877: A( 10) 4 1 psi( 1): 0.04085: 1.30758: 0.031: psi( 1) psi( 2): -1.41744: 1.04899: -1.351: psi( 2) psi( 3): -0.26229: 1.02159: -0.257: psi( 3) tau( 1): 6.25000: 1.48268: 4.215: tau( 1) tau( 2): 4.83043: 1.10493: 4.372: tau( 2) tau( 3): 4.20069: 1.01373: 4.144: tau( 3) tau( 4): 6.40239: 1.70048: 3.765: tau( 4) tau( 5): 5.44038: 1.05216: 5.171: tau( 5) tau( 6): 4.06062: 1.31307: 3.092: tau( 6)

23

# *************************************************************************** sqrt(nobs) x mean score, adjusted standard errors, and t-ratios *************************************************************************** : score: serror: tratio: label index A( 2): -0.49218: 0.56401: -0.873: A( 2) 0 1 A( 3): 1.07745: 1.51944: 0.709: A( 3) 1 0 A( 4): 1.70257: 1.87967: 0.906: A( 4) 1 1 A( 5): 15.80823: 2.53190: 6.244: A( 5) 2 0 A( 6): -4.12907: 3.68584: -1.120: A( 6) 2 1 A( 7): 7.13859: 8.38008: 0.852: A( 7) 3 0 A( 8): 15.89051: 8.36727: 1.899: A( 8) 3 1 A( 9): 78.36122: 12.07122: 6.492: A( 9) 4 0 A( 10): -18.90524: 20.74554: -0.911: A( 10) 4 1 psi( 1): 0.04085: 0.42236: 0.097: psi( 1) psi( 2): -1.41744: 1.04227: -1.360: psi( 2) psi( 3): -0.26229: 0.49363: -0.531: psi( 3) tau( 1): 6.25000: 1.09469: 5.709: tau( 1) tau( 2): 4.83043: 1.01702: 4.750: tau( 2) tau( 3): 4.20069: 0.90575: 4.638: tau( 3) tau( 4): 6.40239: 1.65767: 3.862: tau( 4) tau( 5): 5.44038: 0.96856: 5.617: tau( 5) tau( 6): 4.06062: 1.22765: 3.308: tau( 6) tau( 7): 4.46295: 1.08080: 4.129: tau( 7) tau( 8): 4.97318: 0.90595: 5.489: tau( 8) tau( 9): 5.21617: 1.26013: 4.139: tau( 9) tau( 10): 5.68608: 1.87942: 3.025: tau( 10) tau( 11): 4.18134: 1.51882: 2.753: tau( 11) tau( 12): 5.05802: 2.36774: 2.136: tau( 12)

tau( 7): tau( 8): tau( 9): tau( 10): tau( 11): tau( 12):

4.46295: 4.97318: 5.21617: 5.68608: 4.18134: 5.05802:

1.16879: 1.00045: 1.32623: 1.92147: 1.58592: 2.40438:

3.818: 4.971: 3.933: 2.959: 2.637: 2.104:

tau( 7) tau( 8) tau( 9) tau( 10) tau( 11) tau( 12)

As is evident from the chi-square statistic and the quasi-t-statistics, the simple stochastic volatility model cannot t this score generator. Introducing additional complications such as persistent volatility and asymmetries (Gallant, Hsieh, and Tauchen, 1997) would improve the t substantially.

5 Estimating a Stochastic Di erential Equation (SDE)
5.1 Speci cation of the SDE
We now show how to use EMM to estimate the parameters of a stochastic di erential equation. The objective is to estimate the parameters of the following system:

dvt = (av + avv vt + avs st)dt + (b1v + b1vv vt + b1vsst)dW1t + b2v dW2t dst = (as + ass st)dt + (b2s + b2ssst)ev dW2t:
t

24

Here st is the short rate of interest, assumed to be observed, while vt is an unobserved stochastic volatility factor. The above represents a two-factor model for the short rate with only one observed factor. The need for a two-factor model is documented in Tauchen (1997), and Andersen and Lund (1997a, 1997b) who nd that single factor models cannot quite capture all of the dynamics of the short-term rate. The model here is a generalized two-factor model that allows for feedback from the short rate into volatility (Gallant and Tauchen, 1998).

5.2 Data and Score Generator
The code and data les for this example are all located within the subdirectory sdedemo, which is available via anonymous ftp to the same location as the EMM code itself. The raw data are weekly (Friday) observations on the 3-Month Treasury Bill Rate, January 5, 1962 { March 31, 1995, forming 1,735 weekly observations. The raw data series is the rst column of actual data in the le yc.dat in subdirectory data. The le snpdata.f in subdirectory data contains Fortran read and format statements for inputting the raw data. The rst step is to estimate the score generator model. As emphasized by Gallant and Long (1997) and Tauchen (1997), the score generator should provide a comprehensive nonparametric description of the data. It should also be dynamically stable, or else the resulting EMM objective function is numerically very poorly behaved (Tauchen, 1998). The strategy for nding the appropriate speci cation is reported in the SNP User's Manual. We show how to t an interest rate di usion using two score generators. The rst, termed \Semiparametric ARCH," is de ned by the le 10414000.fit. This is an SNP model with L = 1; Lr = 4; Kz = 4; it is the best tting stable model of those constrained to have homogeneous error densities, i.e., Kx = 0: The other, termed \Nonlinear Nonparametric," is de ned by the le 10414010.fit. This is an SNP model with L = 1; Lr = 4; Kz = 4; Lp = 1; and Kx = 1; it is the overall best tting stable model. In particular, the Nonlinear Nonparametric score generator is preferred under the Schwarz (1978), i.e. BIC, criterion to the Semiparametric ARCH score.

25

5.3 Modi cations for Estimation of the SDE
As in the stochastic volatility example, the user needs to modify the subroutines setsim, gensim, and simdat within the module emmusr.f to suit the application. The modi cation to setsim to read in the parameter values is the following code fragment:
* Begin, read control information rewind(unit) 10 read(unit,'(a)',end=19) line if (line(1:18) .eq. 'CONTROL PARAMETERS') then read(unit,'(a10)') pid read(unit,'(i10)') n read(unit,'(i10)') n0 read(unit,'(i10)') iseed lensim = n endif goto 10 19 continue * Read start values rewind(unit) 20 read(unit,'(a)',end=29) line if (line(1:10) .eq. 'PARAMETERS') then lrho = 10 do i=1,lrho read(unit,'(e26.17,1x,i1)') rho(i), active(i) enddo endif goto 20 29 continue

The modi cation to gensim that generate simulated data is the code fragment
* * Pick out parameters of the sde avv avs as ass b1v b1vv b1vs b2v b2s b2ss = = = = = = = = = = rho( 1) rho( 2) rho( 3) rho( 4) rho( 5) rho( 6) rho( 7) rho( 8) rho( 9) rho(10)

* * * * *

Main loop to generate data for the sde t0=0.0d0 Xtst(1)=1.0d0 Xtst(2)=6.0d0 X0(1)=Xtst(1) X0(2)=Xtst(2) jseed=iseed

26

*

*

if (ientry.eq.1) then call header('/parameters//_') write(nout,'(10x,''avv '',f20.8)') rho( 1) write(nout,'(10x,''avs '',f20.8)') rho( 2) write(nout,'(10x,''as '',f20.8)') rho( 3) write(nout,'(10x,''ass '',f20.8)') rho( 4) write(nout,'(10x,''b1v '',f20.8)') rho( 5) write(nout,'(10x,''b1vv '',f20.8)') rho( 6) write(nout,'(10x,''b1vs '',f20.8)') rho( 7) write(nout,'(10x,''b2v '',f20.8)') rho( 8) write(nout,'(10x,''b2s '',f20.8)') rho( 9) write(nout,'(10x,''b2ss '',f20.8)') rho(10) call header('/transients/date,log volatility, rate//_') do i=1,n0 yy=i/52 mm=MOD(i/4,12)+1 dd=MOD(7*i,30)+1 tb3mo = X0(2) if ((i.le.24).or.(i.ge.(n0-24))) then write(nout,'(5x,3i3,2f12.5)') yy,mm,dd,X0(1),X0(2) if (i.eq.24) write(nout,'(a,i5)') 'Skipping next',n0-48 end if call weak2s & (drift,difuse,t0,X0,A,B,d,m,t0,X0,dt,jseed,week,Y,Xtst,Xtol) enddo else do i=1,n0 call weak2s & (drift,difuse,t0,X0,A,B,d,m,t0,X0,dt,jseed,week,Y,Xtst,Xtol) enddo endif do i=1,n call weak2s & (drift,difuse,t0,X0,A,B,d,m,t0,X0,dt,jseed,week,Y,Xtst,Xtol) yy=MOD(i,52) mm=MOD(4*i,12) dd=MOD(7*i,30) tb3mo = X0(2) dsim(i) = tb3mo enddo

* * *

Observe that the simulation code uses the subroutine weak2s to simulate from the stochastic di erential equation. This is a general-purpose simulation SDE subroutine available with the source code in subdirectory usrcode; it is internally documented. This subroutine generates a weak-2 approximate solution (Kloeden and Platen, 1992) to the exact solution of the SDE. This approximation is a one-term Ito-Taylor improvement on the elementary Euler scheme for simulating from an SDE, and it thereby converges more quickly than the Euler scheme as the discretization interval tends to zero. The subroutine weak2s requires de nition of the drift and di usion functions as subroutines to be called. For this application, the subroutine de ning the drift function is located 27

in the le drift.f:
* * * * * * * * * * * * * * * * * subroutine drift(t,X,d,A) implicit none arguments integer*4 d real*8 t,X(d),A(d) model parameters drift av, avv, avs, as, ass, diffusion b1v, b1vv, b1vs, b2v, b2s, b2ss include 'emmuinc1.f' local variables real*8 v, s v = X(1) s = X(2) av = -avv A(1) = av + avv*v + avs*s A(2) = as + ass*s end

volatility equation short bond equations volatility equation short bond equation

The drift function incorporates the restriction av = ?avv as a normalization for identi cation. The subroutine de ning the di usion function is located in the le difuse.f:
* * * * * * * * * * * * * * * * subroutine difuse(t,X,d,m,B) implicit none arguments integer*4 d,m real*8 t,X(d),B(d,m) model parameters drift av, avv, avs, as, ass, asv, diffusion b1v, b1vv, b1vs, b2v, b2s, b2ss include 'emmuinc1.f' local variables real*8 v, s v = X(1) s = X(2)

volatility equation short bond equations volatility equation short bond equation

28

* *

B(1,1) = b1v + b1vv*v + b1vs*s B(2,1) = 0.d0 B(1,2) = b2v B(2,2) = (b2s + b2ss*s) * DEXP(v) end

Parameters are passed to the drift and di usion subroutines via the common blocks located in emmuinc1.f:
* * emmuinc1.f * * model parameters * drift * av, avv, avs, * as, ass, assl, assr, asv, * diffusion * b1v, b1vv, b1vs, b2v, * b2s, b2ss save /sdincr/ real*8 & av, avv, avs, & as, ass, assl, assr, asv, & b1v, b1vv, b1vs, b2v, & b2s, b2ss common /sdincr/ & av, avv, avs, & as, ass, assl, assr, asv, & b1v, b1vv, b1vs, b2v, & b2s, b2ss

volatility equation short bond equations volatility equation short bond equation

5.4 Estimation of the SDE
The rst e ort is to illustrate tting a simple linear SDE to the score generator de ne by 10414000.fit. A linear speci cation takes the form ds = a(s)dt + bdW; where a(s) is linear in s and b is a constant. This can be achieved by specializing the general speci cation above so that all parameters in the dvt equation are set zero and likewise b2ss = 0. The speci cation then takes the form

dvt = 0 dst = (as + ass st)dt + b2sev0 dW2 with v0 = 1:0. Taking v0 = 1:0 normalizes vt = 1:0 for all t > 0:
29

So that the user can get answers reasonably promptly and thereby check out the code, we use N = 10; 000 as the simulation size. This choice is too small, but it gives a quick, low-accuracy solution, which is usable for illustrative purposes. For very persistent series like an interest rate, we recommend values on the order of N = 50; 000; N = 100; 000; or even higher in research work. The user needs to try larger values of N until the estimated objective function value stabilizes and the results become robust. To estimate this speci cation, we use the input parm le parm0.in:
# # This parmfile was written by EMM Version 1.5 # EMM CONTROL FILES (required, read by EMM routines) 10414000.fit score generator file (a12) scratch0.dat scratch file (a12) scratch1.dat second scratch file (a12) # OPTIMIZATION DESCRIPTION (required) 1.5 filver EMM Version of input file (5x,f5.1) 1 iopt iopt=1, call npsol for optimization (5x,i5) 400 itmax maximum number of iterations for NPSOL (5x,i5) 0.100E-03 tolemm convergence tolerance for NPSOL (e10.3) # INFERENCE DESCRIPTION (required) 1 iconf compute confidence intervals if iconf=1 (5x,i5) 1 iwald compute Wald standard errors if iwald=1 (5x,i5) 0.10E-05 sfdrho perturbation to rho for numerical derivs. (e10.2) 0.95 siglev significance level, only 0.95 or 0.99 (f10.2) 0.50 sfac1 scale factor for confidence intervals (f10.2) 1.00 sfac2 scale factor for confidence intervals (f10.2) # Notes: # 0 < sfac1 < sfac2 # CONTROL PARAMETERS (user defined, must immediately precede parameters) spot pid Project identification, (a10) 10000 n Length of simulation, (i10) 500 n0 Length of initial stretch for the mean (i10) 100542 iseed Seed for simulations # PARAMETERS (read in as (e26.17,1x,i1), cols 29-78 copied by EMM) 0.00000000000000000E+00 0 avv = rho( 1) 0.00000000000000000E+00 0 avs = rho( 2) 0.10000000000000000E+02 1 as = rho( 3) -0.12000000000000000E+01 1 ass = rho( 4) 0.00000000000000000E+00 0 b1v = rho( 5) 0.00000000000000000E+00 0 b1vv = rho( 6) 0.00000000000000000E+00 0 b1vs = rho( 6) 0.00000000000000000E+00 0 b2v = rho( 8) 0.11000000000000000E+00 1 b2s = rho( 9) 0.00000000000000000E+00 0 b2ss = rho(10)

Editing the le emmcntl.dat accordingly and starting the shell script emm.sh to execute the program gives the results: 30

# # This parmfile was written by EMM Version 1.5 # EMM CONTROL FILES (required, read by EMM routines) 10414000.fit score generator file (a12) scratch0.dat scratch file (a12) scratch1.dat second scratch file (a12) # OPTIMIZATION DESCRIPTION (required) 1.5 filver EMM Version of input file (5x,f5.1) 1 iopt iopt=1, call npsol for optimization (5x,i5) 400 itmax maximum number of iterations for NPSOL (5x,i5) 0.100E-03 tolemm convergence tolerance for NPSOL (e10.3) # INFERENCE DESCRIPTION (required) 1 iconf compute confidence intervals if iconf=1 (5x,i5) 1 iwald compute Wald standard errors if iwald=1 (5x,i5) 0.10E-05 sfdrho perturbation to rho for numerical derivs. (e10.2) 0.95 siglev significance level, only 0.95 or 0.99 (f10.2) 0.50 sfac1 scale factor for confidence intervals (f10.2) 1.00 sfac2 scale factor for confidence intervals (f10.2) # Notes: # 0 < sfac1 < sfac2 # CONTROL PARAMETERS (user defined, must immediately precede parameters) spot pid Project identification, (a10) 10000 n Length of simulation, (i10) 500 n0 Length of initial stretch for the mean (i10) 100542 iseed Seed for simulations # PARAMETERS (read in as (e26.17,1x,i1), cols 29-78 copied by EMM) 0.00000000000000000E+00 0 avv = rho( 1) 0.00000000000000000E+00 0 avs = rho( 2) 0.12562969555871263E+02 1 as = rho( 3) -0.12659334766727162E+01 1 ass = rho( 4) 0.00000000000000000E+00 0 b1v = rho( 5) 0.00000000000000000E+00 0 b1vv = rho( 6) 0.00000000000000000E+00 0 b1vs = rho( 6) 0.00000000000000000E+00 0 b2v = rho( 8) 0.11699196676357297E+00 1 b2s = rho( 9) 0.00000000000000000E+00 0 b2ss = rho(10) # # Parameters, numerical Wald standard errors, and tratios 1 0.00000000 0.00000000 2 0.00000000 0.00000000 3 12.56296956 2.84854822 4.41030609 4 -1.26593348 0.25574507 -4.94998184 5 0.00000000 0.00000000 6 0.00000000 0.00000000 7 0.00000000 0.00000000 8 0.00000000 0.00000000 9 0.11699197 0.01337136 8.74944368 10 0.00000000 0.00000000 # # Parameters and 95.00% approximate criterion-difference confidence intervals 1 0.00000000 2 0.00000000 3 12.56296956 ( 8.57161380, 16.83875659) 4 -1.26593348 ( -1.63225427, -0.90548330) 5 0.00000000 6 0.00000000 7 0.00000000

31

# *************************************************************************** emm objective function value at final simulated data set *************************************************************************** chisquare( 8) = 68.866 zvalue = 15.216 icall = 64 Evaluated using score generator defined by the snp file 10414000.fit # *************************************************************************** sqrt(nobs) x mean score, unadjusted standard errors, and quasi-t-ratios *************************************************************************** : score: serror: tratio: label index A( 2): -1.86517: 2.32436: -0.802: A( 2) 1 0 A( 3): -19.81146: 3.61643: -5.478: A( 3) 2 0 A( 4): -6.75680: 8.95079: -0.755: A( 4) 3 0 A( 5): -55.66455: 21.40209: -2.601: A( 5) 4 0 psi( 1): -12.76578: 40.18100: -0.318: psi( 1) psi( 2): 5.31839: 33.59981: 0.158: psi( 2) tau( 1): -167.31509: 40.10458: -4.172: tau( 1) tau( 2): -1.75766: 0.95037: -1.849: tau( 2) tau( 3): -2.22517: 1.16033: -1.918: tau( 3) tau( 4): -3.91066: 0.90336: -4.329: tau( 4) tau( 5): -2.44608: 1.21942: -2.006: tau( 5) # *************************************************************************** sqrt(nobs) x mean score, adjusted standard errors, and t-ratios *************************************************************************** : score: serror: tratio: label index A( 2): -1.86517: 1.67459: -1.114: A( 2) 1 0 A( 3): -19.81146: 3.07866: -6.435: A( 3) 2 0 A( 4): -6.75680: 7.10823: -0.951: A( 4) 3 0 A( 5): -55.66455: 18.07104: -3.080: A( 5) 4 0 psi( 1): -12.76578: 38.89991: -0.328: psi( 1) psi( 2): 5.31839: 28.73212: 0.185: psi( 2) tau( 1): -167.31509: 39.90322: -4.193: tau( 1) tau( 2): -1.75766: 0.82077: -2.141: tau( 2) tau( 3): -2.22517: 1.04235: -2.135: tau( 3) tau( 4): -3.91066: 0.67101: -5.828: tau( 4) tau( 5): -2.44608: 1.00980: -2.422: tau( 5)

8 9 10

0.00000000 0.11699197 ( 0.00000000

0.09506724,

0.13998114)

As might be expected, the simple linear SDE speci cation cannot t the Semiparametric ARCH scores. The 2(8) omnibus test of speci cation indicates sharp rejection of the model. Comparing the magnitudes of the t-ratios on mean scores relative to 2.0 helps reveal the successes and di culties with this speci cation. The speci cation accommodates the linear aspects of the data, as indicated by small magnitude of the t-ratios on the mean scores of the parameters. However, it fails to account for the leptokurtic character of interest rate movements, which is evident from the large t-ratios on the mean scores of the quadratic and quartic terms of the Hermite polynomial. It also fails to account for the ARCH-like behavior of interest rate movements as indicated by the large t-ratios on the mean scores of the parameters. 32

Rather than show the results of tting an upward progression of increasingly complex speci cations we now just show how to t a very general SDE speci cation to the Nonlinear Nonparametric score generator. The speci cation to be estimated is

dvt = (av + avv vt + avsst)dt + (b1v + b1vsst)dW1 dst = (as + assst)dt + (b2s + b2ssst)ev dW2 which is the general speci cation above with b1vv = 0; b2v = 0; and, as before, av = ?avv is a normalization for identi cation. To do the estimation, we edit the le emmcntl.dat to read
t

parm1.in

parm1.out

emm input and output files (a12,1x,a12)

The starting parameter le is parm1.dat:
# # This parmfile was written by EMM Version 1.4 # EMM CONTROL FILES (required, read by EMM routines) 10414010.fit score generator file (a12) scratch0.dat scratch file (a12) scratch1.dat second scratch file (a12) # OPTIMIZATION DESCRIPTION (required) 1.5 filver EMM Version of input file (5x,f5.1) 1 iopt iopt=1, call npsol for optimization (5x,i5) 200 itmax maximum number of iterations for NPSOL (5x,i5) 0.100E-05 tolemm convergence tolerance for NPSOL (e10.3) # INFERENCE DESCRIPTION (required) 1 iconf compute confidence intervals if iconf=1 (5x,i5) 1 iwald compute Wald standard errors if iwald=1 (5x,i5) 0.10E-02 sfdrho perturbation to rho for numerical derivs. (e10.2) 0.95 siglev significance level, only 0.95 or 0.99 (f10.2) 0.50 sfac1 scale factor for confidence intervals (f10.2) 1.00 sfac2 scale factor for confidence intervals (f10.2) # Notes: iconf=1 for iwald=1 to have effect and # 0 < sfac1 < sfac2 # CONTROL PARAMETERS (user defined, must immediately precede parameters) spot pid Project identification, (a10) 10000 n Length of simulation, (i10) 500 n0 Length of initial stretch for the mean (i10) 100542 iseed Seed for simulations # PARAMETERS (read in as (e26.17,1x,i1), cols 29-78 copied by EMM) -0.18000000000000000E+00 1 avv = rho( 1) -0.88000000000000000E-02 1 avs = rho( 2) 0.19000000000000000E-01 1 as = rho( 3) -0.35000000000000000E-02 1 ass = rho( 4) 0.69000000000000000E+00 1 b1v = rho( 5) 0.00000000000000000E+00 0 b1vv = rho( 6)

33

-0.63000000000000000E-01 0.00000000000000000E+00 0.38000000000000000E-01 -0.17000000000000000E-01

1 0 1 1

b1vs b2v b2s b2ss

= = = =

rho( 7) rho( 8) rho( 9) rho(10)

Running the job gives the results
# # This parmfile was written by EMM Version 1.5 # EMM CONTROL FILES (required, read by EMM routines) 10414010.fit score generator file (a12) scratch0.dat scratch file (a12) scratch1.dat second scratch file (a12) # OPTIMIZATION DESCRIPTION (required) 1.5 filver EMM Version of input file (5x,f5.1) 1 iopt iopt=1, call npsol for optimization (5x,i5) 200 itmax maximum number of iterations for NPSOL (5x,i5) 0.100E-05 tolemm convergence tolerance for NPSOL (e10.3) # INFERENCE DESCRIPTION (required) 1 iconf compute confidence intervals if iconf=1 (5x,i5) 1 iwald compute Wald standard errors if iwald=1 (5x,i5) 0.10E-02 sfdrho perturbation to rho for numerical derivs. (e10.2) 0.95 siglev significance level, only 0.95 or 0.99 (f10.2) 0.50 sfac1 scale factor for confidence intervals (f10.2) 1.00 sfac2 scale factor for confidence intervals (f10.2) # Notes: # 0 < sfac1 < sfac2 # CONTROL PARAMETERS (user defined, must immediately precede parameters) spot pid Project identification, (a10) 10000 n Length of simulation, (i10) 500 n0 Length of initial stretch for the mean (i10) 100542 iseed Seed for simulations # PARAMETERS (read in as (e26.17,1x,i1), cols 29-78 copied by EMM) -0.18379900209938524E+00 1 avv = rho( 1) -0.82323923705791193E-02 1 avs = rho( 2) 0.17509326682702896E-01 1 as = rho( 3) -0.35717783268136459E-02 1 ass = rho( 4) 0.72104605546044886E+00 1 b1v = rho( 5) 0.00000000000000000E+00 0 b1vv = rho( 6) -0.68035068733691292E-01 1 b1vs = rho( 7) 0.00000000000000000E+00 0 b2v = rho( 8) 0.38471676134492816E-01 1 b2s = rho( 9) -0.16908812459644075E-01 1 b2ss = rho(10) # # Parameters, numerical Wald standard errors, and tratios 1 -0.18379900 0.08405693 -2.18660145 2 -0.00823239 0.00716099 -1.14961577 3 0.01750933 0.00186409 9.39298253 4 -0.00357178 0.00036911 -9.67668359 5 0.72104606 0.24016457 3.00229990 6 0.00000000 0.00000000 7 -0.06803507 0.03861806 -1.76174248 8 0.00000000 0.00000000 9 0.03847168 0.00976754 3.93872697 10 -0.01690881 0.00407990 -4.14441591

34

# # Parameters and 95.00% approximate criterion-difference confidence intervals 1 -0.18379900 ( -0.28023365, -0.13919469) 2 -0.00823239 ( -0.01254523, 0.00180301) 3 0.01750933 ( 0.01322887, 0.02271958) 4 -0.00357178 ( -0.00432815, -0.00275375) 5 0.72104606 ( 0.50690289, 1.17434723) 6 0.00000000 7 -0.06803507 ( -0.14824226, -0.02796700) 8 0.00000000 9 0.03847168 ( 0.02521764, 0.04446538) 10 -0.01690881 ( -0.01901662, -0.01270112) # *************************************************************************** emm objective function value at final simulated data set *************************************************************************** chisquare( 8) = 14.797 zvalue = 1.699 icall = 405 Evaluated using score generator defined by the snp file 10414010.fit # *************************************************************************** sqrt(nobs) x mean score, unadjusted standard errors, and quasi-t-ratios *************************************************************************** : score: serror: tratio: label index A( 2): 0.51281: 1.01455: 0.505: A( 2) 0 1 A( 3): 4.00066: 3.19643: 1.252: A( 3) 1 0 A( 4): -0.92736: 3.08369: -0.301: A( 4) 1 1 A( 5): 1.75155: 5.55422: 0.315: A( 5) 2 0 A( 6): 1.31023: 5.58087: 0.235: A( 6) 2 1 A( 7): 11.25005: 13.20122: 0.852: A( 7) 3 0 A( 8): -9.10243: 13.05451: -0.697: A( 8) 3 1 A( 9): 35.84317: 30.93551: 1.159: A( 9) 4 0 A( 10): -2.69171: 30.40134: -0.089: A( 10) 4 1 psi( 1): 14.93410: 33.63084: 0.444: psi( 1) psi( 2): -7.81177: 27.20585: -0.287: psi( 2) tau( 1): 36.46224: 39.84975: 0.915: tau( 1) tau( 2): 2.18342: 1.23234: 1.772: tau( 2) tau( 3): 1.19037: 1.60446: 0.742: tau( 3) tau( 4): 0.17266: 1.15338: 0.150: tau( 4) tau( 5): 0.47694: 1.46183: 0.326: tau( 5) # *************************************************************************** sqrt(nobs) x mean score, adjusted standard errors, and t-ratios *************************************************************************** : score: serror: tratio: label index A( 2): 0.51281: 0.59057: 0.868: A( 2) 0 1 A( 3): 4.00066: 2.84495: 1.406: A( 3) 1 0 A( 4): -0.92736: 2.75101: -0.337: A( 4) 1 1 A( 5): 1.75155: 2.66018: 0.658: A( 5) 2 0 A( 6): 1.31023: 2.97132: 0.441: A( 6) 2 1 A( 7): 11.25005: 12.38794: 0.908: A( 7) 3 0 A( 8): -9.10243: 12.38595: -0.735: A( 8) 3 1 A( 9): 35.84317: 16.52886: 2.169: A( 9) 4 0 A( 10): -2.69171: 13.74580: -0.196: A( 10) 4 1 psi( 1): 14.93410: 23.91335: 0.625: psi( 1) psi( 2): -7.81177: 14.77546: -0.529: psi( 2) tau( 1): 36.46224: 23.66706: 1.541: tau( 1) tau( 2): 2.18342: 0.95312: 2.291: tau( 2) tau( 3): 1.19037: 1.39353: 0.854: tau( 3) tau( 4): 0.17266: 0.82791: 0.209: tau( 4) tau( 5): 0.47694: 1.25438: 0.380: tau( 5)

35

This output suggests success. The speci cation of the SDE accounts for the full complexity of the data as de ned by the 10414010.fit SNP model. Note the adjusted t-ratios on the mean SNP scores, which are either right around 2.0 in a few cases and otherwise well below 2.0.

5.5 Changing the Length of the Simulation
The preceding runs employ N = 10; 000; net, as the simulation length after N0 = 500 are discarded to let transients die out. These lengths are useful for testing purposes, because answers are available quickly, but they are probably too short for serious work. We nd that generally the computations stabilize with simulation length N in the range of 30,000{50,000, and sometimes as large as 100; 000; though 10,000 is quite useful for initial exploration of the objective function. It is advisable to use larger values for n0 as well. As an example of estimation with N = 50; 000 and N0 = 1000; we copy parm0.in the le parm2.in, and we edit the le so it reads:
# # This parmfile was written by EMM Version 1.5 # EMM CONTROL FILES (required, read by EMM routines) 10414000.fit score generator file (a12) scratch0.dat scratch file (a12) scratch1.dat second scratch file (a12) # OPTIMIZATION DESCRIPTION (required) 1.5 filver EMM Version of input file (5x,f5.1) 1 iopt iopt=1, call npsol for optimization (5x,i5) 400 itmax maximum number of iterations for NPSOL (5x,i5) 0.100E-03 tolemm convergence tolerance for NPSOL (e10.3) # INFERENCE DESCRIPTION (required) 1 iconf compute confidence intervals if iconf=1 (5x,i5) 1 iwald compute Wald standard errors if iwald=1 (5x,i5) 0.10E-05 sfdrho perturbation to rho for numerical derivs. (e10.2) 0.95 siglev significance level, only 0.95 or 0.99 (f10.2) 0.50 sfac1 scale factor for confidence intervals (f10.2) 1.00 sfac2 scale factor for confidence intervals (f10.2) # Notes: # 0 < sfac1 < sfac2 # CONTROL PARAMETERS (user defined, must immediately precede parameters) spot pid Project identification, (a10) 50000 n Length of simulation, (i10) 500 n0 Length of initial stretch for the mean (i10) 100542 iseed Seed for simulations # PARAMETERS (read in as (e26.17,1x,i1), cols 29-78 copied by EMM) 0.00000000000000000E+00 0 avv = rho( 1)

36

0.00000000000000000E+00 0.10000000000000000E+02 -0.12000000000000000E+01 0.00000000000000000E+00 0.00000000000000000E+00 0.00000000000000000E+00 0.00000000000000000E+00 0.11000000000000000E+00 0.00000000000000000E+00

0 1 1 0 0 0 0 1 0

avs as ass b1v b1vv b1vs b2v b2s b2ss

= = = = = = = = =

rho( 2) rho( 3) rho( 4) rho( 5) rho( 6) rho( 6) rho( 8) rho( 9) rho(10)

We also edit emmcntl.dat to read
parm2.in parm2.out emm input and output files (a12,1x,a12)

Running the job gives the results
# # This parmfile was written by EMM Version 1.5 # EMM CONTROL FILES (required, read by EMM routines) 10414000.fit score generator file (a12) scratch0.dat scratch file (a12) scratch1.dat second scratch file (a12) # OPTIMIZATION DESCRIPTION (required) 1.5 filver EMM Version of input file (5x,f5.1) 1 iopt iopt=1, call npsol for optimization (5x,i5) 400 itmax maximum number of iterations for NPSOL (5x,i5) 0.100E-03 tolemm convergence tolerance for NPSOL (e10.3) # INFERENCE DESCRIPTION (required) 1 iconf compute confidence intervals if iconf=1 (5x,i5) 1 iwald compute Wald standard errors if iwald=1 (5x,i5) 0.10E-05 sfdrho perturbation to rho for numerical derivs. (e10.2) 0.95 siglev significance level, only 0.95 or 0.99 (f10.2) 0.50 sfac1 scale factor for confidence intervals (f10.2) 1.00 sfac2 scale factor for confidence intervals (f10.2) # Notes: # 0 < sfac1 < sfac2 # CONTROL PARAMETERS (user defined, must immediately precede parameters) spot pid Project identification, (a10) 50000 n Length of simulation, (i10) 500 n0 Length of initial stretch for the mean (i10) 100542 iseed Seed for simulations # PARAMETERS (read in as (e26.17,1x,i1), cols 29-78 copied by EMM) 0.00000000000000000E+00 0 avv = rho( 1) 0.00000000000000000E+00 0 avs = rho( 2) 0.11833907053411373E+02 1 as = rho( 3) -0.12391987986844748E+01 1 ass = rho( 4) 0.00000000000000000E+00 0 b1v = rho( 5) 0.00000000000000000E+00 0 b1vv = rho( 6) 0.00000000000000000E+00 0 b1vs = rho( 6) 0.00000000000000000E+00 0 b2v = rho( 8) 0.12046246962385301E+00 1 b2s = rho( 9) 0.00000000000000000E+00 0 b2ss = rho(10) #

37

# Parameters, numerical Wald standard errors, and tratios 1 0.00000000 0.00000000 2 0.00000000 0.00000000 3 11.83390705 3.35316783 3.52917231 4 -1.23919880 0.31488927 -3.93534778 5 0.00000000 0.00000000 6 0.00000000 0.00000000 7 0.00000000 0.00000000 8 0.00000000 0.00000000 9 0.12046247 0.01433825 8.40147854 10 0.00000000 0.00000000 # # Parameters and 95.00% approximate criterion-difference confidence intervals 1 0.00000000 2 0.00000000 3 11.83390705 ( 5.84376743, 15.95064494) 4 -1.23919880 ( -1.60031538, -0.47224425) 5 0.00000000 6 0.00000000 7 0.00000000 8 0.00000000 9 0.12046247 ( 0.09405977, 0.14020523) 10 0.00000000 # *************************************************************************** emm objective function value at final simulated data set *************************************************************************** chisquare( 8) = 64.336 zvalue = 14.084 icall = 72 Evaluated using score generator defined by the snp file 10414000.fit # *************************************************************************** sqrt(nobs) x mean score, unadjusted standard errors, and quasi-t-ratios *************************************************************************** : score: serror: tratio: label index A( 2): -1.06979: 2.32436: -0.460: A( 2) 1 0 A( 3): -19.58263: 3.61643: -5.415: A( 3) 2 0 A( 4): -2.91350: 8.95079: -0.326: A( 4) 3 0 A( 5): -50.60068: 21.40209: -2.364: A( 5) 4 0 psi( 1): -13.53227: 40.18100: -0.337: psi( 1) psi( 2): 5.58156: 33.59981: 0.166: psi( 2) tau( 1): -163.44333: 40.10458: -4.075: tau( 1) tau( 2): -2.20549: 0.95037: -2.321: tau( 2) tau( 3): -2.74585: 1.16033: -2.366: tau( 3) tau( 4): -3.66320: 0.90336: -4.055: tau( 4) tau( 5): -2.48093: 1.21942: -2.035: tau( 5) # *************************************************************************** sqrt(nobs) x mean score, adjusted standard errors, and t-ratios *************************************************************************** : score: serror: tratio: label index A( 2): -1.06979: 1.66686: -0.642: A( 2) 1 0 A( 3): -19.58263: 3.07842: -6.361: A( 3) 2 0 A( 4): -2.91350: 7.03234: -0.414: A( 4) 3 0 A( 5): -50.60068: 17.98232: -2.814: A( 5) 4 0 psi( 1): -13.53227: 38.67529: -0.350: psi( 1) psi( 2): 5.58156: 28.73882: 0.194: psi( 2) tau( 1): -163.44333: 39.65297: -4.122: tau( 1) tau( 2): -2.20549: 0.81996: -2.690: tau( 2) tau( 3): -2.74585: 1.03436: -2.655: tau( 3) tau( 4): -3.66320: 0.67138: -5.456: tau( 4) tau( 5): -2.48093: 0.99804: -2.486: tau( 5)

38

This answer is more accurate, though also more costly to compute. Apart from a xed time cost at the front end, the run time is basically linear in the gross simulation length N0 + N:

39

6 Troubleshooting, Numerical Stability, and Convergence Problems
On the whole, the EMM package is useful and practical. An early version was used for estimating asset pricing models (Bansal et al, 1993, 1995). Recent versions have been used in several di usion applications including Gallant and Long (1997), Gallant and Tauchen (1998), Dai and Singleton (1999), Tauchen (1997), among others. Things can go awry, however. Sometimes, the program may stop prematurely, and there are some key issues of dynamic and numerical stability that the user must be attentive to. These issue a ect the speed of the computations and relate to convergence problems in the nonlinear optimization. The following subsections discuss these issues.

6.1 Examine detail.dat
Sometimes the program may stop abruptly and produce no output parameter le or anomalous looking results. Often, the problem lies with the SNP parameter settings. For example, if the simulation size n is increased, then the SNP parameter mdata may have to be increased in order for SNP to accommodate the larger simulated sample size. The le detail.dat, which is the SNP output le, will report the problem and give an indication of how to x it. Generally, it is a good idea always to view detail.dat in the early debugging stages, as that le contains a detailed report on the evaluation of the score generator.

6.2 Problems with Standard Errors and Con dence Intervals
In some applications, the EMM package can have trouble computing standard errors and/or the con dence intervals based on inverting the criterion function. Problems with standard errors can be addressed by adjusting the scale factor sfdrho. In order to compute standard errors, the package uses numerical derivatives to obtain the Jacobian matrix of the score vector with respect to . To do so, it perturbs ~i as
#=
i

~i + max( j ~ij; )

where is the scale factor sfdrho in the parm le. The package evaluates the score vector with the ith element perturbed to # and forms the appropriate di erence quotients. This i 40

step is repeated for i=1,2,... lrho in order to build up the Jacobian matrix. In some cases, the scale factor sfdrho might be too large, generating a NaN or Inf for standard errors on some parameters, or it might be too small, generating a zero value for standard errors on some parameters. In such cases, the user will need to experiment with sfdrho. Since the same value of sfdrho applies to all parameters, some handiwork might be needed with di erent input parm les used for di erent parameters. Some uses nd that the standard errors are somewhat sensitive to the value of sfdrho. We suggest that if the problem is suitable scaled so that all parameters are of roughly the same order of magnitude | we try to scale all parameters to lie in the interval (-1,1) | then these problems can be mitigated. This is clearly a topic for more research. Problems with the con dence intervals can be addressed by adjusting the scale factors sfac1 and sfac2 in the input parameter le. As described in Subsection 4.3 above, in doing the computations for the con dence interval the package perturbs each parameter i by sfac1 and sfac2 Wald standard deviations and evaluates the objective function. For some problems, the default values of sfac1 and sfac2 in the EMM distribution might be way too large and numerical problems result. The user will need to reduce the scale factors accordingly. We have had to go as small as sfac1=0.01 sfac1=0.03 in some applications.

6.3 Dynamic Stability of the Score Generator
Dynamic stability in this context refers to the long-run properties of a dynamic model. A dynamically stable model is nonexplosive, i.e., stationary and ergodic. An unstable model is explosive; simulated trajectories diverge. Stability is likely to be a serious issue when dealing with levels data like nominal interest rates or nancial prices, and, in particular, when tting di usion models to such data. These series are extremely persistent in conditional mean and conditional variance. Stability must be considered for both the score generator and the underlying structural model, because estimated transition dynamics can potentially contain embedded instabilities. This is the nonlinear analogue of the unfortunate happenstance of a tted linear AR model containing a root just outside the unit circle. For reasons discussed at length in Tauchen (1997, 1998), it is extremely important that the score generator for EMM estimation itself be dynamically stable. Simulations from it 41

should not be explosive. If the score generator is dynamically unstable, then its scores incorporate that instability, and the numerical computations for the EMM optimization become unstable due to an ill-behaved objective function. One can expect false local optima in both the stable and unstable regions of the parameter space. (See the discussion of Figure 1 of Tauchen (1998)). For these reasons, Andersen and Lund (1997a) go to great length to verify the dynamic stability of their generalized E-GARCH-SNP models and, in fact, choose E-GARCH over GARCH as the base model for reasons for dynamic stability. Interestingly, though, the EMM method enforces stability on the underlying structural model so long as the score generator is dynamically stable (Tauchen, 1997b). The reason is that any parameter con guration that implies an explosive trajectory for simulated data will necessarily generate a very high value of the EMM objective function. The objective function has a built-in instability penalty subject to the caveat about stability of the score generator. The SNP package incorporates a spline transformation feature that directly enforces dynamic stability on the score generator. This feature is discussed at length in the SNP User's Guide (Gallant and Tauchen, 2000). The spline transformation only a ects the conditioning variable xt?1 in the conditional density f (ytjxt?1; ); it has no e ect on yt and it is not a pre ltering of the data. All the spline does is force a very gentle sort mean reversion so that (@=@ ) log f (^ jx ?1; )] remains well de ned should the optimizer happen y ^ to pass back a parameter vector such that the simulation fy ( ); x ?1( )g is explosive. ^ ^ The spline should be set for the particular application. This is done in the TRANSFORM DESCRIPTION section of the SNP input le. For example, for estimating the interest rate di usion of Section 5 the TRANSFORM DESCRIPTION section of the input le s1414000.in0 is
TRANSFORM DESCRIPTION (required) 0 Read or impute mustat, cstat, and pstat if icstat=1, (5x,i5) 1 The computed scale transform is diagonal if idiag=1, (5x,i5) -1 No x transform if itran=0, spline if -1, logistic if 1, (5x,i5) 0.400E+01 Inflection point of transform in standardized x, stran, (e10.3)

In the above, the setting of itran=-1 selects the spline transformation which, as noted, is highly recommended for a very persistent series. The in ection point is the parameter tr 42

described in the SNP User's Guide. Setting tr = 4:0 means that the spline transformation takes e ect only 4:0 sample standard deviations beyond the mean of the data. This choice barely a ects the SNP parameter estimates, as nearly all data lie within 4:0 standard deviations of the mean. It does, however, provides protection should the simulator generate an explosive series extending well beyond 4:0 sample standard deviations. The spline transformation should mitigate generation of NaN's, which can greatly slow down computations on a workstation and even halt computations on a PC. For series that are nearly iid; e.g., stock returns series, we recommend using the logistic transformation instead of the spline transformation. As can been seen by inspecting the le 20014000.fit used for the stochastic volatility example of Section 4, the logistic transformation is selected via setting itran=1, and the in ection point is set as tr = 2:0; the recommended default value for the logistic transformation. As explained in the SNP User's Manual, the logistic really serves a di erent purpose than the spline. The logistic prevents large elements of xt?1 from unduly in uencing the conditional variance computation. Users are, of course, free to try alternative values of the in ection point parameter tr for either the spline or logistic. However, one should be certain that the same setting is used throughout the entire SNP speci cation search. If tr is altered, then the entire speci cation search should be recomputed from the most basic SNP model upwards. Doing so ensures the objective function values and BIC values are comparable across SNP ts.

6.4 Setting

0

As described in the SNP User's Guide, the basic SNP density takes the form n o P R?1 (y ? x); x ]2 nM (yj x; x) x R f (yjx; ) = P (s; x)]2 (s) ds where P (z; x) is a polynomial in z whose coe cients depend upon x: As noted by Qiang Dai of Stanford University, along a simulated trajectory fy ( )gN=1 it is possible that P (^ ; xt?1) ^ z ^ 0; where z = R?1 (^ ? x). This can cause severe numerical problems for computing ^ x y 1 (@=@ )f (^ jx ?1; ~n) y ^ (1) (@=@ ) log f (^ jx ?1; ~n)] = y ^ f (^ jx ?1; ~n) y ^ and lead to a numerically ill-behaved EMM objective function. This problem is mitigated at the observed data as the loglikelihood would be nearly ?1 and the QMLE estimate 43

~n would be modi ed accordingly. Along a simulation, however, the problem is potentially serious. The x, suggested by Qiang Dai and motivated by Gallant and Nychka (1987), is to rede ne the SNP density to

P R?1 (y ? x); x ]2 + 0 nM (yj x; x) x R f (yjx; ) = P (s; x)]2 (s) ds + 0
where 0 is a small positive number. In the current EMM distribution, 0 is set to 1.e-5, which seems to work well. We are experimenting with other values. This x actually a ects the nature of the SNP approximation. Our calculations suggest always maintaining 0 0:001.

n

o

6.5 Bullet Proo ng the DGP
Recall the basic structure of EMM as outlined in Subsection 1.2 above. The core component of the package is the user-supplied simulator that takes as input a candidate vector and generates a simulated realization. This component computes the mapping ! fy ( )gN=1: ^ The EMM Package evaluates the objective function ~ m0n( ; ~n)(In )?1mn( ; ~n) and uses NPSOL to optimize it with respect to : Our experience is that the optimizer sometimes tries outlandishly extreme values of ; especially in the initial phase of the optimization when it's acquiring information on functional form of the objective function. These outlandish values of could entail taking the logs or square roots of negative numbers, dividing by zero, or undertaking other operations that generate numerical exceptions, either within the user's simulator, within SNP (which evaluates to scores), or even within NPSOL itself. Our experience is that things proceed most smoothly when the user-supplied simulator can generates some kind of sensible simulated realization regardless of and be able to compute something for ! fy ( )gN=1 given arbitrary : We call this \bullet proo ng" the ^ code. However, sometimes it extremely di cult to bullet proof completely the simulator (especially for di usion models) and numerical exceptions occur that generate NaN's. On a 44

UNIX workstation, the Fortran compiler usually has produced an executable that can appropriately propagate the NaN's and the EMM objective function evaluates to either Inf or NaN. Typically, NPSOL can recover, as it realizes that the particular value of that led to the disaster is very unpromising and it tries another. The cost of this is that the program slows down considerably while handling the numerical exceptions along a very long simulated realization. On the other hand, on a PC running a Windows-95 Fortran, the numerical exceptions can cause the job to halt immediately and control to be passed back to the operating system. The PC user should try more bullet proo ng, better start values, and perhaps checking the Fortran documentation for compiler switches to set so that the executable can appropriately propagate the NaN's.

6.6 SNP Version Consistency
Starting with SNP version 8.7, GARCH was added as a feature of the conditional variance function. SNP parm les from version 8.7 are incompatible with SNP code from versions 8.6 and earlier, and the results of using an 8.7 parm le with 8.6 (or earlier) code are quite unpredictable. SNP itself is appropriately backwards compatible; version 8.7 code properly handles 8.6 and earlier parm les. The problem is the other direction. There are many earlier distributions of EMM built around SNP 8.6 or earlier code. These earlier EMM distributions cannot properly handle an SNP score generator le estimated with a later version of SNP. As of March 28, 2000, the EMM code checks that the version number of SNP that was used to estimate score generator does not exceed the version number of SNP used in making the emm executable. The program will immediately halt in this case, because the results will be in error. A fresh version of the EMM code must be downloaded. If, on the other hand, the version number of SNP that was used to estimate score generator pre-dates that built into the emm executable, then the program issues a warning message and proceeds. Sound practice would be to update the score generator le using the most recent version of SNP.

45

7 References
Andersen, Torben G. (1994), \Volatility," Mathematical Finance. Andersen, Torben G. and Jesper Lund (1997a), \Estimating Continuous-time Stochastic Volatility Models of the Short Term Interest Rate," Journal of Econometrics, 77, 343{ 378. Andersen, Torben G. and Jesper Lund (1997b), \Stochastic Volatility and Mean Drift in the Short Term Interest Rate Di usion: Implications for the Yield Curve," manuscript, Northwestern University. Andrews, D. W. K. (1991), \Heteroskedasticity and Autocorrelation Consistent Covariance Matrix Estimation," Econometrica 59, 307{346. Bansal, R., A. R. Gallant, R. Hussey & G. Tauchen (1993) Computational aspects of nonparametric simulation estimation. In D. A. Belsley (ed.) Computational Techniques for Econometrics and Economic Analysis, pp. 3{22. Boston: Kluwer Academic Publishers. Bansal, R., A. R. Gallant, R. Hussey, and G. Tauchen (1995), \Nonparametric Estimation of Structural Models for High-Frequency Currency Market Data," Journal of Econometrics, 66, 251{287.. Clark, P. K. (1973), \A Subordinated Stochastic Process Model with Finite Variance for Speculative Prices," Econometrica 41, 135{56. Chernov, Michael, A. Ronald Gallant, Eric Ghysels, and George Tauchen (1999), \A New Class of Stochastic Volatility Models with Jumps: Theory and Estimation," Working paper, Pennsylvania State University. Dai, Qiang, and Kenneth J. Singleton (1999), \Speci cation Analysis of A ne Term Structure Models," Working paper, Stanford University. Du e, Darrell, and Kenneth J. Singleton (1993), \Simulated Moments Estimation of Markov Models of Asset Prices," Econometrica 61, 929{952. 46

Engle, R. F. (1982), \Autoregressive Conditional Heteroskedasticity with Estimates of the Variance of United Kingdom In ation," Econometrica 50, 987{1007. Gallant, A. Ronald, David A. Hsieh, and George E. Tauchen (1991), \On Fitting a Recalcitrant Series: The Pound/Dollar Exchange Rate, 1974{83," in William A. Barnett, James Powell, George E. Tauchen, eds. Nonparametric and Semiparametric Methods in Econometrics and Statistics, Proceedings of the Fifth International Symposium in Economic Theory and Econometrics, Cambridge: Cambridge University Press, Chapter 8, pp. 199{240. Gallant, A. Ronald, David A. Hsieh, and George Tauchen (1997), \Estimation of Stochastic Volatility Models with Diagnostics," Journal of Econometrics Vol 81, No. 1, pp. 159{ 192. Gallant, A. Ronald and Jonathan R. Long (1997), \Estimating Stochastic Di erential Equations E ciently by Minimum Chi-Square", Biometrika, 84, 125{141. Gallant, A. Ronald, and Douglas W. Nychka (1987), \Seminonparametric Maximum Likelihood Estimation," Econometrica 55, 363{390. Gallant, A. Ronald, Peter E. Rossi, and George Tauchen (1993), \Nonlinear Dynamic Structures," Econometrica 61, 871{907. Gallant, A. Ronald, and George Tauchen (1989), \Seminonparametric Estimation of Conditionally Constrained Heterogeneous Processes: Asset Pricing Applications," Econometrica 57, 1091{1120. Gallant, A. Ronald, and George Tauchen (1992), \A Nonparametric Approach to Nonlinear Time Series Analysis: Estimation and Simulation," in David Brillinger, Peter Caines, John Geweke, Emanuel Parzen, Murray Rosenblatt, and Murad S. Taqqu eds. New Directions in Time Series Analysis, Part II. New York: Springer-Verlag, 71-92. Gallant, A. Ronald, and George Tauchen (1996a), \Which Moments to Match," Econometric Theory 12, 657{681. 47

Gallant, A. Ronald, and George Tauchen (1996b), \Speci cation Analysis of Continuous Time Models in Finance," in P. E. Rossi (ed.), Modeling Stock Market Volatility: Bridging the Gap to Continuous Time (New York: Academic Press, 1996b). Gallant, A. Ronald, and George Tauchen (1997), \Estimation of Continuous Time Models for Stock Returns and Interest Rates," Macroeconomic Dynamics, Vol. 1, No. 1, 135{168. Gallant, A. Ronald, and George Tauchen, \Reprojecting Partially Observed Systems with Application to Interest Rate Di usions," Journal of the American Statistical Association 93 (1998), 10{24. Gallant, A. Ronald, and George Tauchen (2000), \SNP: A Program for Nonparametric Time Series Analysis, Version 8.7, User's Guide," Working paper, University of North Carolina at Chapel Hill. Available along with code and worked example by anonymous ftp at site ftp.econ.duke.edu in directory pub/arg/snp. Gill, Phillip E., Walter Murray, Michael A. Saunders, and Margaret H. White (1983), \User's Guide for SOL/NPSOL: A Fortran Package for Nonlinear Programming," Systems Optimization Laboratory, Department of Operations Research, Stanford University, Technical Report Number SOL 83-12. Gourieroux, C., A. Monfort, and E. Renault (1993), \Indirect Inference," Journal of Applied Econometrics 8, S85{S118. Hansen, L. P. (1982), Large Sample Properties of Generalized Method of Moments Estimators. Econometrica 50, 1029{1054. Jacquier, E., Polson, N. G., and P. E. Rossi (1994); \Bayesian Analysis of Stochastic Volatility Models," Journal of Business and Economic Statistics, 12, 371{388. Kloeden, Peter E. and Eckhard Platen (1992), Numerical Solution of Stochastic Di erential Equations. New York: Springer-Verlag.

48

McFadden, D. (1989), A Method of Simulated Moments for Estimation of Discrete Response Models Without Numerical Integration. Econometrica 57, 995{1026. Nelson, D. (1991), \Conditional Heteroskedasticity in Asset Returns: A New Approach," Econometrica 59, 347{370. Newey, W. (1985), \Conditional Moment Speci cation Testing," Econometrica 53, 1047{ 1071. Pakes, A. and D. Pollard (1989), \Simulation and the Asymptotics of Optimization Estimators," Econometrica 57, 1027{1058. Potscher, B. M. (1989), \Model Selection Under Nonstationarity: Autoregressive Models and Stochastic Linear Regression Models," Annals of Statistics 17, 1257{1274. Schwarz, G. (1978), \Estimating the Dimension of a Model," Annals of Statistics 6, 461{ 464. Smith, A. A. (1993), \Estimating Nonlinear Time Series Models Using Simulated Vector Autoregressions," Journal of Applied Econometrics, 8, S63{S84. Tauchen, George (1985), \Diagnostic Testing and Evaluation of Maximum Likelihood Models," Journal of Econometrics 30, 415{443. Tauchen, George (1997), \New Minimum Chi-Square Methods in Empirical Finance," in Advances in Econometrics, Seventh World Congress, eds. D. Kreps, and K. Wallis, Cambridge UK: Cambridge University Press, 279{317. Tauchen, George (1998), The Objective Function of Simulation Estimators Near the Boundary of the Unstable Region of the Parameter Space,\ Review of Economics and Statistics 389{398. Tauchen, George, and Robert Hussey (1991); \Quadrature-Based Methods for Obtaining Approximate Solutions to Nonlinear Asset Pricing Models," Econometrica 59, 371{396. Tauchen, George and Mark Pitts (1983), \The Price Variability-Volume Relationship on Speculative Markets," Econometrica 51, 485{505. 49




友情链接: 时尚网 总结汇报 幼儿教育 小学教育 初中学习资料网