powered by
Simulate stock trade data with assumption that the stock price following Geometric Brownian Motion (GBM).
rTrade(time, start = 100, mu = 1e-04, sigma = 2e-04)
Stock trade data with Open, High, Low and Close
time vector of time, must be a "Date" type variable
the start position
the mu parameter of GBM
mu
the sigma parameter of GBM
sigma
date <- as.Date("2015-01-01") + days(0:29) rTrade(date)
Run the code above in your browser using DataLab