[R-SIG-Finance] understanding an error from ugarchfit

alexios ghalanos alexios at 4dscape.com
Wed Jul 16 10:22:46 CEST 2014


I can't replicate your error. All series converge without problem on:

> sessionInfo()
R version 3.1.0 (2014-04-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=English_United Kingdom.1252
[2] LC_CTYPE=English_United Kingdom.1252
[3] LC_MONETARY=English_United Kingdom.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United Kingdom.1252

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

other attached packages:
[1] zoo_1.7-11    rugarch_1.3-4

loaded via a namespace (and not attached):
 [1] DistributionUtils_0.5-1     expm_0.99-1.1
 [3] GeneralizedHyperbolic_0.8-1 grid_3.1.0
 [5] KernSmooth_2.23-12          ks_1.9.2
 [7] lattice_0.20-29             Matrix_1.1-4
 [9] misc3d_0.8-4                mvtnorm_1.0-0
[11] nloptr_1.0.0                numDeriv_2012.9-1
[13] parallel_3.1.0              Rcpp_0.11.2
[15] rgl_0.93.1098               Rsolnp_1.15
[17] SkewHyperbolic_0.3-3        spd_2.0-0
[19] truncnorm_1.0-7             xts_0.9-7


Provide your sessionInfo() so I might investigate further.

-Alexios


On 16/07/2014 09:00, Ole Bueker wrote:
> I have also encountered the error "Error in diag(fit$robust.cvar) : nonvalid
> 'nrow' value (too large or NA)" in my data analysis.
> 
> Here is the link to several time series, which all experience either the
> above error or the "failed to invest hessian" error, which seems to have a
> similar error source (non-convergence).
> 
> https://www.dropbox.com/s/ns6okxeib42syxo/NOT_WORKING.csv
> 
> 
> The reproducible code for this data is:
> 
> spreads <- read.zoo("NOT_WORKING.csv", header=TRUE, sep=",",
> format="%d-%m-%y")
> spreads <- na.locf(spreads)
> returns1 <- diff(log(spreads), 1)
> remove(spreads)
> returns_crisis <- window(returns1, start="2007-07-23", end="2009-01-30")
> returns_post <- window(returns1, start="2009-02-01", end="2014-05-12")
> 
> model<-ugarchspec(variance.model=list(model="sGARCH",garchOrder=c(1,1)),
> mean.model=list(armaOrder=c(1,0),include.mean=FALSE),distribution.model="ged")
> 
> model_crisis <- lapply(returns_crisis, ugarchfit, spec=model,
> solver="hybrid")
> model_post <- lapply(returns_post, ugarchfit, spec=model, solver="hybrid")
> 
> 
> I've tried playing around with adding constrains but was unable to find a
> solution (even using the hybrid solver).
> 
> 
> My original data contains about 100 additional time series (all covering the
> same period, however with more/less NA's depending on the company).
> However, these all converge without failure so I have not shared them (I can
> upload them if necessary).
> 
> 
> 
> 
> --
> View this message in context: http://r.789695.n4.nabble.com/understanding-an-error-from-ugarchfit-tp4684836p4694076.html
> Sent from the Rmetrics mailing list archive at Nabble.com.
> 
> _______________________________________________
> R-SIG-Finance at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions should go.
> 
>



More information about the R-SIG-Finance mailing list