Summary
RangeActionVerificationIndex (RAVI) is RTTA's streaming implementation of
Tushar Chande's range action verification index: the absolute gap between a
short and a long simple moving average, expressed as a percent of the long SMA.
Update API
value = rtta.RangeActionVerificationIndex(
short_window=7, long_window=65, fillna=True
).update(close)
The update(...) call consumes one close. advance(...) updates state without
returning a Python value. Scalar batch(...) returns a NumPy array.
Theory Of Operation
RAVI is a trend-presence measure in the same family as ADX: large separation between a fast and a slow average means the market is acting directionally; small separation means range-bound action. Unlike ADX, RAVI does not use true range or directional movement — only the relative SMA gap.
Recurrence
Let \(x_t\) be close, \(n_s\) be short_window, and \(n_\ell\) be long_window.
With fillna=False, outputs are NaN until the long window is full.
Implementation Notes
The recurrence is implemented in src/rtta/indicator.cpp in
class RangeActionVerificationIndex with two nested SMA members.
