correlated_brownian_noise: Generates multidimensional correlated Brownian motion...

Description Usage Arguments Value Examples

View source: R/path_generation.R

Description

Generates multidimensional correlated Brownian motion increments

Usage

1
correlated_brownian_noise(n, sigma_matrix, delta_time)

Arguments

n

Sample length

sigma_matrix

Correlation/Covariance matrix

delta_time

Time difference between steps

Value

A matrix with n rows of correlated Brownian motion using the correlation matrix sigma_matrix using time step delta_time.

Examples

1
2
3
4
5
6
7
set.seed(42)
corr_mat <- matrix(c(1.0, 0.2, 0.2, 0.2, 1.0, 0.2, 0.2, 0.2, 1.0), 3, 3)
n <- 1000
delta_time <- 0.01
correlated_brownian_noise(
  sigma_matrix = corr_mat, n = n, delta_time = delta_time
)

ntwk documentation built on Sept. 13, 2021, 9:07 a.m.