Linear weights end; exponential weights keep shrinking
Let age k = 0 mean the newest observation. For a complete series and positive integer length N, WMA assigns weight (N − k) / [N(N + 1)/2] for ages 0 through N − 1, then zero. EMA updates as alpha × current close + (1 − alpha) × previous EMA, where alpha = 2 / (N + 1). A past input has coefficient alpha × (1 − alpha)^k. An initialized EMA also carries a shrinking contribution from its seed.
- The newest WMA weight is N / [N(N + 1)/2] = 2 / (N + 1), exactly the usual EMA alpha. Describing one as always reacting more strongly to the newest price is incorrect at equal lengths.
- The five WMA weights sum to 1. The latest five EMA coefficients sum to 1 − (2/3)^5 = 0.868313. The remaining 0.131687 belongs to older history, or to the previous initialized state when only five updates are expanded.
- At N = 1, both equal the current source. Zero and negative lengths are outside this comparison. These calculations assume a complete series; do not replace missing prices with zero.
| Age in bars | WMA (5) weight | EMA (5) coefficient |
|---|---|---|
| 0: newest | 33.333% | 33.333% |
| 1 | 26.667% | 22.222% |
| 2 | 20.000% | 14.815% |
| 3 | 13.333% | 9.877% |
| 4: oldest WMA input | 6.667% | 6.584% |
| 5: outside WMA window | 0% | 4.390% |
| All ages 5 and older, combined | 0% | 13.169% in the infinite-history model |