Testing against the LPPRET data, this approach seems to work :

expRet <- colMeans(data)
stdvns <- diag(apply(data,2,sd))
corrM <- cor(data)
#produce data with above means, std devns, and correlations
covM <- stdvns %*% corrM %*% stdvns
testdata <- mvrnorm(n=nrow(data),mu=expRet,Sigma=covM,empirical=TRUE)
testdata2 <- timeSeries(testdata)
#check
cor(data)
cor(testdata2)
cov(data)
cov(testdata2)

Regards,
Matt

	[[alternative HTML version deleted]]

