简体   繁体   中英

How to simulate Arima-Garch models in R?

I was trying to find how may I simulate (ie generate ARIMA in the mean model and a GARCh in the variance model) in R.

I tried searching online but I only found how to fit such a model using

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()
                    )

Then I write

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

This is obviously fitting and not simulating ie generating random variables.

Perhaps you're looking for the ugarchsim function which takes the result of ugarchfit as an input.

Check out this example .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM