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

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
#> GMT
#>                  RUNIF
#> 2023-01-01  0.02818446
#> 2023-02-01  0.81353192
#> 2023-03-01  0.32781337
#> 2023-04-01 -0.86725243
#> 2023-05-01  0.16026217
#> 2023-06-01 20.00000000
#> 2023-07-01  0.88502200
#> 2023-08-01 -0.99927651
#> 2023-09-01 -0.36096099
#> 2023-10-01 -0.24913208
#> 2023-11-01  0.29574272
#> 2023-12-01 -0.72810981

## Search for the Split:
splits(x, sd=3, complement=TRUE)
#> GMT
#>                  RUNIF
#> 2023-01-01  0.02818446
#> 2023-02-01  0.81353192
#> 2023-03-01  0.32781337
#> 2023-04-01 -0.86725243
#> 2023-05-01  0.16026217
#> 2023-07-01  0.88502200
#> 2023-08-01 -0.99927651
#> 2023-09-01 -0.36096099
#> 2023-10-01 -0.24913208
#> 2023-11-01  0.29574272
#> 2023-12-01 -0.72810981
splits(x, sd=3, complement=FALSE)
#> GMT
#>            RUNIF
#> 2023-06-01    20