cov_shrink: Shrink the covariance matrix towards some global mean In zatonovo/tawny: Clean Covariance Matrices Using Random Matrix Theory and Shrinkage Estimators for Portfolio Optimization

Description

This performs a covariance shrinkage estimation as specified in Ledoit and Wolf. Using within the larger framework only requires using the ShrinkageDenoiser type, which handles the work of constructing a shrinkage estimate of the covariance matrix of returns (and consequently its corresponding correlation matrix).

Usage

 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 cov_shrink(...) cov_sample(...) cov.prior.cc(S) cor.mean(S) shrinkage.intensity(returns, prior, sample) shrinkage.p(returns, sample) shrinkage.r(returns, sample, pi.est) shrinkage.c(prior, sample) cov.shrink(...) cov.sample(...)

Arguments

 returns A zoo object of returns. This is TxM sample The sample covariance matrix (synonomous to S) prior The shrinkage target covariance matrix (synonomous to F) S The sample covariance matrix pi.est The estimate returned from shrinkage.p ... Additional parameters to pass to prior.fun

Details

cov_shrink(h, prior.fun = cov.prior.cc, ...)

cov_shrink(h, T, constant.fun, prior.fun = cov.prior.cc, ...)

cov_shrink(h, ...)

cov_sample...

cov_samplereturns

cov_samplereturns

T - Length of returns series used in scaling of shrinkage coefficient

h - A generic tawny object representing either a returns, covariance, or correlation matrix

constant.fun - Use this function to calculate the shrinkage constant

prior.fun - Generates the prior/model covariance matrix

Most of the code related to the shrinkage estimator is tied to calculating a value for the shrinkage coefficient. The remainder of the code shrinks the sample covariance matrix towards the target. In addition, there is a function generator used in conjunction with the optimizePortfolio process to produce a correlation matrix based on the shrinkage.

Value

Scalars are produced by all of the shrinkage.* functions, resulting in the final shrinkage coefficient, calculated by shrinkage.intensity.

The cov.sample function calculates the sample covariance matrix and is MxM.

The cov.shrink function produces the shrunk version of the covariance matrix and has the same dimensions as the sample covariance matrix.

The cor.mean function calculates the constant correlation used in estimating the global mean (aka the shrinkage target) produced by cov.prior.cc.

Author(s)

Brian Lee Yung Rowe