[R-SIG-Finance] rounding in FGarch procedure

John Frain frainj at tcd.ie
Thu Nov 15 16:45:53 CET 2007


I have used garchFit to estimate several arma(p,q) garch(1,1) models .
 To check that I had understood the instructions I extracted

original series (x)
residuals (resid)
fit (xhat)
estimated variance (sigmasq)

and the coefficient estimates
omega
alpha1
beta1

I then tried to verify that

sigmasq = omega + alpha1 * (resid(-1))^2 +beta1 * sigmasq(-1)

In general I find a small error which looks to me to be too large and
in the to be due to rounding.  They also have the same sign throughout
the sample. (4967 daily observations).  A sample of the knd of results
that I am getting is below. Am I missing something or has anyone else
the same problem

Best Regards

John



> temp=cbind(fit4.ngarch at data$x,fit4.ngarch at residuals,fit4.ngarch at fitted,
+         fit4.ngarch at h.t,fit4.ngarch at sigma.t)
> colnames(temp) = c("x","resid","xhat","sigmasq","sigma")
> temp[1:10,]
               x      resid        xhat   sigmasq     sigma
 [1,] -3.2854337  0.0000000 -3.28543369 0.9483540 0.9738347
 [2,] -2.6706190 -1.5040106 -1.16660833 0.8644764 0.9297722
 [3,]  0.3662351  1.0271960 -0.66096087 0.9928236 0.9964053
 [4,] -1.8030495 -1.6765275 -0.12652202 0.9975101 0.9987543
 [5,]  1.1893279  1.5210782 -0.33175026 1.1582024 1.0761981
 [6,] -0.1981119 -0.2543172  0.05620530 1.2545135 1.1200507
 [7,]  0.6880319  0.7539935 -0.06596168 1.1382125 1.0668704
 [8,] -0.6580117 -0.6948362  0.03682448 1.0813582 1.0398837
 [9,] -3.8777101 -3.7420864 -0.13562371 1.0239515 1.0119049
[10,] -1.3002568 -0.6696918 -0.63056507 2.1796475 1.4763629
> fit4.ngarch at fit$coef
         mu         ar1         ma1       omega      alpha1       beta1
-0.04867703  0.34026902 -0.19710303  0.03442607  0.08919412  0.87542879
> omega = fit4.ngarch at fit$coef[["omega"]]
> alpha1 = fit4.ngarch at fit$coef[["alpha1"]]
> beta1 = fit4.ngarch at fit$coef[["beta1"]]
> nobs = length(temp[,1])
> error = omega + alpha1 * (temp[1:(nobs-1),2])^2 +beta1 * temp[1:(nobs-1),4]  - temp[2:nobs,4]
> error[1:10]
 [1] 0.0001660433 0.0001513575 0.0001738293 0.0001746498 0.0002027847
0.0002196475 0.0001992848 0.0001893304 0.0001792793 0.0003816252
>



-- 
John C Frain
Trinity College Dublin
Dublin 2
Ireland
www.tcd.ie/Economics/staff/frainj/home.htm
mailto:frainj at tcd.ie
mailto:frainj at gmail.com



More information about the R-SIG-Finance mailing list