Overlap studies

Weighted Moving Average

Linearly weighted moving average that emphasizes recent closing prices.

Engine
TA-Lib
Function
WMA
Input series
close
Outputs
1

How it works

WMA applies weights from 1 through the configured period, giving the newest close the largest weight, and divides the weighted sum by the sum of those weights.

Use case

Use WMA as a responsive smoothed price feature for trend direction, crossovers, and support or resistance context.

Parameters

ParameterTypeDefaultBounds or optionsDescription
Time Periodinteger301…100000Number of closing-price bars included in the weighted window.

Outputs

OutputTypeDescription
WMAnumberWeighted moving average value for the bar.

Reading the result

WMA assigns progressively greater influence to more recent observations inside a fixed rolling window. It usually reacts faster than a simple average of the same length while remaining a finite-window calculation.

This weighting can be useful when recency should matter linearly, but it can also amplify short-lived changes near the end of the window.

Common mistakes

  1. Assuming every product called WMA uses the same weighting convention.
  2. Treating faster response as evidence of better forecasting.
  3. Comparing it directly with recursive averages without considering initialization differences.
  4. Adding WMA, SMA, and EMA variants without measuring feature correlation.

DataCat workflow notes

Use several moving-average families only when their weighting differences support a defined experiment. For a compact set, choose the smoothing behavior that matches the intended horizon and sensitivity.

Resources

Search documentation

Search across 46 documentation pages.