Vector ARMA Models The ZIP file contains the following files: vecarma.dll vecarma.lcg vecarma.src vecarma.e compx.dat compx.out The material in these files are in the public domain. And while the author disclaims any responsibility for the performance of this software, he would appreciate receiving any comments. Ron Schoenberg rons@Aptech.com June 21, 2000 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ vecarma.e Copy this file to the GAUSSHOME\examples subdirectory. This example file estimates the parameters of VARMA models using the Constrained Maximum Likelihood (CML) application module. If the time series is multivariate it first estimates a series of univariate models for start values. It assumes Normally distributed errors. This implementation also places the following constraints on the parameters, first, it constrains the residuals covariance matrix to be positive definite, and second, the roots of the determinantal equations det(I - AR_1 t - AR_2 t^2 - ... ) det(I + MA_1 t + MA_2 t^2 + ... ) to be outside the unit circle. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ compx.dat Copy this file to the GAUSSHOME\examples subdirectory. This file contains the close, overnight, and day movements in the NASDAQ COMP index from Jan 8, 1999 through Jan 5, 2000. It is used by vecarma.e. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ compx.out This file is the output from the execution of vecarma.e. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ vecarma.src Copy this file to the GAUSSHOME\src subdirectory. This contains GAUSS source code implementing the VARMA DLL. It contains two functions, one that returns the Normal log-likelihood function and the other that returns the computed residuals: /* **> vecarmall ** ** Purpose: computes Vector ARMA Normal log-likelihood ** ** Format: ll = vecarmall(w,phi,theta,Q); ** ** Input: w NxK matrix, time series ** ** phi K*PxK matrix, AR coefficient matrices ** ** theta K*QxK matrix, MA coefficient matrices ** ** Q KxK symmetric matrix, residual covariance matrix ** ** Output: LL scalar, value of log-likelihood */ /* **> vecarmares ** ** Purpose: computes Vector ARMA log-likelihood ** ** Format: res = vecarmares(w,phi,theta,Q); ** ** Input: w NxK matrix, time series ** ** phi K*PxK matrix, AR coefficient matrices ** ** theta K*QxK matrix, MA coefficient matrices ** ** Q KxK symmetric matrix, residual covariance matrix ** ** ** Output: res NxK matrix, residuals. */ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ vecarma.lcg Copy this file to the GAUSSHOME\lib subdirectory. This is the library file. Alternatively, enter the following command from GAUSS: lib -u -a gauss vecarma.src This will add vecarma.src and its procedure names to the gauss.lcg library file. When this is done you won't need to add the library vecarma to your command files. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ vecarma.dll Copy this file to the GAUSSHOME\dlib subdirectory This dll is a compilation of source code produced by Jose Alberto Mauricio of the Universidad Complutense de Madrid. It was published as Algorithm AS311 in Applied Statistics. Also described in "Exact maximum likelihood estimation of stationary vector ARMA models, JASA, 90:282-264. The following describes the arguments in the call to vecarmadll: dllcall vecarmadll(m,p,q,n,w,phi,theta,qq,atf,a,sigma2,xitol,logelf,f1,f2,retcode); m scalar, number of time series p scalar, number of AR lags q scalar, number of MA lags n scalar, length of series w nxm matrix, time series phi p*m+1xm matrix, AR parameters theta q*m+1xm matrix, MA parameters qq mxm matrix, covariance matrix atf scalar, set to 1 for calculation of residuals, else 0 a nxm matrix, residuals if atf = 1 sigma2 scalar, value of sigma squared xitol scalar, set to negative value for exact log-likelihood, else set to tolerance logelf scalar, on output set to value of log-likelihood f1 scalar, value of quadratic form (equation 2 in AS 311 paper) f2 scalar, det(Q)^n times the determinant of I+M'H'HM retcode scalar, return code 0 normal return 1 M < 1 2 N < 1 3 P < 0 4 Q < 0 5 P = 0 and Q = 0 7 floating point work space too small 8 integer work space too small 9 qq is not positive definite 10 AR parameters too close to stationarity boundary 11 model not stationary 12 model not invertible 13 I+M'H'HM not positive definite