smooth.ma: Apply a moving average filter

View source: R/itsmr.R

smooth.maR Documentation

Apply a moving average filter

Description

Apply a moving average filter

Usage

smooth.ma(x, q)

Arguments

x

Time series data

q

Filter order

Details

The averaging function uses 2q+1 values.

Value

Returns a vector the same length as x.

Examples

y = smooth.ma(strikes,2)
plotc(strikes,y)

itsmr documentation built on Aug. 6, 2022, 9:08 a.m.