0

It seems this issue's not been solved yet, isn't it?

Reproducible code:

install.packages('quantmod')
install.packages('rugarch')
require(quantmod)
getSymbols('GLD', from = '1950-01-01')
dx <- na.omit(ClCl(to.weekly(GLD)))
require(rugarch)
spec <- ugarchspec(variance.model = list(model = 'sGARCH', garchOrder = c(1,1)),
                   mean.model = list(armaOrder = c(1,0), include.mean = TRUE),
                   distribution.model = 'norm')
Residuals <- residuals(ugarchfit(spec = spec, data = dx))
tail(cbind(Residuals, dx))

Last command returns the following:

2013-04-11 -0.06094691                                    NA
2013-04-11          NA                           -0.05798050
2013-04-18 -0.06408317                                    NA
2013-04-18          NA                           -0.05890934
2013-04-22  0.00519109                                    NA
2013-04-22          NA                            0.01040821

No solutions found in this and this SO questions, I am sorry.

My sessionInfo():

> sessionInfo()
R version 3.0.0 (2013-04-03)
Platform: x86_64-w64-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=Italian_Italy.1252  LC_CTYPE=Italian_Italy.1252    LC_MONETARY=Italian_Italy.1252
[4] LC_NUMERIC=C                   LC_TIME=Italian_Italy.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] quantmod_0.4-0          TTR_0.22-0              xts_0.9-3               zoo_1.7-9              
[5] Defaults_1.1-1          rugarch_1.2-2           RcppArmadillo_0.3.810.0 Rcpp_0.10.3            

loaded via a namespace (and not attached):
 [1] grid_3.0.0         KernSmooth_2.23-10 ks_1.8.12          lattice_0.20-15    nloptr_0.8.9      
 [6] numDeriv_2012.9-1  parallel_3.0.0     Rsolnp_1.14        spd_1.9            tools_3.0.0       
[11] truncnorm_1.0-6
Community
  • 1
  • 1
Lisa Ann
  • 3,345
  • 6
  • 31
  • 42
  • 1
    This is a [known bug](https://r-forge.r-project.org/tracker/index.php?func=detail&aid=2710&group_id=118&atid=518). – Joshua Ulrich Apr 24 '13 at 22:54
  • 1
    A known bug with version 3.0 of R? @Lisa the dates in your example show Thursday as the end of a week (looks like there is a time zone issue). I am using 2.15.3 and after putting "Sys.setenv(TZ="UTC")" before the "getSymbols......" I get what I think are the correct values. – hvollmeier Apr 25 '13 at 16:59

0 Answers0