Trend macd

MACD Crossover

Bullish: MACD line crosses above signal line. Bearish: MACD line crosses below signal line.

Signal family

Trend — Signals that fire when price is continuing or reversing an established directional move. Momentum-following by nature.

Parameters

Name Description Default Range
fast Fast EMA period 12 5–50
slow Slow EMA period 26 10–100
signal_period Signal line period 9 3–30

Historical context

500,478 valid triggers on 3,553 distinct tickers between 2015-03-19 and 2026-04-22. Universe: us_only · mcap ≥ $100,000,000 · price ≥ $1 (3,595 tickers). Entry at open T+1. 1d = intraday T+1; 20d = open T+1 to close T+20.

Benchmarks: spxew (S&P 500 Equal Weight — the primary benchmark here; a median-stock view that avoids the 2020+ megacap-concentration distortion), spx (S&P 500, cap-weighted), and msci (MSCI World USD). Per-stock regime: trending = ADX(14) ≥ 25, high vol = 20d ann. vol ≥ 20%.

At a glance (20d alpha vs S&P 500 Equal Weight, US-only)

Bullish
+0.07%
vs random-date null: worse than random (pperm=1.000)
Bearish (negative alpha = signal right)
+0.09%
vs random-date null: beats random (pperm=0.005)

Reading this: the random-date null is: for each ticker, sample N random dates and compute the same alpha — what alpha does a signal with no information produce? If the signal's observed alpha beats the null (pperm≤0.05), it's adding real information. If it's inside or worse than the null, the signal doesn't add value over random firing — any observed alpha is either noise or a universe artifact.

How often does MACD fire in each regime?

The signal's bucket distribution is itself informative. If 50%+ of all MACD triggers fire in the "non-trending + high vol" quadrant, the signal is structurally a chop-market event — regardless of what its textbook definition claims. Bullish and bearish are shown separately; counts are across the full US-only sample after the mcap and price floor.

MACD Crossover (macd) — trigger count distribution by per-stock regime quadrant (trending/non-trending × high/low realized volatility) for , US-only universe

Per-stock regime quadrant — 20d alpha

Each trigger is tagged with the host stock's own technical regime on the trigger date: is the stock itself in a trend (ADX(14) ≥ 25) or ranging? And is its realized 20-day volatility high (≥ 20% annualized) or low? This is the textbook conditioning variable — "does this signal work better in trending stocks?" — answered at the level of the individual stock, not the market. Positive bars are good for the signal; negative bars mean alpha vanishes into the benchmark or worse.

MACD Crossover (macd) — mean 20-day alpha versus S&P 500 Equal Weight by per-stock regime quadrant,  side by side
Trending + Low vol
Stock in a clean directional move with low realized volatility. Textbook "trend-following paradise" — smooth grind with little whipsaw risk.
Trending + High vol
Violent directional moves — parabolic rallies, crisis selloffs. Trend exists but the path is noisy. Signal timing may be imprecise.
Non-trending + Low vol
Quiet chop, summer doldrums, consolidations. No directional bias but also no big swings — small edges become reliable if they exist at all.
Non-trending + High vol
Choppy and violent — the classical "whipsaw zone" for momentum signals. Crossovers and breakouts fire repeatedly without follow-through.

Sub-period check — does the signal work in every era?

A multi-year average can hide major instability. We split the sample into three non-overlapping windows: 2015–2019 (pre-COVID, normalized monetary policy), 2020–2022 (pandemic crash + recovery + rate-shock bear), and 2023+ (post-ZIRP, AI megacap rally). If a signal's alpha is positive overall but comes entirely from one era, that's a red flag — the conditions that produced it may not repeat. A robust signal shows a consistent sign across all non-empty buckets.

MACD Crossover (macd) — 20-day alpha split by historical sub-period (2015-2019, 2020-2022, 2023+) to check consistency across market regimes

↑ Bullish triggers

Bench Metric 1d 5d 20d 60d 252d
spx Stock % -0.02% +0.16% +0.98% +2.71% +11.34%
Bench % +0.01% +0.27% +1.08% +3.03% +13.18%
Alpha % -0.04% -0.11% -0.06% -0.31% -1.84%
Median alpha -0.06% -0.24% -0.58% -1.70% -8.43%
Hit rate (α>0) 48.2% 47.2% 47.0% 45.2% 39.5%
p (naive) <0.001 <0.001 0.0059 <0.001 <0.001
p (HAC) <0.001 <0.001 0.0181 <0.001 <0.001
N 251,022 250,590 247,723 243,276 219,687
msci Stock % -0.02% +0.16% +0.98% +2.71% +11.34%
Bench % +0.07% +0.29% +0.97% +2.61% +10.81%
Alpha % -0.09% -0.13% +0.06% +0.13% +0.46%
Median alpha -0.12% -0.26% -0.47% -1.23% -6.05%
Hit rate (α>0) 46.7% 47.0% 47.6% 46.4% 42.5%
p (naive) <0.001 <0.001 0.0116 0.0023 <0.001
p (HAC) <0.001 <0.001 0.0303 0.0611 0.1598
N 249,925 248,929 245,903 241,511 217,688
spxew Stock % -0.02% +0.16% +0.98% +2.71% +11.34%
Bench % +0.04% +0.25% +0.97% +2.40% +9.74%
Alpha % -0.07% -0.09% +0.07% +0.32% +1.80%
Median alpha -0.08% -0.20% -0.41% -1.01% -4.93%
Hit rate (α>0) 47.7% 47.7% 47.8% 47.0% 43.5%
p (naive) <0.001 <0.001 0.0050 <0.001 <0.001
p (HAC) <0.001 <0.001 0.0163 <0.001 <0.001
N 249,724 248,444 245,329 241,032 217,478
Distribution of all 20d alpha outcomes for this direction. Median and winsorized mean shown.
MACD Crossover (macd) — bullish 20-day alpha histogram showing distribution of per-trigger returns
Observed 20d alpha (vertical line) against the null distribution of random-date firing. If the line is deep inside the null cloud, the signal adds no information. If it sits in a tail, the signal is doing real work in that direction.
MACD Crossover (macd) — bullish 20-day observed alpha versus random-date permutation null (200 iterations)
Permutation null detail — all horizons × both benchmarks
200-iteration null: for each ticker, sample N random dates from its history (matching observed trigger count) and compute the same alpha. The null distribution's 95% CI is where a signal with no information would land. pperm = one-sided fraction of null iters with mean ≥ observed.
Horizon Bench Observed α Null mean Null 95% CI pperm
1d spx -0.04% -0.01% [-0.03%, -0.00%] 1.000
1d msci -0.09% -0.04% [-0.05%, -0.03%] 1.000
1d spxew -0.07% -0.04% [-0.05%, -0.03%] 1.000
5d spx -0.11% +0.15% [+0.00%, +0.46%] 1.000
5d msci -0.13% +0.15% [+0.00%, +0.47%] 1.000
5d spxew -0.09% +0.17% [+0.02%, +0.49%] 1.000
20d spx -0.06% +0.28% [+0.09%, +0.65%] 1.000
20d msci +0.06% +0.40% [+0.21%, +0.78%] 1.000
20d spxew +0.07% +0.47% [+0.28%, +0.85%] 1.000
60d spx -0.31% +0.57% [+0.30%, +0.98%] 1.000
60d msci +0.13% +1.01% [+0.75%, +1.42%] 1.000
60d spxew +0.32% +1.24% [+0.97%, +1.66%] 1.000
252d spx -1.84% +1.36% [+0.92%, +1.78%] 1.000
252d msci +0.46% +3.68% [+3.24%, +4.15%] 1.000
252d spxew +1.80% +5.04% [+4.57%, +5.47%] 1.000

Example triggers on US large-caps (2023+, mcap ≥ $30B)

Six recent bullish MACD triggers on US mega-caps, filtered to |alpha| ≤ 25% to exclude catalyst-driven outliers (earnings surprises, M&A, binary events). The first three are the strongest outcomes — what the signal looks like when it works. The last three are the weakest — what the signal looks like when it fails. Each chart shows the stock's price with signal-appropriate technical overlays (e.g. MACD subpanel on MACD pages, Bollinger Bands on Bollinger pages, the 52-week trailing max line on 52w-high pages), a dot marking the trigger date, and the forward window shaded (green when the signal was right, red when it wasn't). Click any chart to open full-size.

Strongest outcomes (what MACD looks like when it works)
Weakest outcomes (what MACD looks like when it fails)
Stock-regime quadrants (2×2 per-stock, 20d alpha detail table)
Each quadrant groups triggers by the stock's own ADX(14) and RV(20) at the trigger date — the textbook conditioning variable (not market-level). Stock %, bench %, alpha %, and HAC p-value shown for each benchmark.
Quadrant N Stock % (spx) Bench % (spx) Alpha % (spx) p (HAC) Stock % (msci) Bench % (msci) Alpha % (msci) p (HAC) Stock % (spxew) Bench % (spxew) Alpha % (spxew) p (HAC)
Trending + Low vol Clean directional grind, low whipsaw 15,960 +0.31% +0.67% -0.30% <0.001 +0.31% +0.49% -0.12% 0.0264 +0.31% +0.37% +0.02% 0.7347
Trending + High vol Crisis selloff or parabolic rally 73,152 +1.04% +1.33% -0.25% <0.001 +1.04% +1.17% -0.08% 0.1289 +1.04% +1.20% -0.09% 0.0885
Non-trending + Low vol Quiet chop, summer doldrums 29,463 +0.46% +0.73% -0.25% <0.001 +0.46% +0.55% -0.07% 0.0676 +0.46% +0.46% +0.04% 0.2782
Non-trending + High vol Classical "whipsaw zone" for momentum 132,555 +1.18% +1.08% +0.14% 0.0003 +1.18% +1.00% +0.22% <0.001 +1.18% +1.04% +0.20% <0.001
Sub-period breakdown table (20d alpha)
Historical clustering check. If alpha concentrates in one era, the signal's robustness is questionable.
Period N Alpha % (spx) p (HAC) Alpha % (msci) p (HAC) Alpha % (spxew) p (HAC)
2015-2019 2015-01-01 → 2020-01-01 74,987 -0.07% 0.0642 +0.09% 0.0301 +0.07% 0.0616
2020-2022 2020-01-01 → 2023-01-01 78,448 +0.23% <0.001 +0.40% <0.001 -0.10% 0.0487
2023-2026 2023-01-01 → 2099-01-01 97,695 -0.27% <0.001 -0.22% <0.001 +0.22% <0.001

↓ Bearish triggers negative alpha = signal was right (stock underperformed market)

Bench Metric 1d 5d 20d 60d 252d
spx Stock % +0.01% +0.24% +0.75% +2.82% +10.98%
Bench % +0.01% +0.26% +0.98% +3.08% +13.08%
Alpha % -0.00% -0.01% -0.16% -0.26% -2.11%
Median alpha -0.02% -0.14% -0.66% -1.62% -8.54%
Hit rate (α>0) 49.5% 48.4% 46.5% 45.3% 39.4%
p (naive) 0.5657 0.2213 <0.001 <0.001 <0.001
p (HAC) 0.5662 0.2304 <0.001 0.0002 <0.001
N 249,249 248,919 247,758 242,624 219,101
msci Stock % +0.01% +0.24% +0.75% +2.82% +10.98%
Bench % -0.01% +0.21% +0.87% +2.62% +10.67%
Alpha % +0.02% +0.05% -0.01% +0.22% +0.32%
Median alpha -0.01% -0.10% -0.50% -1.11% -6.05%
Hit rate (α>0) 49.6% 48.9% 47.4% 46.8% 42.4%
p (naive) <0.001 <0.001 0.7565 <0.001 0.0019
p (HAC) <0.001 <0.001 0.7951 0.0012 0.3287
N 248,724 247,957 246,450 241,274 217,748
spxew Stock % +0.01% +0.24% +0.75% +2.82% +10.98%
Bench % +0.03% +0.22% +0.79% +2.40% +9.37%
Alpha % -0.02% +0.04% +0.09% +0.46% +1.73%
Median alpha -0.03% -0.08% -0.38% -0.88% -4.89%
Hit rate (α>0) 49.1% 49.1% 48.0% 47.4% 43.6%
p (naive) <0.001 <0.001 0.0002 <0.001 <0.001
p (HAC) <0.001 <0.001 0.0018 <0.001 <0.001
N 248,287 247,049 245,590 240,914 216,960
Distribution of all 20d alpha outcomes for this direction. Median and winsorized mean shown.
MACD Crossover (macd) — bearish 20-day alpha histogram showing distribution of per-trigger returns
Observed 20d alpha (vertical line) against the null distribution of random-date firing. If the line is deep inside the null cloud, the signal adds no information. If it sits in a tail, the signal is doing real work in that direction.
MACD Crossover (macd) — bearish 20-day observed alpha versus random-date permutation null (200 iterations)
Permutation null detail — all horizons × both benchmarks
200-iteration null: for each ticker, sample N random dates from its history (matching observed trigger count) and compute the same alpha. The null distribution's 95% CI is where a signal with no information would land. pperm = one-sided fraction of null iters with mean ≥ observed.
Horizon Bench Observed α Null mean Null 95% CI pperm
1d spx -0.00% -0.01% [-0.03%, -0.00%] 0.975
1d msci +0.02% -0.03% [-0.05%, -0.02%] 0.990
1d spxew -0.02% -0.04% [-0.05%, -0.03%] 0.990
5d spx -0.01% +0.15% [-0.00%, +0.45%] 0.005
5d msci +0.05% +0.16% [+0.00%, +0.46%] 0.318
5d spxew +0.04% +0.18% [+0.02%, +0.48%] 0.139
20d spx -0.16% +0.29% [+0.07%, +0.64%] 0.005
20d msci -0.01% +0.41% [+0.19%, +0.76%] 0.005
20d spxew +0.09% +0.48% [+0.26%, +0.83%] 0.005
60d spx -0.26% +0.57% [+0.30%, +1.10%] 0.005
60d msci +0.22% +1.02% [+0.74%, +1.55%] 0.005
60d spxew +0.46% +1.24% [+0.97%, +1.78%] 0.005
252d spx -2.11% +1.31% [+0.90%, +1.78%] 0.005
252d msci +0.32% +3.63% [+3.24%, +4.10%] 0.005
252d spxew +1.73% +4.98% [+4.56%, +5.45%] 0.005

Example triggers on US large-caps (2023+, mcap ≥ $30B)

Six recent bearish MACD triggers on US mega-caps, filtered to |alpha| ≤ 25% to exclude catalyst-driven outliers (earnings surprises, M&A, binary events). The first three are the strongest outcomes — what the signal looks like when it works. The last three are the weakest — what the signal looks like when it fails. Each chart shows the stock's price with signal-appropriate technical overlays (e.g. MACD subpanel on MACD pages, Bollinger Bands on Bollinger pages, the 52-week trailing max line on 52w-high pages), a dot marking the trigger date, and the forward window shaded (green when the signal was right, red when it wasn't). Click any chart to open full-size.

Strongest outcomes (what MACD looks like when it works)
Weakest outcomes (what MACD looks like when it fails)
Stock-regime quadrants (2×2 per-stock, 20d alpha detail table)
Each quadrant groups triggers by the stock's own ADX(14) and RV(20) at the trigger date — the textbook conditioning variable (not market-level). Stock %, bench %, alpha %, and HAC p-value shown for each benchmark.
Quadrant N Stock % (spx) Bench % (spx) Alpha % (spx) p (HAC) Stock % (msci) Bench % (msci) Alpha % (msci) p (HAC) Stock % (spxew) Bench % (spxew) Alpha % (spxew) p (HAC)
Trending + Low vol Clean directional grind, low whipsaw 20,015 +0.08% +0.43% -0.36% <0.001 +0.08% +0.24% -0.16% 0.0008 +0.08% +0.05% +0.03% 0.4886
Trending + High vol Crisis selloff or parabolic rally 75,353 +0.83% +1.05% -0.15% 0.0067 +0.83% +0.91% +0.02% 0.7180 +0.83% +0.75% +0.18% 0.0011
Non-trending + Low vol Quiet chop, summer doldrums 28,691 +0.13% +0.70% -0.54% <0.001 +0.13% +0.48% -0.31% <0.001 +0.13% +0.41% -0.22% <0.001
Non-trending + High vol Classical "whipsaw zone" for momentum 125,289 +1.02% +1.08% +0.01% 0.8220 +1.02% +1.00% +0.12% 0.0026 +1.02% +0.99% +0.15% 0.0001
Sub-period breakdown table (20d alpha)
Historical clustering check. If alpha concentrates in one era, the signal's robustness is questionable.
Period N Alpha % (spx) p (HAC) Alpha % (msci) p (HAC) Alpha % (spxew) p (HAC)
2015-2019 2015-01-01 → 2020-01-01 74,561 -0.23% <0.001 -0.05% 0.2326 +0.02% 0.6629
2020-2022 2020-01-01 → 2023-01-01 78,816 +0.18% 0.0003 +0.32% <0.001 -0.08% 0.1101
2023-2026 2023-01-01 → 2099-01-01 95,971 -0.37% <0.001 -0.23% <0.001 +0.29% <0.001

Methodology and caveats

How to read. Entry at open of T+1 (one trading day after the signal fires on close of T). 20d = open T+1 to close T+20. Alpha = stock return − benchmark return over the same window (Convention A, single-sided, textbook). For bullish triggers, POSITIVE alpha = signal was right. For bearish triggers, NEGATIVE alpha = signal was right (stock underperformed market). No sign-flipping; the direction of the bet determines what "good" looks like. Per-stock regime is each stock's own ADX(14) and RV(20) at the trigger date — not market-wide state.

Three p-values, three robustness tests. (a) p_naive: scipy one-sample t-test on winsorized alphas. Optimistic because overlapping 20d windows on the same ticker inflate effective N. (b) p_hac: Newey-West HAC with lag = horizon — corrects for the overlap and is the academic-finance standard. (c) p_perm: fraction of 200 random-date null iterations with mean ≥ observed. Tests whether the signal beats random date selection at all. A signal that clears all three (pnaive, phac, pperm all < 0.05) has real information; a signal that fails pperm has zero edge even if the t-test says "significant."

Caveats. (i) Universe reflects today's active tickers; delisted losers pruned → survivorship bias. (ii) Mcap ≥ $100M filter uses today's snapshot, not point-in-time — mild lookahead on which stocks enter the sample, not on returns. (iii) Means and p-values use winsorized alphas (1/99 percentile) to prevent data errors from dominating. Medians and hit rates use raw data. (iv) Zero transaction costs assumed. Realistic bid-ask + commissions remove 20–40bps from 20d alpha on US large-caps, more on small-cap. Sub-20bps alpha is noise in practice. (v) Past performance does not predict future results.

How to use this

1 · When to reach for this signal

Caution recommended. Bullish 20d alpha is -0.06% and worse than random — triggering on random dates would have produced better long-side returns. Either direction fails the "beats random" test. Don't use MACD Crossover as a standalone entry trigger. It may still be useful as part of a composite (section 4).

2 · When it works — the setups that drive it

  • Best bullish setup: Non-trending + High vol — alpha +0.14% / 20d on 132,555 historical triggers.
  • Best bearish setup: Non-trending + High vol — alpha +0.01% / 20d on 125,289 historical triggers.
  • Best era for bullish: 2020-2022 — alpha +0.23% / 20d.
  • Best era for bearish: 2020-2022 — alpha +0.18% / 20d.

3 · When it fails — common false positives

  • Weakest bullish cell: Trending + Low vol — alpha -0.30% / 20d on 15,960 triggers.
  • Weakest bearish cell: Non-trending + Low vol — alpha -0.54% / 20d on 28,691 triggers.
  • Worst era for bullish: 2023-2026 — alpha -0.27% / 20d.
  • Worst era for bearish: 2023-2026 — alpha -0.37% / 20d.

Signal-specific failure patterns

The laggard trap (bullish)
MACD bullish on a stock already above its 200DMA and trending cleanly. The fast-EMA crossover above the slow EMA fires after a brief pullback — but the market has already moved, and the stock catches up without exceeding the benchmark's move. This is why the textbook-favorable 'trending + low vol' quadrant delivers the weakest bullish alpha.
evidence: trending_low_vol bullish 20d alpha = −0.29%, p(HAC) < 0.001
Capitulation bounce (bearish)
Bearish MACD fires during violent selloffs — crossover registers in the 'non-trending + high vol' quadrant right around oversold bottoms. These prints look bearish but are often followed by sharp mean-reversion bounces that stop out shorts. Consistent with the signal's worst bearish alpha sitting exactly in this regime.
evidence: nontrend_high_vol bearish 20d alpha ≈ 0%, fails the HAC test
Earnings-week contamination
MACD crossovers that fire on news-driven gap days don't behave like momentum — they're reacting to information, not technical structure. Our backtest does not exclude earnings weeks, so some of the observed alpha (or lack of it) is contaminated by event-driven moves. Screen should filter out triggers within ±3 trading days of scheduled earnings.
evidence: not directly tested; known methodology gap
2023+ bullish degradation
MACD bullish alpha has turned decisively negative in the post-ZIRP AI-megacap rally era (2023+). The signal appears to have become particularly miscalibrated when a small number of concentrated leaders drive index returns while broader market participation is uneven.
evidence: 2023+ bullish 20d alpha = −0.27%, p(HAC) < 0.001

4 · Pairing inside a screen

The statements below describe how this signal relates to others by construction — which indicator family it belongs to, and where same-family redundancy might reduce the independence of evidence inside a Daily Report. These are taxonomic classifications drawn from standard technical-analysis texts; they are not pairing backtests. A multi-signal convergence backtest is planned but not yet run.

Trend-following momentum construction

MACD is the difference between two exponential moving averages of closing price (Appel, Technical Analysis: Power Tools for Active Investors, 2005) and is classified as a trend-following momentum indicator (Murphy, Technical Analysis of the Financial Markets, 1999; Kirkpatrick & Dahlquist, Technical Analysis, 3rd ed. 2015). Its construction overlaps with moving-average crossover signals, which also derive from differences of moving averages of price; stacking MACD with MA crossover in the same direction produces correlated rather than independent evidence.

What would likely rescue this signal

This block calls out the data or conditions that could turn a technically weak signal into a usable one in a composite screen. Based on signal mechanics and the observed failure patterns above; individual combinations are not yet backtested.

  • Use MACD bearish as a screening filter, not a standalone triggerBearish MACD has real left-tail permutation significance (p<0.005 against SPXEW at 20d and 60d), but the point-estimate alpha is small (~15-40 bps/month). That's not tradable net of costs on its own. Useful as one member of a bearish screen stack — require bearish MACD AND another independent bearish read (close below 50DMA, fresh 52w low, sector breadth < 30%). The conjunction concentrates the edge; any single trigger is too noisy.
  • Regime-gate bullish side — it worked pre-QEMACD bullish has shown positive alpha in specific sub-periods (pre-2020 low-rate low-megacap-concentration era). A regime gate — 'only take bullish MACD when market breadth > 60% and SPX not within 5% of ATH' — might restore part of that historical edge while cutting the signal-set by ~70%. Testable with the existing breadth engine; not yet wired to the screen filter layer.
  • Pair with volume confirmationMACD fires on a mathematical EMA relationship that ignores volume. A bullish crossover on heavy volume (2× 20d average) is a different population than one on thin volume. Volume-confirmation is the single most likely filter to rescue MACD bullish; it's also one we already have data for (daily_prices.volume). Implementing as a composite signal on the screen page would be straightforward.

See also Why technical-only signals don't survive on their own for the broader argument.

5 · Before you act — a 5-point checklist

  1. Normal trading day? Rule out earnings (within ±3 days), ex-dividend, or known corporate-action dates — the signal is almost certainly reading noise, not momentum, in those windows.
  2. Where is price vs its own 50 / 200 DMA? A trend signal is only as credible as the underlying trend it claims to confirm. Check the 200DMA orientation before acting.
  3. What's the sector breadth doing? An isolated signal in a broadly down-trending sector is a lower-confidence setup than one firing with the rest of its peer group.
  4. Is ADV20 enough for your size? If the trigger is on a $500M name and you want to move $1M notional, you're the tape. Consider adv20d ≥ 5% of your intended position.
  5. What invalidates you? Define a price level (for longs: a close below the trigger-day low; for shorts: close above the trigger-day high) and honor it. The backtest alpha is an average; any one trade can be at either tail.

Execution notes

The backtest measures entry at open T+1 (one day after the signal fires on close of T) with exit at close T+20 on the 20-day horizon. Earlier entry (intraday on trigger day) was not tested and our prior is that it's noisier due to late-day fade dynamics on momentum names. 20d offers the best alpha-per-day of the horizons tested; 60d compounds more absolute alpha but is also more exposed to earnings cycles and regime change.