Debated1 min read
◆ The PatternSubtract a smoother from itself to cancel part of its lag, and accept a noisier line in return
Double Exponential Moving Average — developed by Patrick Mulloy (1994) to reduce the lag inherent in standard EMAs.
DEMA = 2 × EMA(N) − EMA(EMA(N))
The trick: by subtracting the double-smoothed EMA, the extra lag is removed. Result: a much tighter fit to price in trending markets.
Trade-off: Reduced lag means DEMA is more prone to whipsaws in choppy markets. Best used when a trend is established.
Worked example
Day 8, the end of the rally: EMA(5) = 106.61 and the EMA of that EMA = 104.69, so DEMA = 2 × 106.61 − 104.69 = 108.53 — about half a point from that day’s close of 108, where the plain EMA is 1.4 behind. On day 13, after the fall, DEMA is 100.61 against a close of 99 and an EMA of 102.20.
The example data: 15 days, used in every indicator here
| Day | High | Low | Close | Volume |
|---|---|---|---|---|
| 1 | 101 | 99 | 100 | 50,000 |
| 2 | 103 | 100 | 102 | 62,000 |
| 3 | 103 | 100 | 101 | 48,000 |
| 4 | 105 | 101 | 104 | 70,000 |
| 5 | 108 | 104 | 107 | 85,000 |
| 6 | 108 | 105 | 106 | 60,000 |
| 7 | 110 | 106 | 109 | 90,000 |
| 8 | 110 | 107 | 108 | 72,000 |
| 9 | 108 | 104 | 105 | 80,000 |
| 10 | 105 | 102 | 103 | 66,000 |
| 11 | 105 | 102 | 104 | 55,000 |
| 12 | 104 | 101 | 102 | 75,000 |
| 13 | 102 | 98 | 99 | 95,000 |
| 14 | 102 | 99 | 101 | 64,000 |
| 15 | 105 | 101 | 104 | 71,000 |
Where it misleads
- It overshoots: cancelling the lag amplifies the latest moves, so after a sharp bar the line can run past the price.
- Less smoothing means more false signals in a range — the noise the plain EMA was absorbing comes back.
- The name misleads: it is not an EMA applied twice but a lag-correcting combination of two.
In code
e1 = df['close'].ewm(span=5, adjust=False).mean() e2 = e1.ewm(span=5, adjust=False).mean() # the EMA of the EMA df['dema5'] = 2 * e1 - e2
Assumes import numpy as np, import pandas as pd, and a DataFrame df with columns high, low, close and volume — the 15 days above.
Sources
- P. Mulloy, “Smoothing Data with Faster Moving Averages”, Technical Analysis of Stocks & Commodities 12(1), 1994
- W. Brock, J. Lakonishok & B. LeBaron, “Simple Technical Trading Rules and the Stochastic Properties of Stock Returns”, Journal of Finance 47(5), 1992 — moving-average rules on the Dow, 1897–1986
Last reviewed October 2026 · How this site checks its content · Report a mistake
Pattern bridge: Double smoothing to reduce lag mirrors momentum with bias correction in Adam. Both use exponential averaging twice to get closer to the true signal.
Linked from 1