strength_ROC: Creates a ranking of rate of change representing strength of...

Description Usage Arguments Value See Also Examples

View source: R/strength_ROC.R

Description

Creates a ranking of rate of change representing strength of asset returns. Uses the TTR::ROC function for rate-of-change value. Applies the TTR::runSD running standard deviations. Computes strength as strength <- roc / rd. Uses the discrete ROC type.

Usage

1
strength_ROC(x, roc_n = 3, sd_n = 3)

Arguments

x

price history as XTS, more than one column of asset prices.

roc_n

ROC lookback period in same periodicity as x; default 3.

sd_n

standard deviation moving window length; default 3.

Value

a row rank as determined by row_rank

See Also

row_rank, TTR::ROC, TTR::runSD

Examples

1
2
3
4
5
6
7
8
## Not run: 
library(quantmod)
getSymbols("XLP",auto.assign=TRUE)
getSymbols("XLV",auto.assign=TRUE)
ranking <- strength_ROC(cbind(Cl(XLP),Cl(XLV)),6,3)
tail(ranking)

## End(Not run)

greatgray/scorecard documentation built on May 17, 2019, 8:34 a.m.