Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

fin-splits

splits


Description

Searches for outlier splits in a 'timeSeries' object.

Usage

splits(x, sd = 3, complement = TRUE, ...)

Arguments

x

a 'timeSeries' object.

sd

a numeric value of standard deviations, e.g. 5 means that values larger or smaller than five times the standard deviation of the series will be detected.

complement

a logical flag, should the outlier series or its complements be returned?

...

arguments to be passed.

Details

This function is thought to find splits in financial price or index series If a price or index is splitted we observe in the returns a big jump of several standard deviations which is identified usual as an outlier.

Examples

## Create a Return Series with a Split - 
   data <- runif(12, -1, 1)
   data[6] <- 20
   x <- timeSeries(data, timeCalendar(), units="RUNIF")
   x
   
## Search for the Split:
   splits(x, sd=3, complement=TRUE)
   splits(x, sd=3, complement=FALSE)

timeSeries

Financial Time Series Objects (Rmetrics)

v3062.100
GPL (>= 2)
Authors
Diethelm Wuertz [aut] (original code), Tobias Setz [cre], Yohan Chalabi [ctb], Martin Maechler [ctb] (<https://orcid.org/0000-0002-8685-9910>)
Initial release
2020-01-24

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.