if (FALSE) {
# Example COGARCH(1,1): the parameters are the same used in Haugh et al. 2005. In this case
# we assume the underlying noise is a symmetric variance gamma.
# As first step we define the COGARCH(1,1) in yuima:
mod1 <- setCogarch(p = 1, q = 1, work = FALSE,
measure=list(df="rbgamma(z,1,sqrt(2),1,sqrt(2))"),
measure.type = "code", Cogarch.var = "y",
V.var = "v", Latent.var="x",XinExpr=TRUE)
param <- list(a1 = 0.038, b1 = 0.053,
a0 = 0.04/0.053, x01 = 20)
# We generate a trajectory
samp <- setSampling(Terminal=10000, n=100000)
set.seed(210)
sim1 <- simulate(mod1, sampling = samp, true.parameter = param)
# We estimate the model
res1 <- gmm(yuima = sim1, start = param)
summary(res1)
}
Run the code above in your browser using DataLab