# NOT RUN {
{
library(zoo)
library(xtable)
library(ggplot2)
sp500 <- sp500m # choose the monthly data
price <- as.vector(coredata(sp500)) # retrieve prices
setpar_dating_alg(4, 6, 4, 16, 20) # parameters for monthly data
bull <- run_dating_alg(price) # detect the states
bb.summary.stat(price, bull)
}
# }
Run the code above in your browser using DataLab