library(daltoolbox)
#loading the example database
data(examples_changepoints)
#Using volatility example
dataset <- examples_changepoints$volatility
head(dataset)
# setting up change point method
model <- hcp_garch()
# fitting the model
model <- fit(model, dataset$serie)
detection <- detect(model, dataset$serie)
# filtering detected events
print(detection[(detection$event),])
Run the code above in your browser using DataLab