Description Usage Arguments Value Examples
time series extrema using important point algorithm
1 | find.imppoints(x, tolerance = 0.02, lookback = 20)
|
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 |
important points data object (object of class imppoints)
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.