fin-splits: splits

splitsR Documentation

splits

Description

Searches for outlier splits in a "timeSeries" object.

Usage

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

Arguments

x

a "timeSeries" object.

sd

numeric(1); deviations of how many standard deviations to consider too big? Can be fractional. 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 finds splits in financial price or index series. If a price or index is splitted we observe a big jump of several standard deviations in the returns, which is identified usually as an outlier.

Value

a "timeSeries" object

See Also

returns, cumulated, drawdowns, spreads, midquotes, index2wealth

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 documentation built on Sept. 30, 2024, 9:15 a.m.