Description Usage Arguments Value Examples
Advances in Financial Machine Learning, Snippet 2.4, page 39. The Symmetric Dynamic/Fixed CUSUM Filter.
1 | cusum_filter(price, threshold, return_datetime = TRUE)
|
price |
vector of prices |
threshold |
scalar or numeric vector of same size as price. When the change is larger than the threshold, the function captures it as an even |
return_datetime |
Should the function return datetime object or index of cusum filter |
vector of cusum events or datetime of cusum events
1 2 | data("spy")
cusum_events <- cusum_filter(subset(spy, select = c("index", "close")), 0.001)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.