1
$\begingroup$

I have a GARCH model fitted on stock returns as:

spec=ugarchspec(variance.model=list(model="eGARCH", garchOrder=c(1,1)),
                mean.model=list(armaOrder=c(2,4), include.mean=TRUE), distribution.model="sstd",
                fixed.pars=list(mu=-0.0005079, ar1= -0.8562921,ar2=-0.9857075, ma1=0.8959524,ma2=0.9844128,ma3=0.0007078,
                                ma4=-0.0387716,omega=-0.0520487, alpha1=-0.0070554, beta1=0.9928413,gamma1=0.1154331,
                                shape=8.2996960,skew=2))

I have also filled a copula on two stocks (residuals from the GARCH) from which I simulate innovations with the copula dependence structure. I now want to use the innovations to feed in the GARCH model. Rugarch docs shows that I can do it with the ugarchspec method using the custom.dist option as shown

path1 <- ugarchpath(spec, n.sim=2800, n.start=1, m.sim=1, custom.dist = list(name=sim_4))

I am inputting sim_4 as a vector of innovations and getting the error:

path1 <- ugarchpath(spec, n.sim=2800, n.start=1, m.sim=1, custom.dist = list(name=sim_4))
Error in if (is.na(custom.dist$name) | is.na(custom.dist$distfit)[1]) { : 
  missing value where TRUE/FALSE needed
In addition: Warning messages:
1: In is.na(custom.dist$distfit) :
  is.na() applied to non-(list or vector) of type 'NULL'
2: In if (is.na(custom.dist$name) | is.na(custom.dist$distfit)[1]) { :
  the condition has length > 1 and only the first element will be used

I am using the rugarch library... anyone can help?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.