Learn R Programming

RMOPI (version 1.1)

rGbm: Simulate prices series of stocks

Description

Simulate an multivariate series following Geometric Brownian Motion (GBM)

Usage

rGbm(name, time, start = 100, mu = 0.01, sigma = 0.02)

Value

a simulated multivariate GBM series

Arguments

name

vector of series names

time

vector of time, must be a "Date" type variable

start

vector of start positions

mu

vector of mu

sigma

vector of sigma

Examples

Run this code
date <- as.Date("2015-01-01") + days(0:29)
rGbm(c("bear", "tiger", "swan"), date)

Run the code above in your browser using DataLab