simulate {EMJumpDiffusion}R Documentation

Data simulation for use with EM-algorithm.

Description

Simulates data of log-returns for use with EMjump.

Usage

simulate(theta, T)

Arguments

theta Parameter vector for simulated data.
T Length of data to be simulated.

Details

The vector for the starting parameters must have 5 entries. The first one denotes the Bernoulli jump probability. The second and third entry have to be drift and volatility (must be >0) of the diffusion process. The last two are the mean and variance (must be >0) of the jump sizes.

T can be any positive integer number.

Value

Returns a matrix of dimension T x 2. The first row corresponds to the actual log-returns. The second row corresponds to jumps made, 0 for no jump and 1 for a jump.

Examples

        ## Data simulation
        theta <- c(0.2, 0.1, 0.05, -0.5, 0.7)
        X <- simulate(theta, 30) # simulates 30 log-returns
        plot(X[,1],type="h",main="log returns",xlab="time",ylab="value")

[Package EMJumpDiffusion version 1.4.1 Index]