Lag of a delagged exponential moving average

The paper describes an adaptive IIR filter that has a gain adjusted with every new input sample, so the filter is not time invariant.

Expressing the "Zero Lag Indicator" from the paper in standard discrete signal processing notation, we have

$$\begin{align} w[n] & = \alpha x[n]+\left(1-\alpha\right)w[n-1] \\ \\ e[n] & = x[n] - y[n-1] \\ \\ y[n] & = \alpha\left(w[n]+k[n]e[n]\right) + (1-\alpha)y[n-1] \end{align}$$

Where

$x[n]$ is the input samples, denoted by "Close" in the paper

$w[n]$ is the normal EMA filter output

$e[n]$ is the sequence of error samples, denoted "Close -EC[1]" in the paper

$y[n]$ is the output of the indicator, denoted "EC" in the paper

$k[n]$ is the series of gains used to adapt the filter, denoted as "BestGain" in the paper

This time varying $k[n]$ makes analysis of the system delay difficult, if not impossible.

However, if we assume that $k[n] = k \; \forall n $, then we have a linear time-invariant IIR system that we can analyze for its group delay.

The group delay of a filter describes the envelope delay of a filter. For FIR filters, which commonly have a linear phase response, group delay is a constant value. For IIR filters, which usually have a non-linear phase response, the group delay will be a function of frequency. I.e. Different frequency components of the input signal will be delayed by different amounts.

The group delay of a filter is defined as the negative derivative, with respect to radian frequency, of the phase response of the transfer function of a system

$$\tau_g(\omega) = -\dfrac{d}{d\omega}\theta(\omega)$$

Where $$\theta(\omega) = \angle{} H\left(e^{j\omega}\right)$$

and $H(z) = \dfrac{Y(z)}{X(z)}$ is the Z Transform of the impulse response of the system.

So taking Z Transforms of the system's difference equations to convert time delays into algebraic expressions

$$W(z) = \alpha X(z) +(1-\alpha)W(z)z^{-1}$$

$$W(z) = \dfrac{\alpha}{1-(1-\alpha)z^{-1}}X(z)$$

$$E(z) = X(z) - Y(z)z^{-1}$$

$$Y(z) = \alpha\left(W(z) + kE(z)\right) + (1+\alpha)Y(z)z^{-1}$$

And after a bit of algebra we have

$$H(z) = \dfrac{Y(z)}{X(z)} = \alpha(\alpha+k)\dfrac{1-\dfrac{k(1-\alpha)}{\alpha+k}z^{-1}}{1-\left[2(1-\alpha)-\alpha k\right]z^{-1}+(1-\alpha)\left[(1-\alpha)-\alpha k\right]z^{-2}} $$

Now you can solve for the group delay as

$$\tau_g(\omega) = -\dfrac{d}{d\omega} \mathrm{arctan}\left(\dfrac{\mathrm{Im}\left[H(e^{j\omega})\right]}{\mathrm{Re}\left[H(e^{j\omega})\right]}\right)$$

That's going to be difficult to evaluate analytically, but it's probably possible. Keep in mind that this group delay is only good for the situation where the adaptive gain, "BestGain", $k$, is assumed to be constant.

There is no simple, systematic method for computing the group delay of the time varying filter when the adaptive gain, $k[n]$, is not constant. I would use simulation against many sets of real data, and empirically just determine an approximate number for the lag, for my signals of interest given specified filter parameters.