全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 R语言论坛
2007 2
2021-02-19
做ARMA-Garch,代码如下:
spec_m6 <- ugarchspec(variance.model = list(model = "sGARCH",
                                            garchOrder = c(1, 1),
                                            submodel = NULL,
                                            external.regressors = NULL,
                                            variance.targeting = FALSE),
                      mean.model     = list(armaOrder = c(0, 0),
                                            external.regressors = NULL),
                      distribution.model="sstd",
                      start.pars = list(),
                      fixed.pars = list())
garch_m6 <- ugarchfit(spec = spec_m6, data = m6, solver.control = list(trace=0))

运行结果出现警告:Warning message:
In .makefitmodel(garchmodel = "sGARCH", f = .sgarchLLH, T = T, m = m,  :
rugarch-->warning: failed to invert hessian

garch_m6结果出现空值:
> garch_m6

*---------------------------------*
*          GARCH Model Fit        *
*---------------------------------*

Conditional Variance Dynamics        
-----------------------------------
GARCH Model        : sGARCH(1,1)
Mean Model        : ARFIMA(0,0,0)
Distribution        : sstd

Optimal Parameters
------------------------------------
        Estimate  Std. Error  t value Pr(>|t|)
mu       -0.0016          NA       NA       NA
omega     0.0000          NA       NA       NA
alpha1    0.0000          NA       NA       NA
beta1     0.9990          NA       NA       NA
skew      1.0202          NA       NA       NA
shape    59.9998          NA       NA       NA

Robust Standard Errors:
        Estimate  Std. Error  t value Pr(>|t|)
mu       -0.0016          NA       NA       NA
omega     0.0000          NA       NA       NA
alpha1    0.0000          NA       NA       NA
beta1     0.9990          NA       NA       NA
skew      1.0202          NA       NA       NA
shape    59.9998          NA       NA       NA

failed to invert hessian
LogLikelihood : 523.7385

Information Criteria
------------------------------------
                    
Akaike       -5.1774
Bayes        -5.0784
Shibata      -5.1791
Hannan-Quinn -5.1373

Weighted Ljung-Box Test on Standardized Residuals
------------------------------------
                        statistic p-value
Lag[1]                  0.0004418  0.9832
Lag[2*(p+q)+(p+q)-1][2] 0.0710942  0.9404
Lag[4*(p+q)+(p+q)-1][5] 0.9238316  0.8767
d.o.f=0
H0 : No serial correlation

Weighted Ljung-Box Test on Standardized Squared Residuals
------------------------------------
                        statistic p-value
Lag[1]                     0.6589  0.4169
Lag[2*(p+q)+(p+q)-1][5]    0.8590  0.8907
Lag[4*(p+q)+(p+q)-1][9]    1.6704  0.9405
d.o.f=2

Weighted ARCH LM Tests
------------------------------------
            Statistic Shape Scale P-Value
ARCH Lag[3]    0.2434 0.500 2.000  0.6218
ARCH Lag[5]    0.2664 1.440 1.667  0.9491
ARCH Lag[7]    0.5410 2.315 1.543  0.9745
Error in t.default(grad) : 参数不是矩阵


请教大神是什么原因?怎么解决?
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2021-2-19 17:10:55
The documentation and vignette FAQs list a couple of options (please
read them). In order of likely importance:
1. Set  tol<delta (in solver.control).
2. Use scaling (in fit.control).
3. Set stationarity to FALSE (sometimes this creates problems with the
solver for some boundary cases).
4. Use an alternate solver(s) (there are many now included).
5. Change the default solver parameters.
6. Use starting values.
7. Check your data for extreme outliers or numbers of zeros.

In the next release I will provide a hybrid solver optimization strategy
to rotate among the available solvers when this happens.

-Alexios

On 18/09/2012 16:57, Serdar Neslihanoglu wrote:
>
> My code: spec<-ugarchspec(variance.model = list(model = "sGARCH", garchOrder = c(1, 1),
submodel = "Null", external.regressors = NULL, variance.targeting = FALSE),
mean.model = list(armaOrder=c(0,0),include.mean =FALSE, archm = FALSE,
archpow = 1,
arfima = FALSE, external.regressors = NULL, archex = FALSE),
distribution.model = "norm",
start.pars = list(), fixed.pars = list())

ugarchfit(spec, X2, out.sample = 0, solver = "solnp", solver.control =
list(trace = TRUE, tol=1e-4, delta=1e-8),
fit.control = list(stationarity = 1, fixed.se = 0, scale=0))

I got this error massage In .makefitmodel(garchmodel = "sGARCH", f =
.sgarchLLH,  ... :
rugarch-->warning: failed to invert hessian I think rugarch is not
converge the result properly.

Please let me know how to deal with this problem. Regards, Serdar   
> [[alternative HTML version deleted]]
>
> _______________________________________________
> [hidden email] 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.
>

_______________________________________________
[hidden email] 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.
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2022-10-26 13:53:40
卖笑有 发表于 2021-2-19 17:10
The documentation and vignette FAQs list a couple of options (please
read them). In order of likel ...
您好,请问这个问题你解决了吗,求教
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群