Learn R Programming

ntwk (version 1.0.0)

bm_compound_poisson: Generates a (correlated) Brownian motion path with correlated but unsynchronised Gaussian jumps.

Description

Generates a (correlated) Brownian motion path with correlated but unsynchronised Gaussian jumps.

Usage

bm_compound_poisson(
  n,
  sigma,
  jump_sigma,
  n_jumps,
  delta_time,
  synchronised = FALSE
)

Arguments

n

Length of the path

sigma

Correlation matrix for the Brownian part.

jump_sigma

Correlation matrix for the jump part.

n_jumps

Number of jumps.

delta_time

Time step.

synchronised

Boolean to synchronise all jumps or not.

Value

A BM path with Correlated Gaussian jumps

Examples

Run this code
# NOT RUN {
n <- 1000
sigma <- matrix(c(1.0, 0.2, 0.2, 0.2, 1.0, 0.2, 0.2, 0.2, 1.0), 3, 3)
jump_sigma <- sigma
n_jumps <- 50
delta_time <- 0.5
bm_compound_poisson(n, sigma, jump_sigma, n_jumps, delta_time)
# }

Run the code above in your browser using DataLab