我有的日度收益率dr,现在想用GARCH计算月度波动率,如下计算对么?
而且如何提取我想要的波动率啊
variance.model = list(model = "GARCH", garchOrder = c(1, 1),submodel = NULL, external.regressors = NULL, variance.targeting = FALSE)
variance.model()
myspec=ugarchspec(
variance.model = list(model = "sGARCH", garchOrder = c(1, 1), submodel = NULL, external.regressors = NULL, variance.targeting = FALSE),
mean.model = list(armaOrder = c(1, 1), include.mean = TRUE, archm = FALSE, archpow = 1, arfima = FALSE, external.regressors = NULL, archex = FALSE),
distribution.model = "norm"
)
garch_daylireturn<-data.frame(date=dr$date1,return=dr$return)
garch_daylireturn<- zoo(garch_daylireturn$return, order.by=as.Date(as.character(garch_daylireturn$date), format='%Y-%m-%d'))
garch_result=ugarchfit(myspec,data=garch_daylireturn,solver="solnp")