R中的DCC GARCH:观察数

时间:2018-08-25 08:51:17

标签: r

我正在R中运行DCC GARCH模型。下面附有代码。

dfm3dr<-data.frame(lnm3dr,lnreer)

ug_spec<-ugarchspec(mean.model = list(armaOrder=c(0,0)), variance.model = 
list(model="sGARCH",garchOrder=c(1,1)), distribution.model = "sstd")
ugm3dr<-ugarchfit(spec=ug_spec,data=dfm3dr$lnm3dr)
ugm3dreer<-ugarchfit(spec=ug_spec,data=dfm3dr$lnreer)


uspec.m3dr<-multispec(replicate(2,ugarchspec(mean.model = 
list(armaOrder=c(0,0)), variance.model = 
list(model="sGARCH",garchOrder=c(1,1)))))
multif.m3dr<-multifit(uspec.m3dr,dfm3dr)

specm3dr<-dccspec(uspec = uspec.m3dr, robust=TRUE, lag.criterion="SC", 
model="DCC",dccOrder = c(1,1),distribution =  "mvnorm")
fitm3dr<-dccfit(specm3dr,data=dfm3dr, solver="lbfgs", fit.control = 
list(eval.se=TRUE), fit=multif.m3dr)

covm3dr_1<-rcov(fitm3dr)
corm3dr_1<-rcor(fitm3dr)
cor_m3dr__reer<-corm3dr_1[2,1,]
cor_lnm3d__lnreer<-ts(data=cor_m3d__reer, start = 1994, frequency = 4,end = 
2017, deltat = 1/12)

plot(cor_lnm3d__lnreer)

代码可完美运行200次观察。但是当我运行它们少于100次观察时,我会遇到以下错误

  ugm3dr<-ugarchfit(spec=ug_spec,data=dfm3dr$lnm3dr)
 **Warning message:
  In .sgarchfit(spec = spec, data = data, out.sample = out.sample,  : 
  ugarchfit-->waring: using less than 100 data
  points for estimation**


Warning messages:
 1: In .sgarchfit(spec = spec, data = data, out.sample = out.sample,  : 
ugarchfit-->waring: using less than 100 data
 points for estimation

2: In .sgarchfit(spec = spec, data = data, out.sample = out.sample,  : 
ugarchfit-->waring: using less than 100 data
points for estimation

.dccfit中的错误(spec = spec,data = data,out.sample = out.sample,Solver = Solver,:

dccfit->错误:函数至少需要100个数据  要运行的点

我想知道如何解决数据点可用性有限的问题。 预先感谢,

农药

0 个答案:

没有答案