Learn R Programming

W2CWM2C (version 1.0)

WMCC: Wavelet Multiple cross-correlation (multivariate case).

Description

The WMCC function (multivariate case) computes the Wavelet Multiple cross correlation by means of the function wave.multiple.cross.correlation from the wavemulcor package (Fernandez-Macho 2012) and present the result as a novel plot that reduce the number of plots of the classical function wave.multiple.cross.correlation. The WMC function also provides a way to handle multivariate time series easily as a list of N elements (time series).

Usage

WMCC(inputDATA, Wname, J, lmax, Hpdf, Wpdf)

Arguments

inputDATA
An array of multivariate time series as a ts object (please, check the ts manual to get more information about the ts function in R).
Wname
The wavelet function or filter to use in the decomposition.
J
Specifies the depth of the decomposition.
lmax
The maximum lag.
Hpdf
The height of the pdf file (output plot).
Wpdf
The width of the pdf file (output plot).

Value

  • Output: Output pdf file: WMCC_plot.pdf.

    Output data: The same list of elements of the function wave.multiple.cross.correlation of the wavemulcor package (Fernandez-Macho 2012).

encoding

latin1

Details

The WMCC function compute the Wavelet Multiple Cross Correlation using the function wave.multiple.cross.correlation from the wavemulcor package (Fernandez-Macho 2012), but the WMCC function incorporates some graphical improvements (please, see the Figure 5 of Polanco-Martinez and Fernandez-Macho 2012), such as the reduction of the number of plots to present the results of the function wave.multiple.cross.correlation.

References

Fernandez-Macho, J.. Wavelet multiple correlation and cross-correlation: A multiscale analysis of euro zone stock markets. Physica A: Statistical Mechanics and its Applications, 391(4):1097-1104, 2012. Fernandez-Macho, J. (2012). Wavemulcor Reference manual. The Comprehensive R Archive Network (CRAN), http://cran.r-project.org/web/packages/wavemulcor/index.html. Polanco-Martinez, J. and J. Fernandez-Macho (2012). The package 'W2CWM2C': description, features and applications. To be submitted under review to Journal of Statistical Software.

Examples

Run this code
library("wavemulcor")
 library("W2CWM2C")
 data(dataexample)

 #:: Convert. log return using: ln(t + deltat) - ln(t) 
 #:: The application in this example is with stock market 
 #:: indexes and it is common to use log returns instead 
 #:: raw data. Other kinds of pre-processing data are possible. 

 dataexample  <- dataexample[-1] #remove the dates!
 lrdatex      <- apply(log(dataexample), 2, diff)
 tslrdat      <- ts(lrdatex, start=1, frequency=1)

 Wname   <- "la8"
 J       <- 8
 Hp      <- 6
 Wp      <- 10
 lmax    <- 30
 compWCC <- WMCC(tslrdat, Wname, J, lmax, Hp, Wp)

Run the code above in your browser using DataLab