Anyone tried the function input uGARCHmultifit of the dccfit function from rmgarch? If so can you provide an example of how you used it and how to setup the uGARCHmultifit object? I can't figure it out.
According to the documentation <https://www.rdocumentation.org/packages/rmgarch/versions/1.3-7/topics/dccfit-methods> it should be possible to use the fit argument in dccfit where * " fit: (A previously estimated univariate '>uGARCHmultifit object (see details)." I'd like to input my fits of several GARCH models directly into the final DCC estimation because the GARCH models where difficult to estimate (I used several optimizers). [[alternative HTML version deleted]] _______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-finance -- Subscriber-posting only. If you want to post, subscribe first. -- Also note that this is not the r-help list where general R questions should go. |
Take a look at the examples in the inst/rmgarch.tests folder of the source package or this post from 7+ years ago:
http://www.unstarched.net/2013/01/03/the-garch-dcc-model-and-2-stage-dccmvt-estimation/ -Alexios > On Nov 4, 2020, at 10:48 PM, [hidden email] wrote: > > Anyone tried the function input uGARCHmultifit of the dccfit function from rmgarch? If so can you provide an example of how you used it and how to setup the uGARCHmultifit object? I can't figure it out. > > According to the documentation <https://www.rdocumentation.org/packages/rmgarch/versions/1.3-7/topics/dccfit-methods> it should be possible to use the fit argument in dccfit where > > * " fit: (A previously estimated univariate '>uGARCHmultifit object (see details)." > > I'd like to input my fits of several GARCH models directly into the final DCC estimation because the GARCH models where difficult to estimate (I used several optimizers). > > > > > [[alternative HTML version deleted]] > > _______________________________________________ > [hidden email] mailing list > https://stat.ethz.ch/mailman/listinfo/r-sig-finance > -- Subscriber-posting only. If you want to post, subscribe first. > -- Also note that this is not the r-help list where general R questions should go. [[alternative HTML version deleted]] _______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-finance -- Subscriber-posting only. If you want to post, subscribe first. -- Also note that this is not the r-help list where general R questions should go. |
Thanks Alexios for providing me references to examples. However, I’m not able to add a fit to the multifit object. How can I do this? See example below
library(rmgarch) library(parallel) data(dji30retw) Dat = dji30retw[, 1:10, drop = FALSE] # Ten-asset example from http://www.unstarched.net/2013/01/03/the-garch-dcc-model-and-2-stage-dccmvt-estimation/ # (1) Replicate example xspec = ugarchspec(mean.model = list(armaOrder = c(1, 1)), variance.model = list(garchOrder = c(1,1), model = 'sGARCH'), distribution.model = 'norm') uspec = multispec(replicate(10, xspec)) spec1 = dccspec(uspec = uspec, dccOrder = c(1, 1), distribution = 'mvnorm') cl = makePSOCKcluster(10) multf = multifit(uspec, Dat, cluster = cl) multf@fit fit1 = dccfit(spec1, data = Dat, fit.control = list(eval.se = TRUE), fit = multf, cluster = cl) fit1@mfit$matcoef # (2) subset of 9 assets. uspec9 = multispec(replicate(9, xspec)) cl9 = makePSOCKcluster(9) multf9 = multifit(uspec9, Dat[,1:9], cluster = cl9) multf9@fit # (3) Suppose we want to add an additional fit (imagine it was hard to estimate) fit10 <- ugarchfit(spec=xspec,data=Dat[,10],solver.control=list(trace=0)) multf10 <- multf9 multf10@fit[[10]] <- fit10 # to be used in dccfit(spec10, data = cbind(Dat[,1:9],Dat[,10]), fit.control = list(eval.se = TRUE), fit = multf10, cluster = cl) ## the last line does not seem to work: # Error in `colnames<-`(`*tmp*`, value = asset.names) # attempt to set 'colnames' on an object with less than two dimensions Thanks, Lasse From: Alexios Galanos <[hidden email]> Sent: 05 November 2020 08:16 To: [hidden email] Cc: [hidden email] Subject: Re: [R-SIG-Finance] dccfit (RMGARCH): using uGARCHmultifit Take a look at the examples in the inst/rmgarch.tests folder of the source package or this post from 7+ years ago: http://www.unstarched.net/2013/01/03/the-garch-dcc-model-and-2-stage-dccmvt-estimation/ -Alexios On Nov 4, 2020, at 10:48 PM, [hidden email] <mailto:[hidden email]> wrote: Anyone tried the function input uGARCHmultifit of the dccfit function from rmgarch? If so can you provide an example of how you used it and how to setup the uGARCHmultifit object? I can't figure it out. According to the documentation <https://www.rdocumentation.org/packages/rmgarch/versions/1.3-7/topics/dccfit-methods> it should be possible to use the fit argument in dccfit where * " fit: (A previously estimated univariate '>uGARCHmultifit object (see details)." I'd like to input my fits of several GARCH models directly into the final DCC estimation because the GARCH models where difficult to estimate (I used several optimizers). [[alternative HTML version deleted]] _______________________________________________ [hidden email] <mailto:[hidden email]> mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-finance -- Subscriber-posting only. If you want to post, subscribe first. -- Also note that this is not the r-help list where general R questions should go. [[alternative HTML version deleted]] _______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-finance -- Subscriber-posting only. If you want to post, subscribe first. -- Also note that this is not the r-help list where general R questions should go. |
Free forum by Nabble | Edit this page |