Given an array of correlation snapshots in time, returns a matrix of some rolling distance measure on the correlations.
cordist(R, distance = c("ma","ms","meda","meds","eigen", "cmd"), n = 25,
plot = TRUE, dates = NULL, title = NULL)
A symmetric matrix of the rolling distance measure for each period.
An array of correlations.
The measure to use to capture the change between 2 correlation matrices (see details).
The distance between 2 correlation matrices.
Whether to create a heatmap plot of the result.
A POSIXct
vector of dates to use for the heatmap (recommend to
supply).
Title for the heatmap plot.
Alexios Galanos
This function provides for a visualization of dynamic correlation distance between periods with a number of plausible measures including “ma” (mean absolute), “ms” (mean squared), “meda” (median absolute), “meds” (median squared) “eigen” (largest eigenvalue difference) and “cmd” (correlation matrix distance). See the references for more details.
Munnix, M. C., Shimada, T., Schafer, R., Leyvraz, F., Seligman, T. H.,
Guhr, T., & Stanley, H. E. (2012). Identifying states of a financial market.
Scientific Reports 2.
Herdin, M., Czink, N., Ozcelik, H., & Bonek, E. (2005). Correlation matrix
distance, a meaningful measure for evaluation of non-stationary MIMO channels.
Vehicular Technology Conference, 2005, IEEE 61st, 1, 136--140.