PSY: Estimate PSY's BSADF sequence of test statistics

Description Usage Arguments Value References Examples

View source: R/PSY.R

Description

PSY implements the real time bubble detection procedure of Phillips, Shi and Yu (2015a,b)

Usage

1
PSY(y, swindow0, IC = 0, adflag = 0)

Arguments

y

A vector. The data.

swindow0

A positive integer. Minimum window size (default = T (0.01 + 1.8/√{T}), where T denotes the sample size)

IC

An integer. 0 for fixed lag order (default), 1 for AIC and 2 for BIC (default = 0).

adflag

An integer, lag order when IC=0; maximum number of lags when IC>0 (default = 0).

Value

Vector, BSADF test statistic.

References

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.

Examples

1
2
y     <- rnorm(80)
bsadf <- PSY(y, IC = 0, adflag = 1)

psymonitor documentation built on May 2, 2019, 1:33 p.m.