Learn R Programming

DFA (version 1.0.0)

Deltarho: Delta Amplitude Detrended Cross-Correlation Coefficient (DeltarhoDCCA)

Description

Applies the Detrended Cross-Correlation Coefficient Difference (Deltarho) to nonstationary time series.

Usage

Deltarho(file,file2,file3,file4,scale = 2^(1/8),box_size = 4,m=1)

Value

boxe

Size \(n\) of the overlapping boxes.

DFA1

DFA of the first time series (file).

DFA2

DFA of the second time series (file2).

DFA3

DFA of the third time series (file3).

DFA4

DFA of the fourth time series (file4).

DCCA

Detrended Cross-Correlation function between the first time series (file) and the second time series (file2).

DCCA2

Detrended Cross-Correlation function between the third time series (file3) and the fourth time series (file4).

rhoDCCA

Detrended Cross-Correlation Coefficient function, defined as the ratio between the DCCA and two DFA (DFA1,DFA2).

rhoDCCA2

Detrended Cross-Correlation Coefficient function, defined as the ratio between the DCCA2 and two DFA (DFA3,DFA4).

Arguments

file

Univariate time series (must be a vector or data frame)

file2

Univariate time series (must be a vector or data frame)

file3

Univariate time series (must be a vector or data frame)

file4

Univariate time series (must be a vector or data frame)

scale

Specifies the ratio between successive box sizes (by default scale = 2^(1/8))

box_size

Vector of box sizes (must be used in conjunction with scale = "F")

m

An integer of the polynomial order for the detrending (by default m=1).

Author

Victor Barreto Mesquita

Details

The Deltarho can be computed in a geometric scale or for different choices of boxes sizes.

References

SILVA, Marcus Fernandes da et al. Quantifying cross-correlation between ibovespa and brazilian blue-chips: The dcca approach. Physica A: Statistical Mechanics and its Applications, v. 424,2015.

Examples

Run this code
#The following examples using the database of financial time series
#collected during the United States bear market of 2007-2009.
# \donttest{
library(DFA)
data("NYA2008")
data("IXIC2008")
data("LSE.L2008")
data("SSEC2008")

file = NYA2008
file2= IXIC2008
file3 = LSE.L2008
file4 = SSEC2008

Deltarho(file,file2,file3,file4,scale = 2^(1/8),box_size = c(4,8,16),m=1)
# }
# \donttest{
# Example with different polynomial fit order.

library(DFA)
data("NYA2008")
data("IXIC2008")
data("LSE.L2008")
data("SSEC2008")

file = NYA2008
file2 = LSE.L2008
file3= IXIC2008
file4 = SSEC2008

Deltarho(file,file2,file3,file4,scale = 2^(1/8),box_size = c(4,8,16),m=2)

# }
# \donttest{
# Example using different choice of overlapping boxes sizes.

library(DFA)
data("NYA2008")
data("IXIC2008")
data("LSE.L2008")
data("SSEC2008")

file = NYA2008
file2= IXIC2008
file3 = LSE.L2008
file4 = SSEC2008

Deltarho(file,file2,file3,file4,scale = "F",box_size = c(4,8,16),m=1)

# }

Run the code above in your browser using DataLab