Wilder’s Moving Average

The Wilder’s Moving Average (RMA), also called Wilder’s smoothing or the smoothed moving average, is the average J. Welles Wilder (1978) built his Relative Strength Index, Average True Range and Average Directional Index on: an EMA with a smoothing factor of 1 / n instead of 2 / (n + 1).

The formula for the Wilder’s Moving Average is as follows:

\[\text{RMA} = \text{RMA}_{t-1} + \frac{\text{Close} - \text{RMA}_{t-1}}{n}\]

Where RMA(t-1) is the average of the period before and n the number of periods. Each period moves the average 1 / n of the way to the close, so it reacts more slowly than an EMA of the same n: a Wilder’s average of n periods equals an EMA of 2 * n - 1 periods. Wilder used 14 periods.

A moving average smooths the price by averaging it over the last n periods, so that the trend shows through the noise of single periods. It is the oldest and most widely used trend indicator: the direction of the average shows the direction of the trend, the price above (below) it an uptrend (downtrend), and other indicators, from the MACD to the Bollinger Bands, are built on it. Every moving average trades smoothness against lag: the more periods it averages, the smoother it is and the later it turns after the price. The averages differ in how they weight the prices within the window and whether they adapt their speed to the market, each a different answer to that trade-off.

Also known as: RMA, SMMA, Wilder’s smoothing, smoothed moving average, running moving average.

In the Finance Toolkit this is get_moving_average with method="wilder", the same function as Moving Average.

Example · ^GSPC · 2021 to 2025

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

from financetoolkit import Toolkit

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

toolkit.technicals.get_moving_average(method="wilder", window=50)

Which returns:

References

  • Paper Wilder, J.W. Jr. (1978). “New Concepts in Technical Trading Systems.” Trend Research.
  • Library Shares similar logic as TA-Lib’s RMA (Wilder’s Moving Average)
Share