Weighted Moving Average: A Third, Not Half
A weighted moving average multiplies each close in the window by a weight that falls linearly, newest bar highest. Its centre of mass is a third of the period rather than a half, which makes it measurably quicker to turn than either the simple or the exponential average of the same length.
How it works
Take the last twenty closes. Multiply the newest by 20, the one before it by 19, and so on down to 1. Add all of that up and divide by the sum of the weights, which for twenty bars is 210. That is a weighted moving average.
“Weighted” without qualification means linearly weighted. That is the convention on every charting platform. The exponential average is also weighted, and it decays geometrically instead; the difference is the shape of the decay, and the shape is what changes the result.
The number that makes it different
Work out the average age of the data inside it and you get (N−1)/3. For a 20-period weighted average that is 6.3 bars. The simple and exponential 20-period averages both sit at 9.5.
That is the only place in this family where the arithmetic actually differs, and it is the reason a weighted average visibly turns before the other two rather than fractionally before them.
Which gives you a conversion worth memorising. To match the lag of a simple average of period N, use a weighted average of roughly 1.5×N. A 30-period weighted average has a centre of mass of 9.7 bars; a 20-period simple average has 9.5. They are effectively the same amount behind price.
So “which type” and “which period” are the same dial, not two dials. Changing type without changing period is changing the effective period, and a lot of confused comparison comes from not knowing that.
It also fixes the drop-off jolt. In a simple average the oldest bar leaves the window carrying full weight, which can move the line on a quiet day. In a weighted average that bar is already down to a weight of 1 out of 210 before it goes, so its departure is almost invisible.
That is a genuine, if small, improvement, and it is one of the few things in this family that is better rather than merely different.
In practice: the cost of the extra speed
Every bar of lag you remove is a bar of smoothing you give up. There is no version of this where the line turns sooner and is equally steady, because turning sooner is responding more to the newest bars, which is the definition of less smoothing.
Measured on this site’s shared history, a 20-period weighted average sat an average of 44% of a median bar’s range away from the 20-period simple average — a little further apart than the exponential comparison, as the centre-of-mass figures predict.
The Hull moving average is built out of this one. It takes a weighted average of half the period, doubles it, subtracts a weighted average of the full period, and smooths the result with a third weighted average of the square root of the period. That construction exists to cancel most of the remaining lag, and every part of it is the tool on this page.
The weighting is by position, not by importance. A newer bar counts more because it is newer, and that is an assumption rather than a measurement. If you want the weight to reflect what actually traded, that is the volume-weighted version.
A gap arrives on the newest bar, which carries the largest weight of all. So a weighted average reacts to gaps more sharply than a simple one — 20/210 of the line moves with that single close.
As a trailing stop it exits earliest of the three. In a clean trend that protects more of the move. In a trend with normal pullbacks it takes you out of positions that were about to continue, and there is no setting that distinguishes those two cases in advance.
Each of those earlier exits and re-entries costs 2% of a typical bar’s range in round-trip costs on this history. Speed is not free; it is paid for in transactions.
And nothing about a linear decay is discovered. Somebody chose a straight line because it is simple to compute and easy to reason about. The market does not weight its own memory linearly, geometrically, or in any other published shape.
What a weighted moving average is not
It is not more accurate. There is no target it is closer to. It is a different summary of the same closes with a different centre of mass.
It is not the exponential average under another name. Both put more weight on recent bars; only one of them discards old bars entirely, and their centres of mass differ by a third of the period.
It is not a solution to lag. It reduces lag by a third relative to the alternatives at the same period, and reintroduces all of it the moment you lengthen the period to get the smoothing back.
And it is not the default on most platforms, which matters practically: if a strategy specifies “the 20 average” without saying which type, the person who wrote it and the person reading it are probably looking at lines 44% of a bar apart.
When it fails
In a range it is the worst of the three. The property that makes it turn early makes it turn early on noise as well as on moves, and a sideways market is almost entirely noise. Every advantage it has in a trend is a liability here.
The second failure is comparing types at equal periods. A 20 weighted against a 20 simple is not a fair test of weighting — it is a test of a 6.3-bar centre of mass against a 9.5-bar one. Compare a 30 weighted with a 20 simple if you want to isolate the shape of the decay from the length of the window.
A third is expecting the speed to survive smoothing. People find it too noisy, lengthen the period until it calms down, and end up with exactly the lag they switched away from — having added a step.
A fourth is using it inside another indicator without saying so. Changing an oscillator’s smoothing to weighted changes its effective period, so a setting inherited from someone using simple smoothing is no longer the setting they were describing.
And a fifth is treating the linear decay as meaningful. It is a convenience. Nothing about markets says the bar before last matters exactly 19/20 as much as the last one, and building a thesis on the specific shape of the weights is building on a decision somebody made for arithmetic reasons.
The original data
On this site’s shared 576-bar history the 20-period weighted average diverged from the 20-period simple average by an average of 44% of a median bar’s range — measurably more than the 38% recorded for the exponential comparison, which is what the centre-of-mass figures (6.3 bars against 9.5) predict in advance.
That prediction-then-measurement is the point of the figure. The centre of mass is arithmetic you
can do on paper; the divergence is something you have to count on real bars. They agree here, which
means the theory is usable: pick the type by the lag you want, convert with the 1.5× rule, and stop
treating the menu as a matter of taste. The numbers are in research/series-measurements.json and the
script that produced them is in the site’s own source.
Related
Simple moving average is the equal-weight baseline every comparison on this page is against. Hull moving average is what happens when you stack three of these to cancel lag. And moving average is the parent page covering where the whole family fits.
The weighted average is the one I actually reach for when I want a fast line, and it took me an embarrassingly long time to find out why: it is not a preference, it is that the linear weighting puts the centre of mass a third of the way back instead of halfway. That is a real difference, unlike most of the choices on an indicator menu.
— Michael Whitman
This page is educational, not financial advice. Test every idea on your own charts before risking money.