Description Usage Arguments Value Author(s) Examples
The function returns the simulated sample paths of a COGARCH(1,1) process
1 |
parameters |
is an object of class |
increments |
is an object of class |
obstimes |
is a |
blocks |
is a |
nsim |
is a |
dt |
is a |
sigmaSq0 |
is a |
G0 |
is a |
Time |
is a |
xname |
is a |
... |
this arguments is used to pass the numerical value for |
The method returns an object of class trajectories
containing the simulated trajectories.
COGARCH Team
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | # Example of COGARCH driven by a Variance Gamma Process
dt <- 1/100
# object for COGARCH parameters
prm <- COGprm(eta = 0.053, beta = 0.04, phi = 0.038)
# We build an object of class VarGamma for standardized Variance Gamma increments
set.seed(123)
prmVgamma <- varGamma(c = 1)
#
system.time(prv <- rCOGARCH(prm, prmVgamma, obstimes=1:20, nsim=1, sigmaSq0=0.2, G0=0, dt = dt))
plot(prv)
# Example of COGARCH driven by a Compound Poisson Process where the jump size
# follows a standard normal
prm <- COGprm(eta = 0.053, beta = 0.9, phi = 0.038)
set.seed(123)
system.time(prv2 <- rCOGARCH(prm, rnorm, obstimes=1:100/10, nsim=1, sigmaSq0=0.3, G0=0,dt=dt,lambda = 2))
plot(prv2)
# Example of COGARCH driven by a Compound Poisson Process where the jump size
# is specified by the user
prm <- COGprm(eta = 0.053, beta = 0.9, phi = 0.038)
set.seed(123)
myfun<-function(n){rnorm(n=pippo,mean=1,sd=1)}
system.time(prv3 <- rCOGARCH(prm, rnorm, obstimes=1:100/10, nsim=1, sigmaSq0=0.3, G0=0,dt=dt,lambda = 2))
plot(prv3)
# Example 4
# Example of nsim = 3 simulated trajectories generated by a COGARCH(1,1)
# where the driven noise is a Variance Gamma process.
set.seed(123)
nsim<-3
sigmaSq0Ex4<-c(0.2, 0.15, 0.24)
G0Ex4<-c(100, 110, 90)
system.time(prv4 <- rCOGARCH(prm, prmVgamma, obstimes=1:20,
nsim=nsim, sigmaSq0=sigmaSq0Ex4,
G0=G0Ex4, dt = dt))
plot(prv4)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.