rCOGARCH: Simulator function for the COGARCH(1,1) process

Description Usage Arguments Value Author(s) Examples

Description

The function returns the simulated sample paths of a COGARCH(1,1) process

Usage

1
rCOGARCH(parameters, increments, obstimes, blocks = obstimes, nsim = 1, dt = 1/100, sigmaSq0 = 1, G0 = 0, Time = 1, xname = "n", ...)

Arguments

parameters

is an object of class COGprm that contains the values of the COGARCH(1,1) model

increments

is an object of class function or varGamma that contains informations about the type of the Levy increments. For the variance gamma case, increments is an object of class varGamma. For the compound poisson increments, the variable contains the random number generator for the jump size. See examples for more details.

obstimes

is a numeric object that indicates the dates in which we observe the COGARCH(1,1) process.

blocks

is a numeric object that allows the user to manage efficiently the memory.

nsim

is a numeric object indicating the number of simulated trajectories.

dt

is a numeric object that is the length of the step interval.

sigmaSq0

is a numeric object that is the initial values for the sigma process. It can be either a scalar or a vector of dimension nsim.

G0

is a numeric object that is the initial Values for the COGARCH process. It can be either a scalar or a vector of dimension nsim.

Time

is a numeric object that is the last time in the trajectories.

xname

is a character object indicating the label for the number of simulation.

...

this arguments is used to pass the numerical value for lambda when we consider a COGARCH(1,1) driven by a compound poisson.

Value

The method returns an object of class trajectories containing the simulated trajectories.

Author(s)

COGARCH Team

Examples

 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)

COGARCH documentation built on May 2, 2019, 5:28 p.m.

Related to rCOGARCH in COGARCH...