sigma_sim: Simulated Covariance Matrix

Description Usage Arguments Details Value Examples

View source: R/cov-estim-sim.R

Description

Simulates a covariance matrix with specific properties

Usage

1
sigma_sim(p, corr_min, corr_max, vola_min, vola_max)

Arguments

p

an integer, indicating the number of variables.

corr_min

a double, indicating the minimum possible correlation across the p variables.

corr_max

a double, indicating the maximum possible correlation across the p variables (except the correlation with self of 1).

vola_min

a double, indicating the minimum possible volatility of the p variables.

vola_max

a double, indicating the maximum possible volatility of the p variables.

Details

The correlation and volatility values are drown from a uniform distribution. A condition for positive-definiteness of the resulting covariance matrix is not implemented.

Value

a pxp covariance matrix.

Examples

1
sim_sigma <- sigma_sim(100, corr_min=0.01, corr_max=0.40, vola_min=0.05, vola_max=0.30)

antshi/CovEstim documentation built on Nov. 13, 2020, 2:25 p.m.