extremogramr: Sample return time extremogram

Description Usage Arguments Value References Examples

Description

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

Usage

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# 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)

Example output

[[1]]
 [1] 0.25252525 0.11111111 0.08080808 0.05050505 0.07070707 0.01010101
 [7] 0.02020202 0.01010101 0.06060606 0.03030303 0.04040404 0.01010101
[13] 0.03030303 0.03030303 0.02020202 0.01010101 0.01010101 0.02020202
[19] 0.01010101 0.01010101 0.01010101 0.01010101 0.01010101 0.01010101
[25] 0.01010101 0.02020202 0.01010101 0.01010101 0.01010101 0.01010101
[31] 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000
[37] 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000
[43] 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000
[49] 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000
[55] 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000
[61] 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000
[67] 0.00000000 0.00000000 0.00000000 0.00000000

[[2]]
 [1]  5  1  3 17  2  3  1  9 34 13  1  8  1 30  1  3  1 43 10  4  5  1  4  3  1
[26]  5  2 14  4  1  1  4 11  3 10  1 11  2  1 75  3  5  2 23 41 14 13 41 11  1
[51]  1  1  1  2  7  1 22 42  6  1  1  2  1  1  2  9  1 35  3  2  5 14 10  1  4
[76]  2 13 15 26  9  2 15  1  5 11  9 53 22 24 12  2  3 18 25  7  9  5  9  1

[[3]]
[1] 9.858586

extremogram documentation built on May 2, 2019, 8:22 a.m.