MultipleBubbles (version 0.1.0)

badf: Backward Augmented Dickey-Fuller Sequence.

Description

In this program, we calculate critical value sequences for the backward ADF statistic sequence for a matrix generated from a standard Normal distribution.

Usage

badf(m, t, adflag = 0, mflag = 1)

Arguments

m

Number of Monte Carlo replications. Must be bigger than 2.

t

Sample size. Must be bigger than 2.

adflag

Number of lags to be included in the ADF Test. Default equals 0.

mflag

1 for ADF with constant and whithout trend, 2 for ADF with constant and trend and 3 for ADF without constant and trend.

References

Phillips, P.C. & Shi, S. & Yu, J. (2015a). "Testing for Multiple Bubbles: Historical Episodes of Exuberance and Collapse in the S&P 500". SSRN Electronic Journal.

Examples

Run this code
# NOT RUN {
foo <- badf(m = 100, t = 50, adflag = 1, mflag = 1)
plot(foo$quantiles[2,], type = 'l')
# }

Run the code above in your browser using DataCamp Workspace