Testing for and dating periods of explosive
dynamics (exuberance) in time series using the univariate and panel
recursive unit root tests proposed by Phillips et al. (2015)
Testing for and dating periods of explosive dynamics (exuberance) in time series using recursive unit root tests as proposed by Phillips, P. C., Shi, S. and Yu, J. (2015a). Simulate a variety of periodically-collapsing bubble models. The estimation and simulation utilize the matrix inversion lemma from the recursive least squares algorithm, which results in a significant speed improvement.
radf()
: Recursive Augmented Dickey-Fuller testmc_cv()
: Monte Carlo critical valueswb_cv()
: Wild Bootstrap critical valuessb_cv()
: Sieve Bootstrap (panel) critical valuessim_dgp1()
: Simulation of a single-bubble processsim_dgp2()
: Simulation of a two-bubble processsim_blan()
: Simulation of a Blanchard (1979) bubble processsim_evans()
: Simulation of a Evans (1991) bubble processsim_div()
: Simulation of dividendsYou can install the released version of exuber from CRAN with:
install.packages("exuber")
And the development version from GitHub with:
if(!require(devtools)) install.packages("devtools")devtools::install_github("kvasilopoulos/exuber")
Note that development version requires compilation, so to install you will need the appropriate development tools.
If you encounter a clear bug, please file a reproducible example on GitHub.
This is a basic example which shows you how to use exuber:
library(exuber)# Simulate data witn n = 100 observationsset.seed(112)sim1 <- sim_dgp1(n = 100) # one bubblesim2 <- sim_dgp2(n = 100) # two bubblesdta <- data.frame("onebubble" = sim1,"twobbubbles" = sim2)ts <- radf(dta, lag = 1)
Report t-stats with the assigned critical values
summary(ts)#>#> Recursive Unit Root#> ----------------------------------#> H0: Unit root#> H1: Explosive root#> ----------------------------------#> Critical values: Monte Carlo#> Minimum window: 19#> Iterations: 2000#> Lag: 1#> ----------------------------------#> onebubble#> tstat 90% 95% 99%#> ADF -2.304 -0.4035 -0.0762 0.5104#> SADF 4.522 1.0074 1.3484 1.9454#> GSADF 4.718 1.6942 1.9259 2.6191#>#> twobbubbles#> tstat 90% 95% 99%#> ADF -2.411 -0.4035 -0.0762 0.5104#> SADF 4.057 1.0074 1.3484 1.9454#> GSADF 5.571 1.6942 1.9259 2.6191
Date stamp periods of explosive behaviour
datestamp(ts)#>#> Datestamp: Individual#> -----------------------------------#> onebubble :#> Start End Duration#> 1 40 55 16#>#> twobbubbles :#> Start End Duration#> 1 24 40 17#> 2 62 70 9
The output of autoplot is a list of ggplots
ts %>%autoplot() %>%ggarrange()
This package is free and open source software, licensed under GPL-3.
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.
sb_cv
reference.datestamp
and diagnostics
.datestamp
dummy is now an attribute.Some of the arguments in the functions were included as options, you can
set the package options with e.g. options(exuber.show_progress = TRUE)
.
parallel
option boolean, allows for parallel in critical values computation.ncores
option numeric, sets the number of cores, defaults to max - 1.show_progress
option boolean, allows you to disable the progress bar, defaults to TRUE.radf()
sb_cv()
function: Panel Sieve Bootstrapped critical valuessummary()
, diagnostics
,
datestamp()
and autoplot()
, without having to specify argument cv. The
critical values have been simulated from mc_cv()
function and stored as data.
Custom critical values should be provided by the user with the option cv
.ggarrange()
function, that can arrange a list of ggplot objects into a single grob.fortify
to arrange a data.frame from radf()
function.radf()
can parse date from ts
objects.report()
has been renamed into summary()
.plot()
has been renamed into autoplot()
.plot()
and report()
are soft deprecated.