Title: | Estimation of Extreme Value Dependence for Time Series Data |
---|---|
Description: | Estimation of the sample univariate, cross and return time extremograms. The package can also adds empirical confidence bands to each of the extremogram plots via a permutation procedure under the assumption that the data are independent. Finally, the stationary bootstrap allows us to construct credible confidence bands for the extremograms. |
Authors: | Nadezda Frolova, Ivor Cribben |
Maintainer: | Nadezda Frolova <[email protected]> |
License: | GPL-3 |
Version: | 1.0.2 |
Built: | 2024-12-03 06:54:29 UTC |
Source: | CRAN |
The package estimates the sample univariate, cross and return time extremograms. It can also add empirical confidence bands to each of the extremogram plots via a permutation procedure under the assumption that the data are independent. Finally, the stationary bootstrap allows us to construct credible confidence bands for the extremograms.
Functions:
Nadezda Frolova <[email protected]>, Ivor Cribben <[email protected]>
Davis, R. A., Mikosch, T., & Cribben, I. (2012). Towards estimating extremal serial dependence via the bootstrapped extremogram. Journal of Econometrics,170(1), 142-152.
Davis, R. A., Mikosch, T., & Cribben, I. (2011). Estimating extremal dependence in univariate and multivariate time series via the extremogram.arXiv preprint arXiv:1107.5592.
The function estimates confidence bands for the sample univariate extremogram using the stationary bootstrap.
bootconf1(x, R, l, maxlag, quant, type, par, start = 1, cutoff = 1, alpha = 0.05)
bootconf1(x, R, l, maxlag, quant, type, par, start = 1, cutoff = 1, alpha = 0.05)
x |
Univariate time series (a vector). |
R |
Number of bootstrap replications (an integer). |
l |
Mean block size for stationary bootstrap or mean of the geometric distribution used to generate resampling blocks (an integer that is not longer than the length of the time series). |
maxlag |
Number of lags to include in the extremogram (an integer). |
quant |
Quantile of the time series to indicate an extreme event (a number between 0 and 1). |
type |
Extremogram type (see function |
par |
If par = 1, the bootstrap replication procedure will be parallelized. If par = 0, no parallelization will be used. |
start |
The lag that the extremogram plots starts at (an integer not greater than |
cutoff |
The cutoff of the y-axis on the plot (a number between 0 and 1, default is 1). |
alpha |
Significance level for the confidence bands (a number between 0 and 1, default is 0.05). |
Returns a plot of the confidence bands for the sample univariate extremogram.
Davis, R. A., Mikosch, T., & Cribben, I. (2012). Towards estimating extremal serial dependence via the bootstrapped extremogram. Journal of Econometrics,170(1), 142-152.
Davis, R. A., Mikosch, T., & Cribben, I. (2011). Estimating extremal dependence in univariate and multivariate time series via the extremogram.arXiv preprint arXiv:1107.5592.
# generate a GARCH(1,1) process omega = 1 alpha = 0.1 beta = 0.6 n = 1000 quant = 0.95 type = 1 maxlag = 70 df = 3 R = 10 l = 30 par = 0 G = extremogram:::garchsim(omega,alpha,beta,n,df) extremogram1(G, quant, maxlag, type, 1, 1, 0) bootconf1(G, R, l, maxlag, quant, type, par, 1, 1, 0.05)
# generate a GARCH(1,1) process omega = 1 alpha = 0.1 beta = 0.6 n = 1000 quant = 0.95 type = 1 maxlag = 70 df = 3 R = 10 l = 30 par = 0 G = extremogram:::garchsim(omega,alpha,beta,n,df) extremogram1(G, quant, maxlag, type, 1, 1, 0) bootconf1(G, R, l, maxlag, quant, type, par, 1, 1, 0.05)
The function estimates confidence bands for the sample cross extremogram using the stationary bootstrap.
bootconf2(x, R, l, maxlag, quant1, quant2, type, par, start = 1, cutoff = 1, alpha = 0.05)
bootconf2(x, R, l, maxlag, quant1, quant2, type, par, start = 1, cutoff = 1, alpha = 0.05)
x |
Bivariate time series (n by 2 matrix). |
R |
Number of bootstrap replications (an integer). |
l |
Mean block size for stationary bootstrap or mean of the geometric distribution used to generate resampling blocks (an integer that is not longer than the length of the time series). |
maxlag |
Number of lags to include in the extremogram (an integer). |
quant1 |
Quantile of the first time series to indicate an extreme event (a number between 0 and 1). |
quant2 |
Quantile of the second series to indicate an extreme event (a number between 0 and 1). |
type |
Extremogram type (see function |
par |
If par = 1, the bootstrap replication procedure will be parallelized. If par = 0, no parallelization will be used. |
start |
The lag that the extremogram plots starts at (an integer not greater than |
cutoff |
The cutoff of the y-axis on the plot (a number between 0 and 1, default is 1). |
alpha |
Significance level for the confidence bands (a number between 0 and 1, default is 0.05). |
Returns a plot of the confidence bands for the sample cross extremogram.
Davis, R. A., Mikosch, T., & Cribben, I. (2012). Towards estimating extremal serial dependence via the bootstrapped extremogram. Journal of Econometrics,170(1), 142-152.
Davis, R. A., Mikosch, T., & Cribben, I. (2011). Estimating extremal dependence in univariate and multivariate time series via the extremogram.arXiv preprint arXiv:1107.5592.
# generate a GARCH(1,1) process omega = 1 alpha1 = 0.1 beta1 = 0.6 alpha2 = 0.11 beta2 = 0.78 n = 1000 quant = 0.95 type = 1 maxlag = 70 df = 3 R = 10 l = 30 par = 0 G1 = extremogram:::garchsim(omega,alpha1,beta1,n,df) G2 = extremogram:::garchsim(omega,alpha2,beta2,n,df) data = cbind(G1, G2) extremogram2(data, quant, quant, maxlag, type, 1, 1, 0) bootconf2(data, R, l, maxlag, quant, quant, type, par, 1, 1, 0.05)
# generate a GARCH(1,1) process omega = 1 alpha1 = 0.1 beta1 = 0.6 alpha2 = 0.11 beta2 = 0.78 n = 1000 quant = 0.95 type = 1 maxlag = 70 df = 3 R = 10 l = 30 par = 0 G1 = extremogram:::garchsim(omega,alpha1,beta1,n,df) G2 = extremogram:::garchsim(omega,alpha2,beta2,n,df) data = cbind(G1, G2) extremogram2(data, quant, quant, maxlag, type, 1, 1, 0) bootconf2(data, R, l, maxlag, quant, quant, type, par, 1, 1, 0.05)
The function estimates confidence bands for the sample return time extremogram using the stationary bootstrap.
bootconfr(x, R, l, maxlag, uplevel = 1, lowlevel = 0, type, par, start = 1, cutoff = 1, alpha = 0.05)
bootconfr(x, R, l, maxlag, uplevel = 1, lowlevel = 0, type, par, start = 1, cutoff = 1, alpha = 0.05)
x |
Univariate time series (a vector). |
R |
Number of bootstrap replications (an integer). |
l |
Mean block size for stationary bootstrap or mean of the geometric distribution used to generate resampling blocks (an integer that is not longer than the length of the time series). |
maxlag |
Number of lags to include in the extremogram (an integer) |
uplevel |
Quantile of the time series to indicate a upper tail extreme event (a number between 0 and 1, default is 1). |
lowlevel |
Quantile of the time series to indicate a lower tail extreme event (a number between 0 and 1, default is 0). |
type |
Extremogram type (see function |
par |
If par = 1, the bootstrap replication procedure will be parallelized. If par = 0, no parallelization will be used. |
start |
The lag that the extremogram plots starts at (an integer not greater than |
cutoff |
The cutoff of the y-axis on the plot (a number between 0 and 1, default is 1). |
alpha |
Significance level for the confidence bands (a number between 0 and 1, default is 0.05). |
Returns a plot of the confidence bands for the sample return time extremogram.
Davis, R. A., Mikosch, T., & Cribben, I. (2012). Towards estimating extremal serial dependence via the bootstrapped extremogram. Journal of Econometrics,170(1), 142-152.
Davis, R. A., Mikosch, T., & Cribben, I. (2011). Estimating extremal dependence in univariate and multivariate time series via the extremogram.arXiv preprint arXiv:1107.5592.
# generate a GARCH(1,1) process omega = 1 alpha = 0.1 beta = 0.6 n = 1000 uplevel = 0.95 lowlevel = 0.05 type = 3 maxlag = 70 df = 3 R = 10 l = 30 par = 0 G = extremogram:::garchsim(omega,alpha,beta,n,df) extremogramr(G, type, maxlag, uplevel, lowlevel, 1, 1) bootconfr(G, R, l, maxlag, uplevel, lowlevel, type, par, 1, 1, 0.05)
# generate a GARCH(1,1) process omega = 1 alpha = 0.1 beta = 0.6 n = 1000 uplevel = 0.95 lowlevel = 0.05 type = 3 maxlag = 70 df = 3 R = 10 l = 30 par = 0 G = extremogram:::garchsim(omega,alpha,beta,n,df) extremogramr(G, type, maxlag, uplevel, lowlevel, 1, 1) bootconfr(G, R, l, maxlag, uplevel, lowlevel, type, par, 1, 1, 0.05)
The function estimates the sample univariate extremogram and creates an extremogram plot.
extremogram1(x, quant, maxlag, type, ploting = 1, cutoff = 1, start = 0)
extremogram1(x, quant, maxlag, type, ploting = 1, cutoff = 1, start = 0)
x |
Univariate time series (a vector). |
quant |
Quantile of the time series to indicate an extreme event (a number between 0 and 1). |
maxlag |
Number of lags to include in the extremogram (an integer). |
type |
Extremogram type. If type = 1, the upper tail extremogram is estimated. If type = 2, the lower tail extremogram is estimated. |
ploting |
An extremogram plot. If ploting = 1, a plot is created (default). If ploting = 0, no plot is created. |
cutoff |
The cutoff of the y-axis on the plot (a number between 0 and 1, default is 1). |
start |
The lag that the extremogram plots starts at (an integer not greater than |
Extremogram values and a plot (if requested).
Davis, R. A., Mikosch, T., & Cribben, I. (2012). Towards estimating extremal serial dependence via the bootstrapped extremogram. Journal of Econometrics,170(1), 142-152.
Davis, R. A., Mikosch, T., & Cribben, I. (2011). Estimating extremal dependence in univariate and multivariate time series via the extremogram.arXiv preprint arXiv:1107.5592.
# generate a GARCH(1,1) process omega = 1 alpha = 0.1 beta = 0.6 n = 1000 quant = 0.95 type = 1 maxlag = 70 df = 3 G = extremogram:::garchsim(omega,alpha,beta,n,df) extremogram1(G, quant, maxlag, type, 1, 1, 0)
# generate a GARCH(1,1) process omega = 1 alpha = 0.1 beta = 0.6 n = 1000 quant = 0.95 type = 1 maxlag = 70 df = 3 G = extremogram:::garchsim(omega,alpha,beta,n,df) extremogram1(G, quant, maxlag, type, 1, 1, 0)
The function estimates the sample cross extremogram and creates an extremogram plot.
extremogram2(a, quant1, quant2, maxlag, type, ploting = 1, cutoff = 1, start = 0)
extremogram2(a, quant1, quant2, maxlag, type, ploting = 1, cutoff = 1, start = 0)
a |
Bivariate time series (n by 2 matrix). |
quant1 |
Quantile of the first time series to indicate an extreme event (a number between 0 and 1). |
quant2 |
Quantile of the second time series to indicate an extreme event (a number between 0 and 1). |
maxlag |
Number of lags to include in the extremogram (an integer). |
type |
If type=1, the upper tail extremogram is estimated - P(Y>y,X>x). If type=2, the lower tail extremogram is estimated - P(Y<y,X<x). If type=3, the extremogram is estimated for a lower tail extreme value in the first time series and an upper tail extreme value in the second time series - P(Y>y,X<x). If type=4, the extremogram is estimated for a lower tail extreme value in the second time series and an upper tail extreme value in the first time series - P(Y<y,X>x). |
ploting |
An extremogram plot. If ploting = 1, a plot is created (default). If ploting = 0, no plot is created. |
cutoff |
The cutoff of the y-axis on the plot (a number between 0 and 1, default is 1). |
start |
The lag that the extremogram plots starts at (an integer not greater than |
Cross extremogram values and a plot (if requested).
Davis, R. A., Mikosch, T., & Cribben, I. (2012). Towards estimating extremal serial dependence via the bootstrapped extremogram. Journal of Econometrics,170(1), 142-152.
Davis, R. A., Mikosch, T., & Cribben, I. (2011). Estimating extremal dependence in univariate and multivariate time series via the extremogram.arXiv preprint arXiv:1107.5592.
# generate a GARCH(1,1) process omega = 1 alpha1 = 0.1 beta1 = 0.6 alpha2 = 0.11 beta2 = 0.78 n = 1000 quant = 0.95 type = 1 maxlag = 70 df = 3 G1 = extremogram:::garchsim(omega,alpha1,beta1,n,df) G2 = extremogram:::garchsim(omega,alpha2,beta2,n,df) data = cbind(G1, G2) extremogram2(data, quant, quant, maxlag, type, 1, 1, 0)
# generate a GARCH(1,1) process omega = 1 alpha1 = 0.1 beta1 = 0.6 alpha2 = 0.11 beta2 = 0.78 n = 1000 quant = 0.95 type = 1 maxlag = 70 df = 3 G1 = extremogram:::garchsim(omega,alpha1,beta1,n,df) G2 = extremogram:::garchsim(omega,alpha2,beta2,n,df) data = cbind(G1, G2) extremogram2(data, quant, quant, maxlag, type, 1, 1, 0)
The function estimates the sample return time extremogram and creates an extremogram plot.
extremogramr(x, type, maxlag, uplevel = 1, lowlevel = 0, histogram = 1, cutoff = 1)
extremogramr(x, type, maxlag, uplevel = 1, lowlevel = 0, histogram = 1, cutoff = 1)
x |
Univariate time series (a vector). |
type |
Extremogram type. If type = 1, the upper tail extremogram is estimated. If type = 2, the lower tail extremogram is estimated. If type = 3, both upper and lower tail extremogram is estimated. |
maxlag |
Number of lags to include in the extremogram (an integer). |
uplevel |
Quantile of the time series to indicate a upper tail extreme event (a number between 0 and 1, default is 1). |
lowlevel |
Quantile of the time series to indicate a lower tail extreme event (a number between 0 and 1, default is 0). |
histogram |
An extremogram plot. If histogram = 1, a plot is created (default). If histogram = 0, no plot is created. |
cutoff |
The cutoff of the y-axis on the plot (a number between 0 and 1, default is 1). |
Extremogram values, return time for extreme events, mean return time and a plot (if requested).
Davis, R. A., Mikosch, T., & Cribben, I. (2012). Towards estimating extremal serial dependence via the bootstrapped extremogram. Journal of Econometrics,170(1), 142-152.
Davis, R. A., Mikosch, T., & Cribben, I. (2011). Estimating extremal dependence in univariate and multivariate time series via the extremogram.arXiv preprint arXiv:1107.5592.
# generate a GARCH(1,1) process omega = 1 alpha = 0.1 beta = 0.6 n = 1000 uplevel = 0.95 lowlevel = 0.05 type = 3 maxlag = 70 df = 3 G = extremogram:::garchsim(omega,alpha,beta,n,df) extremogramr(G, type, maxlag, uplevel, lowlevel, 1, 1)
# generate a GARCH(1,1) process omega = 1 alpha = 0.1 beta = 0.6 n = 1000 uplevel = 0.95 lowlevel = 0.05 type = 3 maxlag = 70 df = 3 G = extremogram:::garchsim(omega,alpha,beta,n,df) extremogramr(G, type, maxlag, uplevel, lowlevel, 1, 1)
The function estimates empirical confidence bands for the sample univariate extremogram via a permutation procedure under the assumption that the data are independent.
permfn1(x, p, m, type, exttype, maxlag, start = 1, alpha = 0.05)
permfn1(x, p, m, type, exttype, maxlag, start = 1, alpha = 0.05)
x |
Univariate time series (a vector). |
p |
Quantile of the time series to indicate an extreme event (a number between 0 and 1). |
m |
Number of permutations (an integer). |
type |
Type of confidence bands. If type=1, it adds all permutations to the sample
extremogram plot. If type=2, it adds the |
exttype |
Extremogram type (see |
maxlag |
Number of lags to include in the extremogram (an integer). |
start |
The lag that the extremogram plots starts at (an integer not greater than |
alpha |
Significance level for the confidence bands (a number between 0 and 1, default is 0.05). |
The empirical confidence bands are added to the sample univariate extremogram plot.
Davis, R. A., Mikosch, T., & Cribben, I. (2012). Towards estimating extremal serial dependence via the bootstrapped extremogram. Journal of Econometrics,170(1), 142-152.
Davis, R. A., Mikosch, T., & Cribben, I. (2011). Estimating extremal dependence in univariate and multivariate time series via the extremogram.arXiv preprint arXiv:1107.5592.
# generate a GARCH(1,1) process omega = 1 alpha = 0.1 beta = 0.6 n = 1000 quant = 0.95 exttype = 1 maxlag = 70 df = 3 type = 3 m = 10 G = extremogram:::garchsim(omega,alpha,beta,n,df) extremogram1(G, quant, maxlag, exttype, 1, 1, 0) permfn1(G, quant, m, type, exttype, maxlag, 1, 0.05)
# generate a GARCH(1,1) process omega = 1 alpha = 0.1 beta = 0.6 n = 1000 quant = 0.95 exttype = 1 maxlag = 70 df = 3 type = 3 m = 10 G = extremogram:::garchsim(omega,alpha,beta,n,df) extremogram1(G, quant, maxlag, exttype, 1, 1, 0) permfn1(G, quant, m, type, exttype, maxlag, 1, 0.05)
The function estimates empirical confidence bands for the sample cross extremogram via a permutation procedure under the assumption that the data are independent.
permfn2(x, p1, p2, m, type, exttype, maxlag, start = 1, alpha = 0.05)
permfn2(x, p1, p2, m, type, exttype, maxlag, start = 1, alpha = 0.05)
x |
Bivariate time series (n by 2 matrix). |
p1 |
Quantile of the first time series to indicate an extreme event (a number between 0 and 1). |
p2 |
Quantile of the second time series to indicate an extreme event (a number between 0 and 1). |
m |
Number of permutations (an integer). |
type |
Type of confidence bands. If type=1, it adds all permutations to the sample
extremogram plot. If type=2, it adds the |
exttype |
Extremogram type (see |
maxlag |
Number of lags to include in the extremogram (an integer). |
start |
The lag that the extremogram plots starts at (an integer not greater than |
alpha |
Significance level for the confidence bands (a number between 0 and 1, default is 0.05). |
The empirical confidence bands are added to the sample cross extremogram plot.
Davis, R. A., Mikosch, T., & Cribben, I. (2012). Towards estimating extremal serial dependence via the bootstrapped extremogram. Journal of Econometrics,170(1), 142-152.
Davis, R. A., Mikosch, T., & Cribben, I. (2011). Estimating extremal dependence in univariate and multivariate time series via the extremogram.arXiv preprint arXiv:1107.5592.
# generate a GARCH(1,1) process omega = 1 alpha1 = 0.1 beta1 = 0.6 alpha2 = 0.11 beta2 = 0.78 n = 1000 quant = 0.95 exttype = 1 maxlag = 70 df = 3 type = 3 m = 10 G1 = extremogram:::garchsim(omega,alpha1,beta1,n,df) G2 = extremogram:::garchsim(omega,alpha2,beta2,n,df) data = cbind(G1, G2) extremogram2(data, quant, quant, maxlag, type, 1, 1, 0) permfn2(data, quant, quant, m, type, exttype, maxlag, 1, 0.05)
# generate a GARCH(1,1) process omega = 1 alpha1 = 0.1 beta1 = 0.6 alpha2 = 0.11 beta2 = 0.78 n = 1000 quant = 0.95 exttype = 1 maxlag = 70 df = 3 type = 3 m = 10 G1 = extremogram:::garchsim(omega,alpha1,beta1,n,df) G2 = extremogram:::garchsim(omega,alpha2,beta2,n,df) data = cbind(G1, G2) extremogram2(data, quant, quant, maxlag, type, 1, 1, 0) permfn2(data, quant, quant, m, type, exttype, maxlag, 1, 0.05)
The function estimates empirical confidence bands for the sample returt time extremogram via a permutation procedure under the assumption that the data are independent.
permfnr(x, m, type, exttype, maxlag, uplevel = 1, lowlevel = 0, start = 1, alpha = 0.05)
permfnr(x, m, type, exttype, maxlag, uplevel = 1, lowlevel = 0, start = 1, alpha = 0.05)
x |
Univariate time series (a vector). |
m |
Number of permutations (an integer). |
type |
Type of confidence bands. If type=1, it adds all permutations to the sample
extremogram plot. If type=2, it adds the |
exttype |
Extremogram type (see |
maxlag |
Number of lags to include in the extremogram (an integer). |
uplevel |
Quantile of the time series to indicate a upper tail extreme event (a number between 0 and 1, default is 1). |
lowlevel |
Quantile of the time series to indicate a lower tail extreme event (a number between 0 and 1, default is 0). |
start |
The lag that the extremogram plots starts at (an integer not greater than |
alpha |
Significance level for the confidence bands (a number between 0 and 1, default is 0.05). |
Davis, R. A., Mikosch, T., & Cribben, I. (2012). Towards estimating extremal serial dependence via the bootstrapped extremogram. Journal of Econometrics,170(1), 142-152.
Davis, R. A., Mikosch, T., & Cribben, I. (2011). Estimating extremal dependence in univariate and multivariate time series via the extremogram.arXiv preprint arXiv:1107.5592.
# generate a GARCH(1,1) process omega = 1 alpha = 0.1 beta = 0.6 n = 1000 uplevel = 0.95 lowlevel = 0.05 exttype = 3 maxlag = 70 type = 3 m = 10 df = 3 G = extremogram:::garchsim(omega,alpha,beta,n,df) extremogramr(G, type, maxlag, uplevel, lowlevel, 1, 1) permfnr(G, m, type, exttype, maxlag, uplevel, lowlevel, 1, 0.05)
# generate a GARCH(1,1) process omega = 1 alpha = 0.1 beta = 0.6 n = 1000 uplevel = 0.95 lowlevel = 0.05 exttype = 3 maxlag = 70 type = 3 m = 10 df = 3 G = extremogram:::garchsim(omega,alpha,beta,n,df) extremogramr(G, type, maxlag, uplevel, lowlevel, 1, 1) permfnr(G, m, type, exttype, maxlag, uplevel, lowlevel, 1, 0.05)