cordist: A Correlation Distance Measure

Description Usage Arguments Details Value Author(s) References

View source: R/rmgarch-series.R

Description

Given an array of correlation snapshots in time, returns a matrix of some rolling distance measure on the correlations.

Usage

1
2
cordist(R, distance = c("ma","ms","meda","meds","eigen", "cmd"), n = 25, 
plot = TRUE, dates = NULL, title = NULL)

Arguments

R

An array of correlations.

distance

The measure to use to capture the change between 2 correlation matrices (see details).

n

The distance between 2 correlation matrices.

plot

Whether to create a heatmap plot of the result.

dates

A POSIXct vector of dates to use for the heatmap (recommend to supply).

title

Title for the heatmap plot.

Details

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.

Value

A symmetric matrix of the rolling distance measure for each period.

Author(s)

Alexios Ghalanos

References

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.


rmgarch documentation built on May 2, 2019, 5:56 p.m.