rTrade: Simulate stock trade data

View source: R/rgbm.R

rTradeR Documentation

Simulate stock trade data

Description

Simulate stock trade data with assumption that the stock price following Geometric Brownian Motion (GBM).

Usage

rTrade(time, start = 100, mu = 1e-04, sigma = 2e-04)

Arguments

time

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

start

the start position

mu

the mu parameter of GBM

sigma

the sigma parameter of GBM

Value

Stock trade data with Open, High, Low and Close

Examples

date <- as.Date("2015-01-01") + days(0:29)
rTrade(date)

RMOPI documentation built on Aug. 22, 2022, 5:07 p.m.

Related to rTrade in RMOPI...