make_transform: Make simple transformations of an xts matrix

Description Usage Arguments Value See Also

Description

This function takes an xts matrix and applies a simple feature transformation to it in a columnwise fashion. For example, the matrix may be a series of asset prices. The feature transformation could be to perform a rolling SMA to it.

Usage

1
make_transform(data, feature, addname = FALSE)

Arguments

data

The xts matrix containing the data to transform. The feature is applied to each column as specified by argument 'feature'.

feature

The definition of the feature to apply to the data matrix. See the Details section for 'make_features' for the syntax for specifying a simple feature.

addname

Logical. Specifies whether the column name of the xts matrix returned stay as they were provided, or whether the feature name is appended to it.

Value

Returns an xts matrix of identical dimensions as data, with each column having the specified feature applied to it. Leading NAs are padded as needed when computing the feature.

See Also

make_features


jeanmarcgp/xtsanalytics documentation built on May 19, 2019, 12:38 a.m.