[R-SIG-Finance] UGARCHSIM

Francesco Mantovani francesco_mantovani at ymail.com
Thu Jun 18 15:55:22 CEST 2015


Hello, I'm trying to simulate with ugarchsim a AR(3)-GARCH(1,1) process with external regressors in conditional mean.The external regressors I used in ugarchfit are 2 vectors, each of size 2920-by-1, namely sm[,1] and sm[,2]. I tried to include them into ugarchsim via mexsimdata, but I always get:

Error in .simregressors(model, mexsimdata, vexsimdata, N, n, m.sim, m) : ugarchsim-->error: mexsimdata should be a list of length m.sim
I tried to list them as well, but it does not work. I tried the following commands:
sim=ugarchsim(fit,n.sim=2920,m.sim=2,mexsimdata=(sm[,1],sm[,2]))sim=ugarchsim(fit,n.sim=2920,m.sim=2,mexsimdata=c(sm[,1],sm[,2]))
sim=ugarchsim(fit,n.sim=2920,m.sim=2,mexsimdata=list(c(sm[,1],sm[,2]))sim=ugarchsim(fit,n.sim=2920,m.sim=2,mexsimdata=as.list(sm[,1],sm[,2]))sim=ugarchsim(fit,n.sim=2920,m.sim=2,mexsimdata=as.list(c(sm[,1],sm[,2]))sim=ugarchsim(fit,n.sim=2920,m.sim=2,mexsimdata=sm[,1])
sim=ugarchsim(fit,n.sim=2920,m.sim=2,mexsimdata=c(list(sm[,1],sm[,2]))...etc.
Please help me out.Thank you for your kind cooperation and best regards

	[[alternative HTML version deleted]]



More information about the R-SIG-Finance mailing list