Learn R Programming

highfrequency (version 0.7.0.1)

makePsd: Returns the positive semidinite projection of a symmetric matrix using the eigenvalue method

Description

Function returns the positive semidinite projection of a symmetric matrix using the eigenvalue method.

Usage

makePsd(S, method = "covariance")

Arguments

S

matrix.

method

character, indicating whether the negative eigenvalues of the correlation or covariance should be replaced by zero. Possible values are "covariance" and "correlation".

Value

An xts object containing the aggregated trade data.

Details

We use the eigenvalue method to transform \(S\) into a positive semidefinite covariance matrix (see e.g. Barndorff-Nielsen and Shephard, 2004, and Rousseeuw and Molenberghs, 1993). Let \(\Gamma\) be the orthogonal matrix consisting of the \(p\) eigenvectors of \(S\). Denote \(\lambda_1^+,\ldots,\lambda_p^+\) its \(p\) eigenvalues, whereby the negative eigenvalues have been replaced by zeroes. Under this approach, the positive semi-definite projection of \(S\) is \( S^+ = \Gamma' \mbox{diag}(\lambda_1^+,\ldots,\lambda_p^+) \Gamma\).

If method = "correlation", the eigenvalues of the correlation matrix corresponding to the matrix \(S\) are transformed. See Fan et al (2010).

References

Barndorff-Nielsen, O. and N. Shephard (2004). Measuring the impact of jumps in multivariate price processes using bipower covariation. Discussion paper, Nuffield College, Oxford University. Fan, J., Y. Li, and K. Yu (2010). Vast volatility matrix estimation using high frequency data for portfolio selection. Working paper. Rousseeuw, P. and G. Molenberghs (1993). Transformation of non positive semidefinite correlation matrices. Communications in Statistics - Theory and Methods 22, 965-984.