Skip to contents

Change-point detection is related to event/trend change detection. Change Finder GARCH detects change points based on deviations relative to linear regression model doi:10.1109/TKDE.2006.1599387. It wraps the GARCH model presented in the rugarch library.

Usage

hcp_garch(sw_size = 5)

Arguments

sw_size

Sliding window size

Value

hcp_garch object

Examples

library(daltoolbox)

#loading the example database
data(examples_changepoints)

#Using volatility example
dataset <- examples_changepoints$volatility
head(dataset)
#>         serie event
#> 1  1.61424200 FALSE
#> 2  1.19696424 FALSE
#> 3 -0.02275846 FALSE
#> 4 -2.22607912 FALSE
#> 5  0.01189136 FALSE
#> 6 -0.03898793 FALSE

# 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),])
#> [1] idx   event type 
#> <0 rows> (or 0-length row.names)