## Not run:
# # Definition of the COGARCH(1,1) process driven by a Variance Gamma nois:
# param.VG <- list(a1 = 0.038, b1 = 0.053,
# a0 = 0.04/0.053,lambda = 1, alpha = sqrt(2), beta = 0, mu = 0,
# x01 = 50.33)
#
# cog.VG <- setCogarch(p = 1, q = 1, work = FALSE,
# measure=list("rngamma(z, lambda, alpha, beta, mu)"),
# measure.type = "code",
# Cogarch.var = "y",
# V.var = "v", Latent.var="x",
# XinExpr=TRUE)
#
# # Verify the stationarity and the positivity of th variance process
#
# test <- Diagnostic.Cogarch(cog.VG,param=param.VG)
# show(test)
#
# # Simulate a sample path
#
# set.seed(210)
#
# Term=800
# num=24000
#
# samp.VG <- setSampling(Terminal=Term, n=num)
#
# sim.VG <- simulate(cog.VG,
# true.parameter=param.VG,
# sampling=samp.VG,
# method="euler")
# plot(sim.VG)
#
# # Estimate the model
#
# res.VG <- gmm(sim.VG, start = param.VG, Est.Incr = "IncrPar")
#
# summary(res.VG)
#
# # Check if the estimated COGARCH(1,1) has a positive and stationary variance
#
# test1<-Diagnostic.Cogarch(res.VG)
# show(test1)
#
# # Simulate a COGARCH sample path using the estimated COGARCH(1,1)
# # and the recovered increments of underlying Variance Gamma Noise
#
# esttraj<-simulate(res.VG)
# plot(esttraj)
#
#
# ## End(Not run)
Run the code above in your browser using DataLab