covEstimation: Covariance matrix estimation

Description Usage Arguments Details Value Note Author(s) References Examples

View source: R/covEstimation.R

Description

Function which performs various estimations of covariance matrices.

Usage

1
covEstimation(rets, control = list())

Arguments

rets

a matrix (T x N) of returns.

control

control parameters (see *Details*).

Details

The argument control is a list that can supply any of the following components:

Value

A (N x N) covariance matrix.

Note

Part of the code is adapted from the Matlab code by Ledoit and Wolf (2014).

Author(s)

David Ardia, Kris Boudt and Jean-Philippe Gagnon Fleury.

References

Jorion, P. (1986). Bayes-Stein estimation for portfolio analysis. Journal of Financial and Quantitative Analysis 21(3), pp.279-292.

Harman, H.H. (1976) Modern Factor Analysis. 3rd Ed. Chicago: University of Chicago Press.

Ledoit, O., Wolf, M. (2002). Improved estimation of the covariance matrix of stock returns with an application to portfolio selection. Journal of Empirical Finance 10(5), pp.603-621.

Ledoit, O., Wolf, M. (2003). Honey, I Shrunk the Sample Covariance Matrix. Journal of Portfolio Management 30(4), pp.110-119.

Ledoit, O., Wolf, M. (2004). A well-conditioned estimator for large-dimensional covariance matrices. Journal of Multivariate Analysis 88(2), pp.365-411.

RiskMetrics (1996) RiskMetrics Technical Document. J. P. Morgan/Reuters.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Load returns of assets or portfolios
data("Industry_10")
rets = Industry_10

# Naive covariance estimation
covEstimation(rets)

# Ewma estimation of the covariance with default lambda = 0.94
covEstimation(rets, control = list(type = 'ewma'))

# Ewma estimation of the covariance with default lambda = 0.90
covEstimation(rets, control = list(type = 'ewma', lambda = 0.9))

# Factor estimation of the covariance with dafault K = 1
covEstimation(rets, control = list(type = 'factor'))

# Factor estimation of the covariance with K = 3
covEstimation(rets, control = list(type = 'factor', K = 3))

# Ledot-Wolf's estimation of the covariance
covEstimation(rets, control = list(type = 'lw'))

# Shrinkage of the covariance matrix using constant correlation matrix
covEstimation(rets, control = list(type = 'const'))

# Shrinkage of the covariance matrix towards constant correlation matrix by
# Ledoit-Wolf.
covEstimation(rets, control = list(type = 'cor'))

# Shrinkage of the covariance matrix towards one-parameter matrix
covEstimation(rets, control = list(type = 'oneparm'))

# Shrinkage of the covaraince matrix towards diagonal matrix
covEstimation(rets, control = list(type = 'diag'))

# Shrinkage of the covariance matrix for large data set
covEstimation(rets, control = list(type = 'large'))

ArdiaD/RiskPortfolios documentation built on May 22, 2021, 4:35 a.m.