genMA {avfintools}R Documentation

Generate moving averages

Description

Description

Usage

genMA(df, ma)

Arguments

df

Dataframe with price data

ma

# of periods for the moving average to calculate

Value

a vector with the same number of columns as df showing the moving averages. Periods before moving average should be not considered for use. Output is kept same columns for compatibility.

Examples

SPYDMA200 <- genMA(SPYdaily, 14)

[Package avfintools version 0.1.0 Index]