Package 'extremogram'

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

Help Index


extremogram

Description

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:

  1. extremogram1

  2. extremogram2

  3. extremogramr

  4. bootconf1

  5. bootconf2

  6. bootconfr

  7. permfn1

  8. permfn2

  9. permfnr

Author(s)

Nadezda Frolova <[email protected]>, Ivor Cribben <[email protected]>

References

  1. Davis, R. A., Mikosch, T., & Cribben, I. (2012). Towards estimating extremal serial dependence via the bootstrapped extremogram. Journal of Econometrics,170(1), 142-152.

  2. 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.


Confidence bands for the sample univariate extremogram

Description

The function estimates confidence bands for the sample univariate extremogram using the stationary bootstrap.

Usage

bootconf1(x, R, l, maxlag, quant, type, par, start = 1, cutoff = 1,
  alpha = 0.05)

Arguments

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 extremogram1).

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 maxlag, default is 1).

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).

Value

Returns a plot of the confidence bands for the sample univariate extremogram.

References

  1. Davis, R. A., Mikosch, T., & Cribben, I. (2012). Towards estimating extremal serial dependence via the bootstrapped extremogram. Journal of Econometrics,170(1), 142-152.

  2. 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.

Examples

# 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)

Confidence bands for the sample cross extremogram

Description

The function estimates confidence bands for the sample cross extremogram using the stationary bootstrap.

Usage

bootconf2(x, R, l, maxlag, quant1, quant2, type, par, start = 1, cutoff = 1,
  alpha = 0.05)

Arguments

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 extremogram2).

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 maxlag, default is 1).

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).

Value

Returns a plot of the confidence bands for the sample cross extremogram.

References

  1. Davis, R. A., Mikosch, T., & Cribben, I. (2012). Towards estimating extremal serial dependence via the bootstrapped extremogram. Journal of Econometrics,170(1), 142-152.

  2. 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.

Examples

# 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)

Confidence bands for the sample return time extremogram

Description

The function estimates confidence bands for the sample return time extremogram using the stationary bootstrap.

Usage

bootconfr(x, R, l, maxlag, uplevel = 1, lowlevel = 0, type, par,
  start = 1, cutoff = 1, alpha = 0.05)

Arguments

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 extremogramr).

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 maxlag, default is 1).

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).

Value

Returns a plot of the confidence bands for the sample return time extremogram.

References

  1. Davis, R. A., Mikosch, T., & Cribben, I. (2012). Towards estimating extremal serial dependence via the bootstrapped extremogram. Journal of Econometrics,170(1), 142-152.

  2. 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.

Examples

# 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)

Sample univariate extremogram

Description

The function estimates the sample univariate extremogram and creates an extremogram plot.

Usage

extremogram1(x, quant, maxlag, type, ploting = 1, cutoff = 1, start = 0)

Arguments

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 maxlag, default is 0).

Value

Extremogram values and a plot (if requested).

References

  1. Davis, R. A., Mikosch, T., & Cribben, I. (2012). Towards estimating extremal serial dependence via the bootstrapped extremogram. Journal of Econometrics,170(1), 142-152.

  2. 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.

Examples

# 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)

Sample cross extremogram

Description

The function estimates the sample cross extremogram and creates an extremogram plot.

Usage

extremogram2(a, quant1, quant2, maxlag, type, ploting = 1, cutoff = 1,
  start = 0)

Arguments

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 maxlag, default is 0).

Value

Cross extremogram values and a plot (if requested).

References

  1. Davis, R. A., Mikosch, T., & Cribben, I. (2012). Towards estimating extremal serial dependence via the bootstrapped extremogram. Journal of Econometrics,170(1), 142-152.

  2. 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.

Examples

# 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)

Sample return time extremogram

Description

The function estimates the sample return time extremogram and creates an extremogram plot.

Usage

extremogramr(x, type, maxlag, uplevel = 1, lowlevel = 0, histogram = 1,
  cutoff = 1)

Arguments

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).

Value

Extremogram values, return time for extreme events, mean return time and a plot (if requested).

References

  1. Davis, R. A., Mikosch, T., & Cribben, I. (2012). Towards estimating extremal serial dependence via the bootstrapped extremogram. Journal of Econometrics,170(1), 142-152.

  2. 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.

Examples

# 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)

Confidence bands for the sample univariate extremogram

Description

The function estimates empirical confidence bands for the sample univariate extremogram via a permutation procedure under the assumption that the data are independent.

Usage

permfn1(x, p, m, type, exttype, maxlag, start = 1, alpha = 0.05)

Arguments

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 alpha/2 and (1-alpha)/2 empirical confidence bands for each lag. If type=3, it calculates the lag 1 alpha/2 and (1-alpha)/2 empirical confidence bands lag and uses them for all of the lags.

exttype

Extremogram type (see extremogram1).

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 maxlag, default is 1).

alpha

Significance level for the confidence bands (a number between 0 and 1, default is 0.05).

Value

The empirical confidence bands are added to the sample univariate extremogram plot.

References

  1. Davis, R. A., Mikosch, T., & Cribben, I. (2012). Towards estimating extremal serial dependence via the bootstrapped extremogram. Journal of Econometrics,170(1), 142-152.

  2. 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.

Examples

# 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)

Confidence bands for the sample cross extremogram

Description

The function estimates empirical confidence bands for the sample cross extremogram via a permutation procedure under the assumption that the data are independent.

Usage

permfn2(x, p1, p2, m, type, exttype, maxlag, start = 1, alpha = 0.05)

Arguments

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 alpha/2 and (1-alpha)/2 empirical confidence bands for each lag. If type=3, it calculates the lag 1 alpha/2 and (1-alpha)/2 empirical confidence bands lag and uses them for all of the lags.

exttype

Extremogram type (see extremogram2).

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 maxlag, default is 1).

alpha

Significance level for the confidence bands (a number between 0 and 1, default is 0.05).

Value

The empirical confidence bands are added to the sample cross extremogram plot.

References

  1. Davis, R. A., Mikosch, T., & Cribben, I. (2012). Towards estimating extremal serial dependence via the bootstrapped extremogram. Journal of Econometrics,170(1), 142-152.

  2. 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.

Examples

# 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)

Confidence bands for the sample return time extremogram

Description

The function estimates empirical confidence bands for the sample returt time extremogram via a permutation procedure under the assumption that the data are independent.

Usage

permfnr(x, m, type, exttype, maxlag, uplevel = 1, lowlevel = 0, start = 1,
  alpha = 0.05)

Arguments

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 alpha/2 and (1-alpha)/2 empirical confidence bands for each lag. If type=3, it calculates the lag 1 alpha/2 and (1-alpha)/2 empirical confidence bands lag and uses them for all of the lags.

exttype

Extremogram type (see extremogramr).

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 maxlag, default is 1).

alpha

Significance level for the confidence bands (a number between 0 and 1, default is 0.05).

References

  1. Davis, R. A., Mikosch, T., & Cribben, I. (2012). Towards estimating extremal serial dependence via the bootstrapped extremogram. Journal of Econometrics,170(1), 142-152.

  2. 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.

Examples

# 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)