ENTRIQ|Lab
Try ENTRIQ
StrategyLAYER 1

Daily RSI Below 30 on US Stocks|Effect of a MACD Filter

ENTRIQ backtest of 100 US stocks on daily charts (5–56 years each): RSI-below-30 buys on days with MACD(12, 26, 9) above its signal line vs no filter, 3 exits.

What this article examines

Buying when RSI(14) drops below 30 is a well-known approach. This article uses ENTRIQ backtests to examine how the results change when the filter "MACD(12, 26, 9) is above its signal line" is added to that condition.

Basis: These are the results of backtesting 100 stocks in ENTRIQ (5 to 56 years of data depending on the stock) (Dataset v1.0). A comparison with no filter is also shown.


Test conditions

Entry

If RSI(14) crosses below 30 on a day when the MACD line (12, 26, 9) is above its signal line, buy at the open on the next trading day. New signals in the same stock while a position is open are skipped, and only one position is held at a time.

For comparison, backtest data for "RSI below 30 (no filter)" is also shown. This uses RSI below 30 as the condition without the MACD condition, on the same stocks over the same periods.

Exit patterns

  • Pattern A (A_signal): Exit at the open on the next trading day after RSI rises above 50 (if it doesn't, exit at the close on the 60th trading day). No stop loss
  • Pattern B (B_10bars): Exit at the close on the 10th trading day after entry. No stop loss
  • Pattern C (C_stop5): Stop loss at -5%. If the stop isn't hit, exit at the close on the 10th trading day. If the stock gaps down at the open, the fill is at that open price, so a single trade's loss can exceed -5%

Universe and caveat (survivorship bias)

The universe is 100 stocks selected from the current S&P 500 constituents, taking the largest by market cap with up to 15 stocks per sector. Because stocks that are still listed and included in the index were selected after the fact, stocks that were delisted or removed from the index in the past are not included. Because of this survivorship bias, the results may look better than actual past performance.


Overall results

With the MACD filter (this backtest)

MetricPattern APattern BPattern C
Sample size (N)327382404
Share of trades closed in profit74.6%55.2%42.1%
Average P/L+3.35%+1.56%+0.59%
Profit factor2.321.601.23
Average loss (trades closed at a loss)-10.21%-5.95%-4.46%
Largest loss-51.8%-46.8%-32.3%
Median MAE (maximum adverse excursion)-5.71%-4.24%-4.25%
Longest losing streak (per stock)345
Average holding period18.6 trading days10.0 trading days7.3 trading days

Note: Past sample; not indicative of future results.

Comparing the patterns, the share of trades closed in profit, average P/L and profit factor were all highest in pattern A, then B, then C. On the other hand, the size of the average loss and largest loss (how negative they were) also ranked pattern A > pattern B > pattern C, so pattern A, which holds longer without a stop loss, showed larger swings both up and down. The longest losing streak (the longest run of consecutive losses within a single stock) ranked pattern C > pattern B > pattern A.


Comparison with no filter

This section shows how the results change when the condition "MACD above its signal line" is added, compared with when it is not.

Pattern B (fixed 10 trading days)

MetricWith the MACD filterNo filter
Sample size (N)3827,026
Share of trades closed in profit55.2%56.9%
Average P/L+1.56%+1.20%
Profit factor1.601.51
Largest loss-46.8%-72.5%
Median MAE (maximum adverse excursion)-4.24%-3.57%
Longest losing streak (per stock)412

Note: Past sample (N=382, N=7,026); not indicative of future results.

The sample size with the MACD filter was smaller than without it, and the share of trades closed in profit was higher without the filter. On the other hand, average P/L and profit factor were higher with the MACD filter. The largest loss was larger (more negative) without the filter, while the median MAE was larger (more negative) with the MACD filter. The longest losing streak (per stock) involved more consecutive losses without the filter.

Pattern C (-5% stop loss + 10 trading days)

MetricWith the MACD filterNo filter
Sample size (N)4047,866
Share of trades closed in profit42.1%45.8%
Average P/L+0.59%+0.54%
Profit factor1.231.23
Largest loss-32.3%-37.9%
Median MAE (maximum adverse excursion)-4.25%-3.76%
Longest losing streak (per stock)516

Note: Past sample (N=404, N=7,866); not indicative of future results.

Pattern C showed the same tendency. The number of trades and the share of trades closed in profit were higher without the filter, while average P/L was higher with the MACD filter and profit factor was at the same level. The largest loss was larger (more negative) without the filter, while the median MAE was larger (more negative) with the MACD filter. The longest losing streak (per stock) involved more consecutive losses without the filter.

Taken together, adding the MACD filter substantially narrowed the sample; the share of trades closed in profit was lower, while average P/L was higher (profit factor was higher in pattern B and at the same level in pattern C). However, there is no data to conclude that false signals decrease, and it was also observed that the median MAE (the median of the maximum adverse excursion while holding) was larger (more negative) with the MACD filter.


Breakdown by environment (with the MACD filter)

By trend

MetricPattern A, downtrendPattern A, rangePattern B, downtrendPattern B, rangePattern C, downtrendPattern C, range
N255633036832468
Share of trades closed in profit74.1%76.2%54.1%61.8%40.7%50.0%
Average P/L+3.34%+3.39%+1.55%+1.97%+0.53%+1.15%
Profit factor2.193.241.572.091.191.65
Median MAE-5.99%-4.42%-4.70%-3.47%-4.60%-3.47%

Note: Past sample; not indicative of future results.

In all 3 patterns, the share of trades closed in profit, average P/L and profit factor were higher in ranges than in downtrends. The median MAE (the median of the maximum adverse excursion) was larger (more negative) in downtrends than in ranges. Most of the samples were concentrated in downtrends; this is likely because RSI drops below 30 more often during downtrends.

Uptrend data for all three patterns fell below the minimum sample size and is not used in this article.

By volatility

MetricPattern A, high volatilityPattern A, normalPattern B, high volatilityPattern B, normalPattern B, low volatilityPattern C, high volatilityPattern C, normalPattern C, low volatility
N1521461831673220416832
Share of trades closed in profit78.3%72.6%54.1%57.5%50.0%35.3%48.8%50.0%
Average P/L+6.13%+1.04%+2.52%+0.85%-0.24%+0.96%+0.32%-0.34%
Profit factor3.071.461.731.450.851.301.160.80
Median MAE-8.71%-4.50%-7.19%-3.43%-2.89%-5.00%-3.44%-2.89%

Note: Past sample; not indicative of future results.

In both patterns A and B, average P/L and profit factor were higher in high volatility than in normal volatility. However, the median MAE was also larger (more negative) in high volatility, showing larger swings in both directions. The low-volatility group for pattern A fell below the minimum sample size and is not used in this article.

In pattern B, the share of trades closed in profit ranked normal > high volatility > low volatility, a different order from average P/L and profit factor. In pattern C, the share of trades closed in profit ranked low volatility > normal > high volatility, while average P/L and profit factor ranked high volatility > normal > low volatility.

By distance from earnings

Earnings dates are available only from 2008 onward. A considerable number of samples in patterns A, B and C have no earnings date.

For samples away from earnings (outside the 5 trading days before and after an earnings date), all 3 patterns meet the minimum sample size.

MetricPattern A, away from earningsPattern B, away from earningsPattern C, away from earnings
N102115122
Share of trades closed in profit76.5%59.1%45.1%
Average P/L+3.77%+1.90%+0.37%
Profit factor3.272.091.16
Median MAE-4.86%-3.14%-3.12%

Note: Past sample; not indicative of future results.

Near-earnings data for all three patterns fell below the minimum sample size and is not used in this article.


Limitations and caveats

Check for imbalances in sample size: Adding the MACD filter substantially reduces the sample size compared with no filter. The uptrend and near-earnings groups (all three patterns) and the low-volatility group for pattern A fell below the minimum sample size and are not used; the low-volatility groups for patterns B and C (N=32) are also small. The smaller the sample, the more likely it is that the observed figures include random variation.

The exit definition shapes the results: Patterns A, B and C differ only in how the exit is determined and whether a stop loss is used. Pattern A keeps holding without a stop loss until RSI rises above 50 (up to 60 trading days), so trades with growing losses continue to be held. This is likely reflected in the size of the largest loss and average loss. Pattern C uses a -5% stop loss, but if the stock gaps down at the open, the loss can exceed -5%.

Don't overestimate the effect of the filter: The comparison in this article is only an observation of historical data. It cannot be concluded that the condition "MACD above its signal line" reduces false signals. It was also observed that the share of trades closed in profit was higher without the filter and that the median MAE (the median of the adverse excursion while holding) was larger (more negative) with the filter, so it is worth keeping in mind that the results do not uniformly favor either approach.

Survivorship bias: As noted above, the stocks were selected from the current constituents. Stocks that left the market in the past are not included, so the results may look more optimistic than actual past performance.


Summary

  • Adding the MACD filter substantially reduces the sample size
  • The share of trades closed in profit was higher without the filter, but average P/L was higher with the filter (patterns B and C); profit factor was higher with the filter in pattern B and at the same level in pattern C
  • The largest loss was larger (more negative) without the filter, while the median MAE was larger (more negative) with the filter
  • By trend, the share of trades closed in profit, average P/L and profit factor were higher in ranges than in downtrends in all 3 patterns
  • The uptrend and near-earnings groups, and low volatility for pattern A, have too few samples to judge

With ENTRIQ's Chart Replay, you can apply conditions like these to past charts yourself and build a feel for them. By recording what you tried while changing the test rules with Strategy Tags, you can later look back at which conditions and environments you tested, and how many times.


Frequently asked questions (FAQ)

Q. Does adding a MACD filter reduce false signals?

A. In the backtests in this article, the share of trades closed in profit was higher without the filter, and the median MAE was larger (more negative) with the filter. There is no data to conclude that false signals decrease, and the sample size is also substantially reduced.

Q. Can I test with MACD parameters other than (12, 26, 9)?

A. The test conditions in this article fix the MACD parameters at 12, 26 and 9. Changing the parameters changes the number of days that meet the condition, so the results also change.

Q. Do these backtests use buy (long) entries?

A. Yes, all backtests in this article use buy entries. In a backtest that enters by selling short, the direction of P/L is reversed (a falling stock price produces a gain). ENTRIQ's Chart Replay also lets you practice short selling.

Q. Can I use these results directly in my own trading?

A. Results change if the stocks, period, timeframe or exit conditions differ. Use the figures in this article as a reference for thinking things through, and check again with your own stocks and conditions. The basics of using RSI are covered in Complete Guide to RSI|Reading, Settings, Entries and Testing.

Q. What does "no stop loss in pattern A" mean?

A. Pattern A (A_signal) exits at the open on the next trading day after RSI rises above 50; if it does not, it exits at the close on the 60th trading day. It has no stop-loss condition along the way. Because there is no stop loss, positions continue to be held even when losses grow, which is worth keeping in mind.


This article is provided for informational purposes to examine and organize historical data and does not recommend any specific trade. The figures shown are past samples and do not indicate future results. All investment decisions are your own responsibility.

Test the same condition used in this article on symbols of your choice.

Backtest this condition

Reproduce this validation yourself

With ENTRIQ's chart replay, you can trade through past charts using the same rules.

Try the demo — no sign-up

No sign-up or card needed. Runs right in your browser. Start 14-day free trial →

Validate your method on past charts

The same validation in this article can be reproduced with your own method. On past charts, do the classics really work?

  • ✓ Replay past charts
  • ✓ AI feedback on your trades
  • ✓ Validate methods with statistics

No sign-up or card needed. Runs right in your browser.

Related reading

StrategyLAYER 1

Daily MACD Death Cross Shorts on US Stocks|3 Exits Compared

ENTRIQ backtest of shorting from the day after a MACD(12, 26, 9) death cross on daily charts of 100 US stocks (5–56 years each), with 3 exit patterns.

StrategyLAYER 1

Daily MACD Golden Cross Buys on US Stocks|3 Exits Compared

ENTRIQ backtest of buying after the MACD(12, 26, 9) golden cross on daily charts of 100 US stocks (5–56 years each), with figures for 3 exit patterns.

StrategyLAYER 1

Daily RSI vs Stochastics on US Stocks|Contrarian Entries

ENTRIQ backtest: RSI(14) vs slow stochastics (14, 3, 3) contrarian entries with identical exits on daily charts of 100 US stocks (5–56 years each).

StrategyLAYER 1

Daily RSI Below 30 on US Stocks|Effect of an SMA200 Filter

ENTRIQ backtest of 100 US stocks on daily charts (5–56 years each): how RSI-below-30 buys change when limited to days closing above SMA200, versus no filter.

Try in ENTRIQ

Reproduce this validation with your own method

Replay past charts and discover your method's actual win rate.

Try the demo — no sign-up

Start 14-day free trial →