powered by
Apply a moving average filter
smooth.ma(x, q)
Returns a vector the same length as x.
x
Time series data
Filter order
The averaging function uses 2q+1 values.
2q+1
y = smooth.ma(strikes,2) plotc(strikes,y)
Run the code above in your browser using DataLab