Summary
ZeroLagEMA is RTTA's streaming implementation of: Zero-lag exponential moving average using de-lagged price into an EMA.
Update API
result = rtta.ZeroLagEMA().update(value)
The update(...) call consumes one observation using value. advance(...)
uses the same inputs when the caller wants to update state without materializing
a Python return value.
Theory Of Operation
ZeroLagEMA reduces EMA lag by feeding a de-lagged series into a standard EMA.
The lag estimate is half the EMA period (integer), and the de-lagged input is
current price plus the difference between current and lagged price.
Recurrence
Let \(z_t = value_t\), \(n\) the window, and \(L=\lfloor (n-1)/2 \rfloor\).
with the same EMA seeding rules as EMA. When \(L=0\),
\(\tilde{z}_t=z_t\).
The return value is the current scalar indicator value.
Composed Primitives
Implementation Notes
The recurrence is implemented in src/rtta/indicator.cpp in class ZeroLagEMA.
