MvnRnd: Simulations with Exact Means and Covariances

Description Usage Arguments Value References Examples

View source: R/MvnRnd.R

Description

This function generate scenarios from elliptical distributions in which the sample moments match the populational moments.

Usage

1
MvnRnd(M, S, J)

Arguments

M

A 1xN matrix with the location parameter of each invariant (asset).

S

A NxN matrix with the dispersion matrix of the invariants (assets).

J

A numeric scalar with the desired number of scenarios.

Value

A J x N matrix with the simulated time-series.

References

Meucci, Attilio, Simulations with Exact Means and Covariances (June 7, 2009). Available at SSRN: https://ssrn.com/abstract=1415699 or http://dx.doi.org/10.2139/ssrn.1415699.

Attilio Meucci (2020). Simulations with Exact Means and Covariances, MATLAB Central File Exchange. Retrieved October 11, 2020.

Examples

1
2
3
4
rets  <- diff(log(EuStockMarkets))
mu    <- colMeans(rets)
sigma <- stats::cov(rets)
MvnRnd(M = mu, S = sigma, J = 50)

Reckziegel/MomentMatching documentation built on Oct. 15, 2020, 12:04 a.m.