Type: | Package |
Title: | Methods for Time Series Analysis |
Description: | A collection of functions to perform Detrended Fluctuation Analysis (DFA exponent), GUEDES et al. (2019) <doi:10.1016/j.physa.2019.04.132> , Detrended cross-correlation coefficient (RHODCCA), GUEDES & ZEBENDE (2019) <doi:10.1016/j.physa.2019.121286>, DMCA cross-correlation coefficient and Detrended multiple cross-correlation coefficient (DMC), GUEDES & SILVA-FILHO & ZEBENDE (2018) <doi:10.1016/j.physa.2021.125990>, both with sliding windows approach. |
Version: | 0.2.0 |
Date: | 2021-04-10 |
Maintainer: | Everaldo Freitas Guedes <efgestatistico@gmail.com> |
License: | GPL-3 |
URL: | https://github.com/efguedes/SlidingWindows |
BugReports: | https://github.com/efguedes/SlidingWindows |
NeedsCompilation: | no |
Encoding: | UTF-8 |
Imports: | stats, DCCA, PerformanceAnalytics, nonlinearTseries, TSEntropies |
Suggests: | xts, zoo, quantmod |
RoxygenNote: | 7.1.1 |
Packaged: | 2021-04-10 23:50:46 UTC; every |
Author: | Everaldo Freitas Guedes
|
Repository: | CRAN |
Date/Publication: | 2021-04-11 04:20:02 UTC |
Sliding Windows.
Description
This function generates sliding windows approach of a time series.
Usage
SlidingWindows(y, w = 99)
Arguments
y |
A vector containing univariate time series. |
w |
An integer value indicating the window size |
Details
This function return the matrix with time series sliding windows.
Value
A list containing "w", "SlidingWindows".
References
Guedes, E.F. Modelo computacional para análise de movimentos e co-movimentos de mercados financeiros, Ph.D. thesis, Programa de Pós-graduação em Modelagem Computacional e Tecnologia Industrial. Centro Universitário Senai Cimatec, 2019.
Examples
y <- rnorm(100)
SlidingWindows(y,w=99)
Descritive statistics with sliding windows.
Description
This function generates descriptive statistics of a univariate time series with sliding windows approach.
Usage
descritive.SlidingWindows(y, w = 99, skewness = "moment", kurtosis = "moment")
Arguments
y |
A vector containing univariate time series. |
w |
An integer value indicating the window size |
skewness |
A non-numeric value. See PerformanceAnalytics package. |
kurtosis |
A non-numeric value. See PerformanceAnalytics package. |
Details
This function include following measures: min, max, mean, median, standard deviation, skewness and kurtosis.
Value
A list containing "w", "min","max","mean", "median", "standard deviation","skewness" and "kurtosis".
References
Guedes, E.F. Modelo computacional para análise de movimentos e co-movimentos de mercados financeiros, Ph.D. thesis, Programa de Pós-graduação em Modelagem Computacional e Tecnologia Industrial. Centro Universitário Senai Cimatec, 2019.
Examples
y <- rnorm(100)
descritive.SlidingWindows(y, w=99, skewness="moment", kurtosis="moment")
Detrended Fluctuation Analysis with sliding windows.
Description
This function generates scaling exponents (long-range correlations) of a univariate time series with sliding windows approach.
Usage
dfa.SlidingWindows(y, w = 98, k = 10, npoints = 15)
Arguments
y |
A vector containing univariate time series. |
w |
An integer value indicating the window size |
k |
An integer value indicating the boundary of the division |
npoints |
The number of different time scales that will be used to estimate the Fluctuation function in each zone. See nonlinearTseries package. |
Details
This function include following measures: alpha_dfa, se_alpha_dfa, r2_alpha_dfa.
Value
A list contaning "w", "alpha_dfa", "se_alpha_dfa", "r2_alpha_dfa".
References
GUEDES, E.F.;FERREIRA, P.;DIONISIO, A.; ZEBENDE,G.F. An econophysics approach to study the effect of BREXIT referendum on European Union stock markets. PHYSICA A, v.523, p.1175-1182, 2019. doi = "doi.org/10.1016/j.physa.2019.04.132".
FERREIRA, P.; DIONISIO, A.;GUEDES, E.F.; ZEBENDE, G.F. A sliding windows approach to analyse the evolution of bank shares in the European Union. PHYSICA A, v.490, p.1355-1367, 2018. doi = "doi.org/10.1016/j.physa.2017.08.095".
Examples
y <- rnorm(100)
dfa.SlidingWindows(y,w=99,k=10,npoints=15)
Detrended multiple cross-correlation coefficient with sliding windows.
Description
This function generates DMC Coefficient of three time series with sliding windows approach.
Usage
dmc.SlidingWindows(x1, x2, y, w = 98, k = 10, method = "rhodcca", nu = 0)
Arguments
x1 |
A vector containing univariate time series. |
x2 |
A vector containing univariate time series. |
y |
A vector containing univariate time series. |
w |
An integer value indicating the window size |
k |
An integer value indicating the boundary of the division |
method |
A character string indicating which correlation coefficient is to be used. If method = "rhodcca" (default) the dmc coefficient is generated from the DCCA coefficient. If method = "dmca", the dmc coefficient is generated from the DMCA coefficient. |
nu |
An integer value. See the DCCA package. |
Details
This function include following measures: w, timescale, dmc and cross-correlation between: yx1, yx2, x1x2
Value
A list containing "w", "dmc", "yx1", "yx2", "x1x2".
References
ZEBENDE, G.; SILVA-FILHO, A.M. Detrended multiple cross-correlation coefficient, Physica A 510, 91-97, 2018. doi="doi.org/10.1016/j.physa.2018.06.119".
GUEDES,E.F.;SILVA-FILHO, A.M.; ZEBENDE, G.F. Detrended multiple cross-correlation coefficient with sliding windows approach. Physica A, 125990, 2021. doi="doi.org/10.1016/j.physa.2021.125990".
Examples
x1 <- rnorm(100)
x2 <- rnorm(100)
y <- rnorm(100)
dmc.SlidingWindows(x1,x2,y,w=99,k=10,nu=0, method="rhodcca")
dmc.SlidingWindows(x1,x2,y,w=99,k=10,nu=0, method="dmca")
DMCA coefficient with sliding windows.
Description
This function generates Detrending moving-average cross-correlation coefficient of two time series with sliding windows approach.
Usage
dmca.SlidingWindows(x, y, w = 98, k = 10)
Arguments
x |
A vector containing univariate time series. |
y |
A vector containing univariate time series. |
w |
An integer value indicating the window size |
k |
An integer value indicating the boundary of the division |
Details
This function include following measures: w, timescale, dmca
Value
A list containing "w", "timescale", "dmca".
References
KRISTOUFEK, L. Detrending moving-average cross-correlation coefficient: Measuring cross-correlations between non-stationary series. PHYSICA A, v.406, p.169-175, 2014. doi="doi.org/10.1016/j.physa.2014.03.015".
Examples
x <- rnorm(100)
y <- rnorm(100)
dmca.SlidingWindows(x,y,w=99,k=10)
Approximate entropy with sliding windows.
Description
This function computes approximate entropy of a univariate time series with sliding windows approach.
Usage
entropy.SlidingWindows(y, w = 99, k = 4, dim = 2, r = 0.5, lag = 1)
Arguments
y |
A vector containing univariate time series. |
w |
An integer value indicating the window size |
k |
An integer value indicating the boundary of the division |
dim |
The dimension of given time series. See TSEntropies package. |
r |
The radius of searched areas. See TSEntropies package. |
lag |
The downsampling. See TSEntropies package. |
Details
This function return the list with time series sliding windows.
Value
A list contaning "w", "ApEn", "FastApEn".
References
Pincus, S.M. (1991). Approximate entropy as a measure of system complexity. Proc. Natl. Acad. Sci. USA, Vol. 88, pp. 2297–2301. doi="doi.org/10.1073/pnas.88.6.2297".
Examples
y <- rnorm(100)
entropy.SlidingWindows(y, w=99, k=4, dim=2, r=.2,lag=1)
Detrended Cross-Correlation Coefficient with sliding windows.
Description
This function generates Detrended Cross-Correlation Coefficient of two time series with sliding windows approach.
Usage
rhodcca.SlidingWindows(x, y, w = 98, k = 10, nu = 0)
Arguments
x |
A vector containing univariate time series. |
y |
A vector containing univariate time series. |
w |
An integer value indicating the window size |
k |
An integer value indicating the boundary of the division |
nu |
An integer value. See DCCA package. |
Details
This function include following measures:
w, timescale, rhodcca
Value
A list containing "w", "timescale", "rhodcca".
References
GUEDES, E.F.; ZEBENDE, G.F. DCCA cross-correlation coefficient with sliding windows approach. PHYSICA A, v.527, p.121286, 2019. doi="doi.org/10.1016/j.physa.2010.10.022".
ZEBENDE, G.F. DCCA cross-correlation coefficient: Quantifying level of cross-correlation, Physica A, v. 390, n. 4, p. 614-618, 2011. doi="doi.org/10.1016/j.physa.2019.121286".
Examples
x <- rnorm(100)
y <- rnorm(100)
rhodcca.SlidingWindows(x,y,w=99,k=10,nu=0)