Skip to contents

Wrapper around the function ecp::e.divisive() to create events for fgts_dygraph()

Usage

fg_addbreakouts(indta, annotationstyle = "singleasdate", ...)

Arguments

indta

Time series data.table with a date as the first column and a value series as the second column.

annotationstyle

String in set (singleasdate,singleasvalue,'breakno')

...

Parameters passed to ecp::e.divisive()

Value

data.table suitable for passing into fgts_dygraph() via the event_ds parameter

Details

Event Helpers : fg_addbreakouts

Examples

if (requireNamespace("ecp", quietly = TRUE)) {
dta <- tail(eqtypx[,.(date,QQQ,TLT)],2*260)
fgts_dygraph(dta,event_ds=fg_addbreakouts(dta,min.size=66,R=40),title="With Breakouts")
}
#> Warning: NAs introduced by coercion