index_2_movement: Index levels to Price movements

Description Usage Arguments Value Examples

View source: R/helper_functions.R

Description

Convert a series of index levels to period by period price movements.

Usage

1

Arguments

index

an R vector of numeric values with no NA's

Value

an R vector of numeric values with lenght 1 less than that of index. The length is one shorter than the input as there is movement for the first value - as it has nothing to refer to. If index contains any NA values an error is thrown

Examples

1
2
index <- runif(10)*1:10
index_2_movement(index)

MjStansfi/GEKS_package documentation built on May 12, 2021, 8:44 p.m.