Diagnostic.Cogarch: Function for checking the statistical properties of the...

View source: R/DiagnosticCogarch.R

Diagnostic.CogarchR Documentation

Function for checking the statistical properties of the COGARCH(p,q) model

Description

The function check the statistical properties of the COGARCH(p,q) model. We verify if the process has a strict positive stationary variance model.

Usage

Diagnostic.Cogarch(yuima.cogarch, param = list(), matrixS = NULL, mu = 1, display = TRUE)

Arguments

yuima.cogarch

an object of class yuima.cogarch, yuima or a class cogarch.gmm-class

param

a list containing the values of the parameters

matrixS

a Square matrix.

mu

first moment of the Levy measure.

display

a logical variable, if TRUE the function displays the result in the console.

Value

The functon returns a List with entries:

meanVarianceProc

Unconditional Stationary mean of the variance process.

meanStateVariable

Unconditional Stationary mean of the state process.

stationary

If TRUE, the COGARCH(p,q) has stationary variance.

positivity

If TRUE, the variance process is strictly positive.

Author(s)

YUIMA Project Team

Examples

## 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(df="rvgamma(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)  

yuima documentation built on Nov. 14, 2022, 3:02 p.m.