find.imppoints: time series extrema using important point algorithm

Description Usage Arguments Value Examples

View source: R/supports.R

Description

time series extrema using important point algorithm

Usage

1
find.imppoints(x, tolerance = 0.02, lookback = 20)

Arguments

x

xts object or vector, representing a time series

tolerance

threshold for percentage change or vol multiple for extreme points

lookback

Used for volatility dependent adaptive threshold

Value

important points data object (object of class imppoints)

Examples

1
2
3
4
5
6
x <- quantmod::getSymbols("^GSPC", auto.assign = FALSE)
x <- x["2015/"]
imppts <- find.imppoints(x,2)
quantmod::chart_Series(x)
points(as.numeric(imppts$maxima$pos),as.numeric(imppts$maxima$value),bg="green",pch=24,cex=1.25)
points(as.numeric(imppts$minima$pos),as.numeric(imppts$minima$value),bg="red",pch=25,cex=1.25)

prodipta/techchart documentation built on Sept. 13, 2020, 2:51 p.m.