match_normal: Moment Matching for the Normal Distribution

View source: R/moment_matching.R

match_normalR Documentation

Moment Matching for the Normal Distribution

Description

Generates scenarios from the normal distribution that exactly matches the first two moments.

Usage

match_normal(mu, sigma, n)

Arguments

mu

A double with the location parameter.

sigma

A variance-covariance matrix the dispersion parameter.

n

An integer with the number of scenarios to be generated.

Value

#TODO

See Also

match_t

Examples

x     <- diff(log(EuStockMarkets))
mu    <- colMeans(x)
sigma <- cov(x)
match_normal(mu, sigma, 10)

# correlation structure is similar
cor(x)
cor(match_normal(mu, sigma, 10000))

# as the location parameters
mu
colMeans(match_normal(mu, sigma, 10000))

Reckziegel/CMA documentation built on July 13, 2022, 10:31 p.m.