genMA: Generate moving averages

View source: R/avfintools.R

genMAR 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)

avfintools documentation built on Oct. 6, 2022, 5:14 p.m.