Skip to contents

The rolling_standard_deviation() is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base R, and the package-wide dependencies. Ie. class in, class out.

Usage

rolling_standard_deviation(x, n = 10, k = 1)

Arguments

x

(double). A vector.

n

(integer). An integer of length 1.

k

(double). Multiplier for the standard deviation.

Value

A double vector with the same length of x

Author

Serkan Korkmaz

Examples

## load Bitcoin (BTC)
## series
data(BTC, package = "talib")

## calculate the indicator
## Open
output <- talib::rolling_standard_deviation(x = BTC[[1]])

## display the results
utils::tail(output)
#> [1] 3775.666 3126.418 1926.651 1686.101 1869.507 2048.963