Econometric Analysis of Explosive Time Series

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) and Pavlidis et al. (2016) . The recursive least-squares algorithm utilizes the matrix inversion lemma to avoid matrix inversion which results in significant speed improvements. Simulation of a variety of periodically-collapsing bubble processes.


BuildStatus AppVeyor BuildStatus CRAN_Status_Badge lifecycle codecov

Description

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.

Overview

Estimation

  • radf() : Recursive Augmented Dickey-Fuller test

Simulate custom critical values

  • mc_cv() : Monte Carlo critical values
  • wb_cv() : Wild Bootstrap critical values
  • sb_cv() : Sieve Bootstrap (panel) critical values

Simulation

  • sim_dgp1() : Simulation of a single-bubble process
  • sim_dgp2() : Simulation of a two-bubble process
  • sim_blan() : Simulation of a Blanchard (1979) bubble process
  • sim_evans() : Simulation of a Evans (1991) bubble process
  • sim_div() : Simulation of dividends

Installation

You 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.

Usage

This is a basic example which shows you how to use exuber:

library(exuber)
# Simulate data witn n = 100 observations
set.seed(112)
sim1 <- sim_dgp1(n = 100) # one bubble
sim2 <- sim_dgp2(n = 100) # two bubbles
 
dta <- 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

Plotting

The output of autoplot is a list of ggplots

ts %>% 
  autoplot() %>% 
  ggarrange()

License

This package is free and open source software, licensed under GPL-3.

Code of Conduct

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.

News

exuber 0.2.1

  • Changed DESCRIPTION to include sb_cv reference.
  • Renamed boolean to dummy from datestamp and diagnostics.
  • datestamp dummy is now an attribute.

exuber 0.2.0

Options

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.

New features

  • Panel estimation in radf()
  • Added sb_cv() function: Panel Sieve Bootstrapped critical values
  • Default critical values are supplied directly into summary(), 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.
  • Added ggarrange() function, that can arrange a list of ggplot objects into a single grob.
  • Added fortify to arrange a data.frame from radf() function.

Improvements

  • Parallel and ncores arguments are now set as options.
  • Ability to remove progressbar from package options.
  • 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.

Bug Fixes

  • Progressbar appears in the beginning of the iteration
  • Plotting date now works without having to to include any additional plotting option

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("exuber")

0.2.1 by Kostas Vasilopoulos, 21 days ago


https://github.com/kvasilopoulos/exuber


Report a bug at https://github.com/kvasilopoulos/exuber/issues


Browse source code at https://github.com/cran/exuber


Authors: Kostas Vasilopoulos [cre, aut] , Efthymios Pavlidis [aut] , Simon Spavound [aut] , Enríque Martínez-García [aut]


Documentation:   PDF Manual  


GPL-3 license


Imports doSNOW, parallel, foreach, Rcpp, dplyr, glue, ggplot2, purrr, magrittr, lubridate, tibble, zoo, rlang, grid, gridExtra

Suggests knitr, rmarkdown, covr, testthat, withr

Linking to Rcpp, RcppArmadillo


See at CRAN