如何在R中模拟Arima-Garch模型?

时间:2016-11-01 12:31:46

标签: r statistics time-series jupyter-irkernel

我试图找到如何在R中模拟(即在均值模型中生成ARIMA和在方差模型中生成GARCh)。

我尝试在线搜索,但我只找到了如何使用

来安装这样的模型
spec <- 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", 
                                                                 start.pars = list(), 
                                                                 fixed.pars = list()
                    )

然后我写

garch <- ugarchfit(spec = spec, data = data, solver.control = list(trace=0))

这显然是合适的,而不是模拟即生成随机变量。

1 个答案:

答案 0 :(得分:1)

也许您正在寻找http://start/compare/art/CG%20110142/CG%20110142 函数,该函数将ugarchsim的结果作为输入。

查看this example