rTrades | R Documentation |
Simulate multivariate stock trade data with assumption that each stock price following Geometric Brownian Motion (GBM). And these prices are interconnected.
rTrades( name, time, start = c(1000, 1000), mu = rep(1e-04, 2), sigma = matrix(c(2e-04, 1e-04, 1e-04, 2e-04), 2, 2), digits = 2 )
name |
vector of names |
time |
time vector of time, must be "Date" type |
start |
vector of start positions |
mu |
vector of |
sigma |
vector of |
digits |
integer deciding the number of deciamal places |
A list of stock trade data with Open, High, Low and Close
date <- as.Date("2015-01-01") + days(0:29) rTrades(c("swan", "bear"), date)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.