rMvReturnSim | R Documentation |
Simulate stocks prices following multivariate normal distribution.
rMvReturnSim( names, date, mu = rep(0, 2), sigma = matrix(c(1, 0.5, 0.5, 1), 2, 2) )
names |
vector of names |
date |
vector of time, must be "Date" type |
mu |
vector of |
sigma |
vector of |
Multivariate stock prices
names <- c("swan", "bear") date <- as.Date("2015-01-01") + days(0:29) rMvReturnSim(names, date)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.