disp
generates a data frame with bubble/crisis
periods identified by the PSY procedure
disp(OT, obs)
OT | A date vector. Bubbles/crisis periods identified by the
|
---|---|
obs | A positive integer. The number of observations. |
A vector of strings with bubble/crisis periods.
Phillips, P. C. B., Shi, S., & Yu, J. (2015a). Testing for multiple bubbles: Historical episodes of exuberance and collapse in the S&P 500. International Economic Review, 56(4), 1034--1078.
Phillips, P. C. B., Shi, S., & Yu, J. (2015b). Testing for multiple bubbles: Limit Theory for Real-Time Detectors. International Economic Review, 56(4), 1079--1134.
* Phillips, P. C. B., & Shi, S.(forthcoming). Real time monitoring of asset markets: Bubbles and crisis. In Hrishikesh D. Vinod and C.R. Rao (Eds.), Handbook of Statistics Volume 41 - Econometrics Using R.
data(spread) y <- spread$value[150:200] obs <- length(y) swindow0 <- floor(obs*(0.01 + 1.8/sqrt(obs))) dim <- obs - swindow0 + 1 Tb <- 24 + swindow0 - 1 # Estimate PSY statistics and CVs bsadf <- PSY(y, swindow0) quantilesBsadf <- cvPSYwmboot(y, swindow0, Tb=Tb, nboot = 49, nCores = 2) quantile95 <- quantilesBsadf %*% matrix(1, nrow = 1, ncol = dim) # locate bubble/crisis dates ind95 <- (bsadf > t(quantile95[2, ])) * 1 monitorDates <- spread$date[swindow0:obs] OT <- locate(ind95, monitorDates) # Show bubble/crisis periods disp(OT, obs)#> start end #> 1 1999-04-01 1999-04-01 #> 2 1999-06-01 1999-06-01