
Last chance! 50% off unlimited learning
Sale ends in
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)
)
Multivariate stock prices
vector of names
vector of time, must be "Date" type
vector of mu
vector of sigma
names <- c("swan", "bear")
date <- as.Date("2015-01-01") + days(0:29)
rMvReturnSim(names, date)
Run the code above in your browser using DataLab