x <- matrix(diff(log(EuStockMarkets)), ncol = 4)
colnames(x) <- colnames(EuStockMarkets)
p <- stats::runif(nrow(x))
p <- p / sum(p)
ffp_moments(x = x, p = p)
# compare with the standard approach
colMeans(x)
cov(x)
Run the code above in your browser using DataLab