One measure of price volatility is to compute s, averaging the square difference between current closing
prices and a smoothing filter, yi, and taking the square root — that is,
with ci denoting the current closing price and yi denoting the current value of a data filter such as an
N-point moving average. The s uses a longer 2N data length because there is much greater noise
variability when we compute the square error.
First, we examine data lag versus moving average length N for a standard moving average. Suppose that
the input sequence of values is a linear trend, as in ci = i. Then the moving average response is given by: