Indicators · Trend and moving averages
Double exponential moving average (DEMA): reducing lag
How Patrick Mulloy’s DEMA subtracts an EMA’s own lag, a worked example on AMD, why it overshoots at turns, and how Finabase computes it.
On this page
The double exponential moving average (DEMA) is a moving average designed to remove most of the lag of an ordinary exponential moving average. Patrick Mulloy published it in the January 1994 issue of Technical Analysis of Stocks & Commodities. Despite the name, it is not "an EMA applied twice." It is twice an EMA minus an EMA of that EMA, an algebraic trick that estimates how far the EMA is trailing and adds that distance back.
The result hugs price far more closely than an EMA of the same length. That makes it attractive to short-term traders and useful as an input to other indicators. It also makes the DEMA overshoot when a trend reverses. This guide explains the idea, works through the formula with real AMD values, measures how much closer it tracks price, and shows the cost.
The idea: measure the lag, then remove it
Any trailing average sits behind price in a trend. If you smooth that average again, the second line sits behind the first by about the same distance. That second gap is an estimate of the first gap. So if you take the first EMA and add the difference between it and the second EMA, you land close to where price actually is:
EMA + (EMA − EMA of EMA) = 2 × EMA − EMA of EMA.
The idea is older than the trading indicator. Robert G. Brown described the same double-smoothing correction for forecasting trends in demand data in the early 1960s. Mulloy's contribution was to package it as a chart line and show traders that it tracks price much more closely than a single EMA of the same length.
The formula
Why it has no lag on a straight trend
Suppose price rises by exactly $1 a bar forever. A 10-period EMA settles 4.5 bars behind, so it reads price − $4.50. Smoothing that line again puts EMA2 a further 4.5 bars back, at price − $9.00. Now:
DEMA = 2 × (price − 4.50) − (price − 9.00) = price.
The lag cancels exactly. Real prices are not straight lines, so in practice the DEMA's lag is small rather than zero.
A worked example on AMD
Finabase's chart shows the DEMA (10) and EMA (10) of Advanced Micro Devices (AMD). The EMA of the EMA is not drawn, but it can be recovered from those two lines: EMA2 = 2 × EMA1 − DEMA.
| Date | Close | EMA1 (10) | DEMA (10) | EMA2 = 2 × EMA1 − DEMA |
|---|---|---|---|---|
| Dec 31, 2025 | $214.16 | $213.89 | $214.07 | $213.71 |
| Jan 2, 2026 | $223.47 | $215.63 | $217.20 | $214.06 |
Check the January 2 values by hand with α = 2 ÷ 11 = 0.1818:
| Step | Calculation | Result |
|---|---|---|
| EMA1 | 213.89 + 0.1818 × (223.47 − 213.89) | $215.63 |
| EMA2 | 213.71 + 0.1818 × (215.63 − 213.71) | $214.06 |
| DEMA | 2 × 215.63 − 214.06 | $217.20 |
On a day when AMD rose $9.31, the EMA moved up $1.74 and the DEMA moved up $3.13, nearly twice as far. It still did not reach the $223.47 close, because one strong day after a flat week is not a trend that the double-smoothing can project.
Reading the DEMA on a real chart
AMD's year was a good test: a slide to a $188.22 intraday low on March 3, 2026, then a run to a $658.52 high on October 6, a gain of roughly 250% from low to high.
In the uptrend the DEMA stayed with price. Through the summer rally the DEMA (10) ran along the top of the candles while the EMA (10) trailed underneath. At the October 7 peak the DEMA read $650.03, within $5 of the $645.86 close, while the EMA was $622.68, $23 behind.
At the turn it overshot. When AMD fell from that peak to $566.42 by October 29, the DEMA dropped faster than the EMA and by month-end sat below it ($549.50 against $555.90), under the latest close. That is the signature of lag-cancelling averages: they project the recent slope forward, so when the slope flips they briefly over-correct.
Crossings multiplied. Over the year AMD's close crossed its DEMA (10) 69 times, about once every 3.6 sessions, and its EMA (10) 42 times. A crossover rule on the DEMA reacts sooner and trades far more, much of it in noise.
How traders use the DEMA
As a fast trend line. Short-term traders swap a DEMA in where they would otherwise use a short EMA, to see turns a bar or two sooner. A DEMA (20) behaves roughly like a 10-period EMA in speed while being somewhat smoother.
As a crossover pair. A fast DEMA crossing a slow DEMA, or a DEMA crossing an EMA of the same length, gives earlier crossover signals than two EMAs.
Inside other indicators. Mulloy suggested replacing the EMAs inside MACD and similar tools with DEMAs to make them more responsive. Some platforms offer such variants. Finabase's MACD uses standard EMAs.
Pitfalls and limitations
Overshoot. Because it extrapolates the recent trend, a DEMA can sit above the highs near a top or below the lows near a bottom for a bar or two. Traders who treat it as support or resistance get tricked by this more often than with an EMA.
Noise amplification. Cancelling lag means passing through more of the recent price movement, including the random part. In choppy markets the DEMA wiggles more than the EMA it is built from.
Start-up period. The DEMA needs two layers of smoothing to settle, so its first values on a short history can be off. Finabase computes from a longer history than the range you are viewing, so the visible line is already settled.
Comparison with related averages
| Average | Construction | Lag on a straight trend | Overshoot on reversal |
|---|---|---|---|
| EMA | One EMA | (n − 1) ÷ 2 bars | None |
| DEMA | 2 × EMA − EMA(EMA) | About 0 | Moderate |
| TEMA | 3 × EMA − 3 × EMA² + EMA³ | About 0 | Larger |
| WMA | Linear weights, hard window | (n − 1) ÷ 3 bars | None |
How Finabase calculates and scores the DEMA
Finabase computes the DEMA with TA-Lib's DEMA function on closing prices; both inner
EMAs use the same period. A new DEMA study defaults to 10 periods and accepts any
period you choose.
Finabase draws the DEMA in its own panel below the price chart (a legacy of the original Stock Master layout), with its own price scale, so it can be compared with price without crowding the candles. It is listed in the technical gauge with its latest value but carries no Buy or Sell rule of its own, so it always counts as neutral there. If you want a crossover signal from it, add an EMA of the same length next to it and read the crossings yourself.
Frequently asked questions
Is DEMA the same as applying an EMA twice?
No. An EMA applied twice (the EMA of an EMA) is slower and smoother than a single EMA. The DEMA uses that double-smoothed line only to estimate the lag, then removes it: 2 × EMA − EMA(EMA).
Is DEMA better than EMA for day trading?
It reacts sooner, which helps short-term timing, but it also produces more false crossings and overshoots at turns. Whether that trade is worth it depends on your rules and costs; test both on the same data.
What period should I use?
Mulloy's examples used common EMA lengths such as 21. Finabase defaults to 10. A useful rule of thumb is that a DEMA reacts about as fast as an EMA of roughly half its length.
Summary
The DEMA uses a second layer of exponential smoothing to measure an EMA's lag and then subtracts it, giving a line that tracks a trend almost without delay. AMD's 2026 run showed both sides: the DEMA stayed within a few dollars of the peak while the EMA trailed by more than $20, and the DEMA generated 69 crossings to the EMA's 42. Use it when responsiveness matters more than smoothness, and expect it to overshoot whenever the trend turns.
Sources and further reading
- Patrick G. Mulloy, “Smoothing Data with Faster Moving Averages,” Technical Analysis of Stocks & Commodities, vol. 12, no. 1 (January 1994)
- Robert G. Brown, Smoothing, Forecasting and Prediction of Discrete Time Series (Prentice-Hall, 1963) — double exponential smoothing
- TA-Lib — DEMA function reference
- Finabase chart data — AMD daily bars, 2025-10-30 to 2026-10-29, DEMA and EMA computed by Finabase