Type: | Package |
Title: | Statistical Performance Measures to Evaluate Covariance Matrix Estimates |
Version: | 0.1.0 |
Date: | 2017-04-13 |
Author: | Carlos Trucios |
Maintainer: | Carlos Trucios <ctrucios@gmail.com> |
Description: | Statistical performance measures used in the econometric literature to evaluate conditional covariance/correlation matrix estimates (MSE, MAE, Euclidean distance, Frobenius distance, Stein distance, asymmetric loss function, eigenvalue loss function and the loss function defined in Eq. (4.6) of Engle et al. (2016) <doi:10.2139/ssrn.2814555>). Additionally, compute Eq. (3.1) and (4.2) of Li et al. (2016) <doi:10.1080/07350015.2015.1092975> to compare the factor loading matrix. The statistical performance measures implemented have been previously used in, for instance, Laurent et al. (2012) <doi:10.1002/jae.1248>, Amendola et al. (2015) <doi:10.1002/for.2322> and Becker et al. (2015) <doi:10.1016/j.ijforecast.2013.11.007>. |
License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
Note: | The author acknowledges financial support from Sao Paulo Research Foundation (FAPESP) grant 2016/18599-4 |
NeedsCompilation: | no |
Packaged: | 2017-04-14 17:27:22 UTC; ctruciosm |
Repository: | CRAN |
Date/Publication: | 2017-04-14 18:05:37 UTC |
Asymmetric loss function
Description
Compute the asymmetric loss function between the matrices S and H. See, Laurent et al. (2012) and Amendola et al. (2015).
Usage
Asymm(S, H, b = 3)
Arguments
S |
Proxy for the conditional covariance/correlation matrix |
H |
Estimate of the conditional covariance/correlation matrix. |
b |
Degree of homogeneity. By default b=3 |
Author(s)
Carlos Trucios
References
Amendola, A., & Storti, G. (2015). Model uncertainty and forecast combination in high-dimensional multivariate volatility prediction. Journal of Forecasting, 34(2), 83-91.
Laurent, S., Rombouts, J. V., & Violante, F. (2012). On the forecasting accuracy of multivariate GARCH models. Journal of Applied Econometrics, 27(6), 934-955.
Examples
X = matrix(rnorm(4000),ncol=4)
S = diag(4)
H = cov(X)
Asymm(S,H,b=3)
Frobenius distance
Description
Compute the Frobenius distance between the matrices S and H. See, Laurent et al. (2012) and Amendola et al. (2015).
Usage
Frobenius(S, H)
Arguments
S |
Proxy for the conditional covariance/correlation matrix |
H |
Estimate of the conditional covariance/correlation matrix. |
Author(s)
Carlos Trucios
References
Amendola, A., & Storti, G. (2015). Model uncertainty and forecast combination in high-dimensional multivariate volatility prediction. Journal of Forecasting, 34(2), 83-91.
Laurent, S., Rombouts, J. V., & Violante, F. (2012). On the forecasting accuracy of multivariate GARCH models. Journal of Applied Econometrics, 27(6), 934-955.
Examples
X = matrix(rnorm(4000),ncol=4)
S = diag(4)
H = cov(X)
Frobenius(S, H)
Euclidean distance
Description
Compute the Euclidean distance between the matrices S and H. See, Laurent et al. (2012) and Amendola et al. (2015).
Usage
LE(S, H)
Arguments
S |
Proxy for the conditional covariance/correlation matrix |
H |
Estimate of the conditional covariance/correlation matrix. |
Author(s)
Carlos Trucios
References
Amendola, A., & Storti, G. (2015). Model uncertainty and forecast combination in high-dimensional multivariate volatility prediction. Journal of Forecasting, 34(2), 83-91.
Laurent, S., Rombouts, J. V., & Violante, F. (2012). On the forecasting accuracy of multivariate GARCH models. Journal of Applied Econometrics, 27(6), 934-955.
Examples
X = matrix(rnorm(4000),ncol=4)
S = diag(4)
H = cov(X)
LE(S, H)
Eigenvalue loss function
Description
Compute the Eigenvalue loss function between the matrices S and H. See, Amendola et al. (2015).
Usage
Leig(S, H)
Arguments
S |
Proxy for the conditional covariance/correlation matrix |
H |
Estimate of the conditional covariance/correlation matrix. |
Author(s)
Carlos Trucios
References
Amendola, A., & Storti, G. (2015). Model uncertainty and forecast combination in high-dimensional multivariate volatility prediction. Journal of Forecasting, 34(2), 83-91.
Examples
X = matrix(rnorm(4000),ncol=4)
S = diag(4)
H = cov(X)
Leig(S, H)
Loss function defined in Eq. (4.6) of Engle et al. (2016)
Description
Compute the Elw loss function between the matrices S and H. See, Engle et al. (2016).
Elw (Engle - Ledoit - Wolf) loss function is defined in Equation (4.6) of Engle et al. (2016).
Usage
Lelw(S, H)
Arguments
S |
Proxy for the conditional covariance/correlation matrix |
H |
Estimate of the conditional covariance/correlation matrix. |
Author(s)
Carlos Trucios
References
Engle, Robert F. and Ledoit, Olivier and Wolf, Michael, Large dynamic covariance matrices (2016). University of Zurich, Department of Economics, Working Paper No. 231. Available at SSRN: https://ssrn.com/abstract=2814555.
Examples
X = matrix(rnorm(4000),ncol=4)
S = diag(4)
H = cov(X)
Lelw(S, H)
Mean Absolute Error
Description
Compute the Mean Absolute Error between the matrices S and H. See, Becker et al.(2015).
Usage
MAE(S, H)
Arguments
S |
Proxy for the conditional covariance/correlation matrix |
H |
Estimate of the conditional covariance/correlation matrix. |
Author(s)
Carlos Trucios
References
Becker, R., Clements, A. E., Doolan, M. B., & Hurn, A. S. (2015). Selecting volatility forecasting models for portfolio allocation purposes. International Journal of Forecasting, 31(3), 849-861.
Examples
X = matrix(rnorm(4000),ncol=4)
S = diag(4)
H = cov(X)
MAE(S, H)
Mean Square Error
Description
Compute the Mean Square Error between the matrices S and H. See, Becker et al. (2015).
Usage
MSE(S, H)
Arguments
S |
Proxy for the conditional covariance/correlation matrix |
H |
Estimate of the conditional covariance/correlation matrix. |
Author(s)
Carlos Trucios
References
Becker, R., Clements, A. E., Doolan, M. B., & Hurn, A. S. (2015). Selecting volatility forecasting models for portfolio allocation purposes. International Journal of Forecasting, 31(3), 849-861.
Examples
X = matrix(rnorm(4000),ncol=4)
S = diag(4)
H = cov(X)
MSE(S, H)
Statistical performance measures to evaluate conditional covariance matrix estimates.
Description
Compute several statistical performance measures frequently used in the econometric literature to evaluate covariance/correlation matrix estimates. See, Laurent et al. (2012), Amendola et al. (2015), Becker et al. (2015) and Engle et al. (2016).
If measure="ALL" compute the Asymmetric loss function, Frobenius distance, Euclidean distance, Eigenvalue loss function, Mean Absolute Error, Mean Square Error, Stein loss function and Elw loss function.
Usage
StatPerMeas(S, H, measure , b)
Arguments
S |
Proxy for the conditional covariance/correlation matrix |
H |
Estimate of the conditional covariance/correlation matrix. |
measure |
"Le": Euclidean distance, "MSE": Mean Square Error, "MAE": Mean Absolute Error, "Lf": Frobenius distance, "Ls": Stein loss function, "Asymm": Asymmetric loss functions, "Leig": Eigenvalue loss function, "Lelw": Elw loss function, "ALL": All Statistical Performance Measures. |
b |
Degree of homogeneity. By default b=3 (Used in the Frobenius distance) |
Author(s)
Carlos Trucios
References
Amendola, A., & Storti, G. (2015). Model uncertainty and forecast combination in high-dimensional multivariate volatility prediction. Journal of Forecasting, 34(2), 83-91.
Becker, R., Clements, A. E., Doolan, M. B., & Hurn, A. S. (2015). Selecting volatility forecasting models for portfolio allocation purposes. International Journal of Forecasting, 31(3), 849-861.
Laurent, S., Rombouts, J. V., & Violante, F. (2012). On the forecasting accuracy of multivariate GARCH models. Journal of Applied Econometrics, 27(6), 934-955.
Engle, Robert F. and Ledoit, Olivier and Wolf, Michael, Large dynamic covariance matrices (2016). University of Zurich, Department of Economics, Working Paper No. 231. Available at SSRN: https://ssrn.com/abstract=2814555.
Examples
X = matrix(rnorm(4000),ncol=4)
S = diag(4)
H = cov(X)
StatPerMeas(S,H,measure="ALL",b=10)
StatPerMeas(S,H,measure=c("MSE","MAE","Ls"),b=4)
Stein loss function.
Description
Compute the Stein loss function between the matrices S and H. See, Laurent et al. (2012).
Usage
Stein(S, H)
Arguments
S |
Proxy for the conditional covariance/correlation matrix |
H |
Estimate of the conditional covariance/correlation matrix. |
Author(s)
Carlos Trucios
References
Laurent, S., Rombouts, J. V., & Violante, F. (2012). On the forecasting accuracy of multivariate GARCH models. Journal of Applied Econometrics, 27(6), 934-955.
Examples
X = matrix(rnorm(4000),ncol=4)
S = diag(4)
H = cov(X)
Stein(S, H)
Distance measure defined in Eq. (3.1) of Li et al. (2016)
Description
Compute the distance measure defined in Eq. (3.1) of Li et al. (2016) to compare the factor loading matrix in its Monte Carlos experiments.
Usage
dM1(A, Ahat)
Arguments
A |
The original factor loading matrix A |
Ahat |
The estimated factor loading matrix A |
Author(s)
Carlos Trucios
References
Li, W., Gao, J., Li, K., & Yao, Q. (2016). Modeling Multivariate Volatilities via Latent Common Factors. Journal of Business & Economic Statistics, 34(4), 564-573.
Discrepancy measure defined in Eq. (4.2) of Li et al. (2016)
Description
Compute the discrepancy measure defined in Eq. (4.2) of Li et al. (2016) to compare the factor loading matrix in its Monte Carlos experiments.
Usage
dMA(A,Ahat,y)
Arguments
A |
The original factor loading matrix A |
Ahat |
The estimated factor loading matrix A |
y |
Matrix of observed returns |
Author(s)
Carlos Trucios
References
Li, W., Gao, J., Li, K., & Yao, Q. (2016). Modeling Multivariate Volatilities via Latent Common Factors. Journal of Business & Economic Statistics, 34(4), 564-573.