Skip to contents

cobubble_test tests whether two series that each contain an explosive episode are co-explosive: whether a linear combination y_t - alpha - beta * x_{t-lag} is stationary, i.e. whether the explosive dynamics in y and x are the same underlying phenomenon (possibly migrating from one series to the other with a lead or lag) rather than independent explosive episodes.

Usage

cobubble_test(
  y,
  x,
  lag = NULL,
  lag_grid = -6:6,
  nboot = 499L,
  sig_lvl = 95,
  seed = NULL
)

Arguments

y, x

Numeric vectors of equal length, or objects coercible to one via as.numeric(). x is the (candidate) explosive-episode regressor; y is tested for co-explosivity with x_{t-lag}.

lag

The lead/lag i in x_{t-lag}. If NULL (default), it is estimated from lag_grid by minimizing the residual variance (Section VI's i_hat).

lag_grid

Candidate lag values searched when lag = NULL. Default -6:6, as in the paper's own simulation design.

nboot

Number of wild bootstrap replications.

sig_lvl

Significance level, on the same 0-100 scale as datestamp's sig_lvl (default 95, i.e. a 5\ upper-tail rejection region).

seed

Optional seed for the bootstrap draws.

Value

An object of class cobubble_test_obj: a list with the observed statistic S, the (given or estimated) lag, the bootstrap critical value cv at sig_lvl, the bootstrap p-value p_value, and reject (TRUE if S exceeds cv, i.e. co-explosivity is rejected).

Details

Unlike radf (a right-tailed ADF-family test for the presence of explosiveness), this is a stationarity (KPSS-type) test: the null hypothesis is co-explosivity, i.e. that the residuals of y regressed on a constant and x_{t-lag} are I(0). Because the null limiting distribution of the statistic depends on the pattern of heteroskedasticity in the errors (Evripidou, Harvey, Leybourne & Sollis 2022, Theorem 1), critical values are obtained via a wild bootstrap that reproduces that same heteroskedasticity pattern in the bootstrap samples (Theorem 2).

Note

The critical value is a wild bootstrap of the residuals, computed internally on every call (Theorem 2) – there is no separate/reusable cv function for this test.

Returns its own class (not radf_obj), so it does not plug into summary()/\link{datestamp}/tidy; it has its own print() and autoplot() methods instead. Prints its own statistic/critical-value/p-value summary – see vignette("naming-and-analysis", package = "exuber") for the full picture of which functions do and don't fit that pipeline.

Status

[Experimental]

References

Evripidou, A. C., Harvey, D. I., Leybourne, S. J., & Sollis, R. (2022). Testing for co-explosive behaviour in financial time series. Oxford Bulletin of Economics and Statistics, 84(3), 624-650.

See also

Other multivariate: contagion_reg(), radf_common()

Examples

# \donttest{
# A genuinely co-explosive pair (Evripidou et al.'s own DGP): not rejected
xy <- sim_coexplosive(n = 100, seed = 123)
res <- cobubble_test(xy$y, xy$x, nboot = 199L, seed = 1)
print(res)
#> 
#> ── cobubble_test (lag = 0, nboot = 199) ────────────────────────────────────────
#> 
#> S = 0.2364, cv(95%) = 0.4048, p-value = 0.1508
#> Co-explosivity not rejected at the 5% level.
#> 

# Force a specific lead/lag instead of estimating it
res_lag0 <- cobubble_test(xy$y, xy$x, lag = 0L, nboot = 199L, seed = 1)
print(res_lag0)
#> 
#> ── cobubble_test (lag = 0, nboot = 199) ────────────────────────────────────────
#> 
#> S = 0.2364, cv(95%) = 0.4048, p-value = 0.1508
#> Co-explosivity not rejected at the 5% level.
#> 

# Two independent bubbles: co-explosivity correctly rejected
cobubble_test(sim_data$psy1, sim_data$psy2, nboot = 199L, seed = 1)
#> 
#> ── cobubble_test (lag = -2, nboot = 199) ───────────────────────────────────────
#> 
#> S = 1.533, cv(95%) = 0.2998, p-value = 0
#> Co-explosivity rejected at the 5% level.
#> 

# Plot the two series being tested for co-explosivity
autoplot(res)

# }