
Bivariate Bubble Relationships: cobubble_test() and contagion_reg()
Source:vignettes/co-explosivity.Rmd
co-explosivity.RmdTwo different questions about two series
Both functions look at a pair of series that each contain, or might contain, an explosive episode. They ask different questions.
-
cobubble_test()(Evripidou, Harvey, Leybourne & Sollis 2022) is a formal hypothesis test of whether the explosive episodes ofyandxare the same episode, that is, whethery_t - alpha - beta * x_{t-i}is stationary for some lag or leadi. It is a KPSS-type test whose null hypothesis is co-explosivity (a stationary residual). Rejecting the null therefore means that the bubbles in the two series do not come from the same underlying process. -
contagion_reg()(Greenaway-McGrevy & Phillips 2016) does no formal inference. It estimates a time-varying contagion coefficientdelta_2(r)with a Nadaraya-Watson kernel regression. At each pointrin the sample, the coefficient measures how strongly the fixed-window AR(1) coefficient of a “peripheral” seriesymoves with the coefficient of a “core” series.
Neither function returns the radf_obj class (see
vignette("naming-and-analysis")).
cobubble_test(): are these the same bubble?
sim_coexplosive() implements the data generating process
of Evripidou et al.: y is a linear function of an explosive
x plus noise. The pair is co-explosive, so a correct test
should not reject:
xy <- sim_coexplosive(n = 100, seed = 123)
res <- cobubble_test(xy$y, xy$x, nboot = 199, seed = 1)
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.For contrast, sim_data$psy1 and
sim_data$psy2 are simulated independently, so by
construction they share no bubble process:
cobubble_test(sim_data$psy1, sim_data$psy2, nboot = 199, 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.Here S clearly exceeds its wild-bootstrap critical
value, which is robust to heteroskedasticity, and co-explosivity is
rejected, as it should be.
contagion_reg(): how strongly do they co-move, and
when?
For the co-explosive pair, the AR(1) coefficient of y
follows that of x almost one for one throughout the
sample:
cr <- contagion_reg(xy$y, xy$x, d = 0)
cr
#>
#> ── contagion_reg (n = 100, S = 33, d = 0, h = 0.6567) ──────────────────────────
#>
#> delta_2(r) range: [0.948, 0.965]cr$delta2 holds the whole estimated path over
cr$r_grid, while print() shows only its
range:
plot(cr$r_grid, cr$delta2, type = "l",
xlab = "r (fraction of sample)", ylab = expression(delta[2](r)),
main = "Estimated time-varying contagion coefficient")
For contrast, the two independent sim_data series give a
coefficient path that stays far below one:
cr_null <- contagion_reg(sim_data$psy1, sim_data$psy2, d = 0)
range(cr_null$delta2)
#> [1] 0.1628972 0.1823787
range(cr$delta2)
#> [1] 0.9476613 0.9652861Which to reach for
- If you want a yes or no answer, with a critical value, to the
question of whether two series share the same explosive episode, use
cobubble_test(). - If you want to see how the comovement between the AR coefficients of
two series changes over the sample, for example to watch contagion build
up before a joint collapse, and you do not need a formal test, use
contagion_reg().