[R-SIG-Finance] Apparent bug in rmgarch

Josh Segal joshua.segal at gmail.com
Tue Jan 23 20:34:25 CET 2018


Hi Alexios (and others),

First, thank you for creating rmgarch, it's great.

I'm trying to generate simulations using dccsim from a spec, and find that
when I specify a single value for rseed, the simulation results are not
reproducible (that is, each run gives different results).  I can avoid this
issue by either using a fit instead of a spec or by specifying a vector of
m.sim rseeds.

I did some digging in the code, and found in rdcc-main.R:
For fit, line 1224: rseed = c(rseed, (1:m.sim)*(rseed+1))
For spec, line 1493: rseed = c(rseed, as.integer(runif(m.sim, 1,
Sys.time())))

I think this explains my results.  Seems like the latter is incorrect, and
should match the former, no?

Thanks very much,
Josh

	[[alternative HTML version deleted]]



More information about the R-SIG-Finance mailing list