Laguerre RSI

The Laguerre RSI is an RSI by John Ehlers that runs over the four elements of a Laguerre filter instead of over four prices. The first element is an exponential moving average and each next one an all-pass element that delays the low frequencies more than the high ones. That warps time: four elements look as far back as a much longer window, so the RSI is smooth yet reacts quickly, with only four values to compute it from.

The formula for the Laguerre RSI starts from the four filter elements, each built from the one before with the damping factor gamma between 0 and 1:

\[L_{0} = (1 - \gamma) \cdot \text{Close} + \gamma \cdot L_{0,t-1}\] \[L_{1} = -\gamma \cdot L_{0} + L_{0,t-1} + \gamma \cdot L_{1,t-1}\] \[L_{2} = -\gamma \cdot L_{1} + L_{1,t-1} + \gamma \cdot L_{2,t-1}\] \[L_{3} = -\gamma \cdot L_{2} + L_{2,t-1} + \gamma \cdot L_{3,t-1}\]

The rises CU and the falls CD between neighbouring elements take the place of the gains and losses of the RSI:

\[\text{CU} = \sum_{k=1}^{3} \max\left(L_{k-1} - L_{k}, 0\right)\] \[\text{CD} = \sum_{k=1}^{3} \max\left(L_{k} - L_{k-1}, 0\right)\]

The Laguerre RSI is the share of the rises in the total, on the scale of 0 to 100:

\[\text{Laguerre RSI} = \frac{100 \cdot \text{CU}}{\text{CU} + \text{CD}}\]

A higher gamma smooths more and lags more; Ehlers uses \(\gamma = 0.5\). He buys when the Laguerre RSI crosses back above 20 and sells when it crosses back below 80. Because it reaches 0 and 100 often and stays there in a trend, it is read by its crossings back from the extremes rather than by its level.

Also known as: LRSI, Ehlers’ Laguerre RSI.

In the Finance Toolkit this is get_relative_strength_index with method="laguerre", the same function as Relative Strength Index (RSI).

Example · BTCUSD, ETHUSD · 2021 to 2025

Install the Finance Toolkit with pip install financetoolkit -U, then call get_relative_strength_index:

from financetoolkit import Toolkit

toolkit = Toolkit(
    tickers=["BTCUSD", "ETHUSD"],
    api_key="FINANCIAL_MODELING_PREP_KEY",
    start_date="2021-01-01",
    end_date="2025-12-31",
)

toolkit.technicals.get_relative_strength_index(method="laguerre")

Which returns:

References

  • Paper Ehlers, J.F. (2004). “Cybernetic Analysis for Stocks and Futures.” John Wiley & Sons, chapter 14, “Time Warp - Without Space Travel.”
  • Library Referenced against pandas-ta-classic’s lrsi (Laguerre RSI)
Share