01 / Formula
Formula
WMAₜ = Σᵢ₌₀ⁿ⁻¹ wᵢPₜ₋ᵢ / Σᵢ₌₀ⁿ⁻¹ wᵢ
Notation
- WMAₜ
- weighted moving average at time t
- Pₜ₋ᵢ
- observed price or value i periods before time t
- wᵢ
- weight assigned to that observation
- n
- number of observations in the weighted window
02 / Explanation
A small numerical example
Take three closing prices from oldest to newest: €100, €104 and €110. Assign linear weights 1, 2 and 3, so the newest price has the greatest weight:
WMA = (1 × 100 + 2 × 104 + 3 × 110) / (1 + 2 + 3) = 638 / 6 ≈ 106.33
The corresponding three-period SMA is about €104.67. The WMA is higher because the most recent and highest price contributes more to the result.
How the indicator is calculated
- Choose a window of n observations and define its weighting rule.
- Pair each observation with its weight; for a linear WMA, use 1 through n from oldest to newest.
- Multiply every observation by its assigned weight.
- Add the weighted observations.
- Divide by the sum of the weights, then move the window forward and repeat.
Dividing by the weight total keeps the result on the same scale as the source data. The rule should remain consistent if values are compared over time.
Practical application
WMA is suitable when the importance pattern must be explicit. A linearly weighted version can track recent movements more closely than SMA, while a domain-specific set of weights can reflect a justified analytical assumption. It can be used in price smoothing, crossover comparisons and other rolling summaries where observations should not contribute equally.
Advantages
- The weighting rule is visible and can be explained directly.
- Recent data can receive greater influence without using a recursive formula.
- The finite window clearly identifies which observations are included.
- Custom weights allow the calculation to match a defensible analytical design.
Limitations
- Results depend strongly on a weight scheme selected by the analyst.
- A finite window still drops the oldest observation completely.
- More responsiveness may amplify short-term noise.
- Custom weighting adds complexity and can invite arbitrary choices without a clear rationale.
Comparison with SMA and EMA
Unlike the simple moving average, WMA gives different influence to observations inside the same fixed window. Unlike the exponential moving average, it usually does not carry a decaying contribution from the full earlier history. WMA makes the weighting schedule easiest to inspect; EMA is easier to update recursively; SMA remains the clearest equal-weight baseline.