Learn R Programming

RMOPI (version 1.1)

rGbms: Simulate Multivariate Stocks Prices Data

Description

Simulate multivariate prices for interconnected stocks with each price series following Geometric Brownian Motion (GBM).

Usage

rGbms(
  name,
  len,
  start = c(1000, 1000),
  mu = rep(1e-04, 2),
  sigma = matrix(c(2e-04, 1e-04, 1e-04, 2e-04), 2, 2),
  digits = 2
)

Value

A simulated multivariate GBM series with each series interconnected

Arguments

name

vector of series names

len

the length

start

vector of start positions

mu

vector of mu

sigma

vector of sigma

digits

integer deciding the number of decimal places

Examples

Run this code
rGbms(c("bear", "tiger"), len = 36)

Run the code above in your browser using DataLab