[R-SIG-Finance] ugarchfit: Error in temp$h : $ operator is invalid for atomic vectors

FAKIR CHARLES fakir.charles.780 at student.lu.se
Fri May 27 21:57:24 CEST 2016


Hi Alexios,

I hope you can let me know how to solve this issue:
> #     Specify GARCH model
> spec1=ugarchspec(variance.model=list(model="sGARCH", garchOrder =c(0,1)),
+ mean.model=list(armaOrder=c(0,0)))
> fit1=ugarchfit(data=close.djdr,spec=spec1)
Warning message:
In .sgarchfit(spec = spec, data = data, out.sample = out.sample,  :
ugarchfit-->warning: solver failer to converge.

This one is particularly perplexing as I did not get this error prior to
updating my system as suggested on this forum during 2014.

> #     Specify GARCH model including external regressor:
> spec1X=ugarchspec(variance.model=list(model="sGARCH", garchOrder =c(0,1),
+ external.regressors = train.xreg),
+ mean.model=list(armaOrder=c(0,0)))
> fit1X=ugarchfit(data=close.djdr,spec=spec1X)
Error in temp$h : $ operator is invalid for atomic vectors
In addition: Warning message:
In .makefitmodel(garchmodel = "sGARCH", f = .sgarchLLH, T = T, m = m,  :
rugarch-->warning: failed to invert hessian

This was my original problem that I tried to resolve by following the
advise below.

According to this link:
http://stackoverflow.com/questions/23299684/r-error-in-xed-operator-is-invalid-for-atomic-vectors,
I should change to a dataframe, but this should not be the case because xts
object is allowed. Did not act on this information.

According to this post:
http://r.789695.n4.nabble.com/understanding-an-error-from-ugarchfit-td4684836.html#a4694082,
I should update my system which I did:
> sessionInfo()
R version 3.3.0 (2016-05-03)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.11.4 (El Capitan)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

other attached packages:
 [1] fxregime_1.0-3                vars_1.5-2
lmtest_0.9-34
 [4] urca_1.2-9                    strucchange_1.5-1
sandwich_2.3-4
 [7] MASS_7.3-45                   tseries_0.10-35
forecast_7.1
[10] timeDate_3012.100             xlsx_0.5.7
xlsxjars_0.6.1
[13] rJava_0.9-8                   rmgarch_1.3-0
rugarch_1.3-6
[16] FinTS_0.4-5                   car_2.1-2
quantmod_0.4-5
[19] TTR_0.23-1                    PerformanceAnalytics_1.4.3541
xts_0.9-7
[22] zoo_1.7-13                    devtools_1.11.1

loaded via a namespace (and not attached):
 [1] rgl_0.95.1441               Rcpp_0.12.5
mvtnorm_1.0-5
 [4] lattice_0.20-33             digest_0.6.9
truncnorm_1.0-7
 [7] R6_2.1.2                    plyr_1.8.3
MatrixModels_0.4-1
[10] Bessel_0.5-5                pcaPP_1.9-60
httr_1.1.0
[13] ggplot2_2.1.0               curl_0.9.7
misc3d_0.8-4
[16] minqa_1.2.4                 SparseM_1.7
fracdiff_1.4-2
[19] nloptr_1.0.4                SkewHyperbolic_0.3-2
Matrix_1.2-6
[22] splines_3.3.0               lme4_1.1-12
bit_1.1-12
[25] munsell_0.4.3               numDeriv_2014.2-1
DistributionUtils_0.5-1
[28] mgcv_1.8-12                 nnet_7.3-12
Rsolnp_1.16
[31] multicool_0.1-9             expm_0.999-0
ff_2.2-13
[34] quadprog_1.5-5              codetools_0.2-14
withr_1.0.1
[37] GeneralizedHyperbolic_0.8-1 grid_3.3.0
nlme_3.1-127
[40] gtable_0.2.0                git2r_0.15.0
scales_0.4.0
[43] KernSmooth_2.23-15          spd_2.0-1
tools_3.3.0
[46] ks_1.10.3                   pbkrtest_0.4-6
colorspace_1.2-6
[49] memoise_1.0.0               quantreg_5.24

Regards
Kirro

	[[alternative HTML version deleted]]



More information about the R-SIG-Finance mailing list