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,
lags = -6:6,
nboot = 499L,
level = 0.05,
seed = NULL
)
# S3 method for class 'cobubble_test'
autoplot(object, ...)Arguments
- y, x
Numeric vectors of equal length, or objects coercible to one via
as.numeric().xis the (candidate) explosive-episode regressor;yis tested for co-explosivity withx_{t-lag}.- lag
The lead/lag
iinx_{t-lag}. IfNULL(default), it is estimated fromlagsby minimizing the residual variance (Section VI'si_hat).- lags
Candidate lag values searched when
lag = NULL. Default-6:6, as in the paper's own simulation design.- nboot
Number of wild bootstrap replications.
- level
Nominal test size (upper-tail rejection region).
- seed
Optional seed for the bootstrap draws.
- object
An object of class
cobubble_test, the output ofcobubble_test.
Value
An object of class cobubble_test: a list with the
observed statistic S, the (given or estimated) lag, the
bootstrap critical value cv at level, 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/autoplot – 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.
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.
Examples
# \donttest{
res <- cobubble_test(sim_data$psy1, sim_data$psy2, nboot = 199L, seed = 1)
print(res)
#>
#> ── cobubble_test (lag = -2, nboot = 199) ───────────────────────────────────────
#>
#> S = 1.533, cv(95%) = 0.2998, p-value = 0
#> Co-explosivity rejected at the 5% level.
#>
# Force a specific lead/lag instead of estimating it
res_lag0 <- cobubble_test(sim_data$psy1, sim_data$psy2, lag = 0L, nboot = 199L, seed = 1)
print(res_lag0)
#>
#> ── cobubble_test (lag = 0, nboot = 199) ────────────────────────────────────────
#>
#> S = 1.802, cv(95%) = 0.3759, p-value = 0
#> Co-explosivity rejected at the 5% level.
#>
# Plot the two series being tested for co-explosivity
autoplot(res)
# }
