-1
我想通过使用mgarchBEKK pachage来估计BEKK Garch模型,这是可用的here。如何在R中使用mgarchbekk包?
library(quantmod)
library(rugarch)
library(mgarchBEKK)
eps<- read.csv("C.csv", header=TRUE)
> head(eps)
v1 v2
1 -0.001936598 0.001968415
2 -0.000441797 -0.002724438
3 0.003752762 -0.010221719
4 -0.004511632 -0.014637860
5 -0.001426905 0.010597786
6 0.007435739 -0.005880712
> tail(eps)
v1 v2
1954 -0.043228944 0.0000530712
1955 0.082546871 -0.0028188110
1956 0.025058992 0.0058264010
1957 0.001751445 -0.0298050150
1958 -0.007973320 -0.0037243560
1959 -0.005207348 0.0012664230
## Simulate a BEKK process:
simulated <- simulateBEKK(2,1959, c(1,1), params = NULL)
## Prepare the input for the estimation process:
simulated1 <- do.call(cbind, simulated$eps)
## Estimate with default arguments:
estimated <- BEKK(simulated1)
H IS SINGULAR!...
H IS SINGULAR!...
Warning message:
In BEKK(simulated1) : negative inverted hessian matrix element
## Show diagnostics:
diagnoseBEKK(estimated)
## Likewise, you can estimate an mGJR process:
estimated2 <- mGJR(simulated[,1], simulated[,2])
我不知道,什么是我的代码的问题,因为它的结果是显示的,而不是2系列3968多个系列。