-1
나는 BEKK Garch 모델을 사용하기 위해 mgarchBEKK pachage를 사용하여 계산하려고합니다.이 모델은 here입니다.R에서 mgarchbekk package를 사용하는 방법?
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 시리즈를 표시하기 때문입니다.