04 — Moving Averages

Double Exponential MA#

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
DayHighLowCloseVolume
11019910050,000
210310010262,000
310310010148,000
410510110470,000
510810410785,000
610810510660,000
711010610990,000
811010710872,000
910810410580,000
1010510210366,000
1110510210455,000
1210410110275,000
13102989995,000
141029910164,000
1510510110471,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
Python, in your browser — edit the code and run it again

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
← Previous
Weighted Moving Average
Open in the full reader, with the topic sidebar