楼主: 卖笑有
1605 2

[问答] R语言ugarchfit警告warning: failed to invert hessian [推广有奖]

  • 0关注
  • 2粉丝

等待验证会员

本科生

96%

还不是VIP/贵宾

-

威望
0
论坛币
9 个
通用积分
5.0128
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
874 点
帖子
61
精华
0
在线时间
126 小时
注册时间
2020-2-10
最后登录
2023-4-2

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
做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) : 参数不是矩阵


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

扫码加我 拉你入群

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

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

关键词:garchFit warning Hessian UGARCH failed

沙发
卖笑有 发表于 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.

使用道具

藤椅
小小xiaoxx 发表于 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 ...
您好,请问这个问题你解决了吗,求教

使用道具

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-5-4 07:47