Since markets can head upwards and downwards at different rates, there are times you may want to consider changing your technical indicator settings if you can objectively identify bullish versus bearish conditions. Ideally, when viewing two indicators using different speeds in one chart pane, you may be alerted to a transition from one type of market to the other.
Last week an approach outlined by Gerald Appel in his book, Technical Analysis Power Tools for Active Investors, that used different indicator speeds for different conditions was introduced (Analytical Toolbox: Varying Indicator Settings, 8/14/08). This week, a basic method to test the approach is identified, along with results.
Testing Bullish & Bearish MACD Settings
Moving Average Convergence-Divergence [MACD] techniques, developed by creator Gerald Appel, are nicely covered in the referenced book. Among other things, Appel describes general guidelines for MACD settings along with those that may work better under bullish or bearish conditions. These are revisited here to set-up a basic system for testing these guidelines.
As a quick aside, the goal of this exercise is not to prove or disprove Appel’s techniques—his ability to successfully manage portfolios over varied market conditions does the job there. The goal is to see if a quick system can be programmed to replicate his general guidelines (including an objective rule for bullish versus bearish conditions) to determine if different settings should be used for market analysis.
MACD Application: Appel suggests using a long EMA that is two to three times the short EMA. He also comments that when using MACD as a sole indicator for trading, signal line crosses that coincide with MACD reversals represent stronger buying/selling opportunities. So when MACD is declining and is below the zero line, a reversal upward with a signal line cross is a better buy signal than a subsequent cross that occurs as the indicator trends upward. In addition, Appel uses faster entry and slower exit combinations when conditions are generally bullish and the same entry and exit speed when markets are generally bearish.
One approach a trader can use to distinguish longer-term bullish and bearish conditions is the relative position of two MAs. As an example, when the 50-day EMA is above the 200 day EMA, conditions are defined as bullish. A shorter-term trader may use a 10-day and 30-day SMA combination. Remember to stay true to your style when it comes to defining these periods.
Testing It
Using ProfitSource, we can try to test the effectiveness of different speeds by checking out a couple of scans. I say “try” because the process included here is far from rigorous. Statistically significant results and “there seems to be something here” both have their place when exploring different tools.
A base MACD long only system was tested using a MACD Graph crosses above and below the MACD Line as an entry and exit signals using the default settings of 12-26-6 for both. An attempt to replicate Appel’s other rules of thumb was made by adding parameters:
12-26-9 Base Entry:
- MACD Graph crosses above MACD Line on the current day
- MACD Graph of current day ago is less than 0 (buy signal below 0 line)
- MACD Line of current day ago is less than 0 (buy signal below 0 line)
- MACD Line of 3 days ago is greater than MACD Line of the current day (reversal criteria 1)
- MACD Line of 5 days ago is greater than MACD Line of the current day (reversal criteria 2)
12-26-9 Base Exit:
- MACD Graph crosses below MACD Line on the current day
Two bullish-bearish approaches were also tested uses different MACD speeds given market conditions.
Bearish: 50-day EMA < 200-dy EMA
Bullish: 50-day EMA > 200-dy EMA
The bearish rule was added to the 12-26-9 Base Entry while the exit was held constant. The bullish entry/exit follows:
6-19-6 Bull Entry
- MACD Graph crosses above MACD Line on the current day
- MACD Graph of current day ago is less than 0 (buy signal below 0 line)
- MACD Line of current day ago is less than 0 (buy signal below 0 line)
- MACD Line of 3 days ago is greater than MACD Line of the current day (reversal criteria 1)
- MACD Line of 5 days ago is greater than MACD Line of the current day (reversal criteria 2)
- 50-day EMA above 200-dy EMA for the current day
- MACD Graph greater than MACD Line on the current day (using 19-39-9)
19-39-9 Bull Exit
- MACD Graph crosses below MACD Line on the current day
In each test a basic exit is used, so for both 12-26-9 entries a MACD Graph cross below the MACD Line generates an exit. The faster bullish entry is combined with a delayed exit using a 19-39-9 combination. The EMA lengths for all three of these settings were defined by Appel (12-26, 6-19, 19-39).
To summarize, three test runs were completed as follows:
System 1: 12-26-9 Base Entry & 12-26-9 Base Exit
System 2: 12-26-9 Bear Entry & 12-26-9 Base Exit (bearish periods)
6-19-6 Bull Entry & 19-39-9 Base Exit (bullish periods)
The third system tested replaced the 19-39-9 MACD with the base 12-26-9 MACD because too many trades were filtered out when the MACD Graph was required to be greater than MACD Line for entry.
System 3: 12-26-9 Bear Entry & 12-26-9 Base Exit (bearish periods)
6-19-6 Bull Entry & 12-26-9 Base Exit (bullish periods)
The symbols included in a shortlist of names in different industries, including Technology, Biotech, Financials and Industrials (AAPL, AMLN, ILMN, AMAT, LRCX, GS, AXP, XOM & AA). The test was run over a seven year period (1 Jan 1999 through 31 Dec 2005). $20,000 was the initial account balance and 50% of that initial balanced ($10,000) was used for each trade. A $10 per trip brokerage was also applied ($20 per trade).
Basic results for the three systems are found below.
| System 1 | System 2 | System 3 |
| 12-26-9 | 6-19-6, 19-39-9 | 6-19-6, 12-26-9 |
| All Conditions | Bull / Bear | Bull / Bear |
Total Trades | 88 | 3 / 72 | 11 / 72 |
Profit | 35 | 1 / 27 | 7 / 27 |
Loss | 53 | 2 / 45 | 4 / 45 |
Profit/Total % | 40 | 33 / 38 | 64 / 38 |
Net Returns | 7,510 | 984 / 4,131 | 512 / 4,131 |
Returns: Mean% | 0.9 | 3.3 / 0.6 | 0.5 / 0.6 |
Median% | (3.0) | (4.4) / (2.0) | 1.0 / (2.0) |
Returns: Mean % (Profits) | 13.5 | 20.5 / 14.3 | 4.9 / 14.3 |
Largest% | 104.7* | 20.5 / 102* | 13.0 / 102* |
Returns: Mean % (Losses) | (7.5) | (5.3) / (7.6) | (7.3) / (7.6) |
Largest% | (25.0) | (6.3) / (30.0) | (14.0) / (30.0) |
* One trade yielded more profits then the system Net Returns.
Result Comments
- Although System 1 was profitable, it was not viable for the securities and period tested since all of the profits (and then some) were generated from one trade. To gain a sense of system stability, compare the mean returns with the median returns.
- The 12-26-9 MACD entry/exit under bearish conditions ceases to trade in 2002 because there are insufficient funds to initiate a new position. A faster exit was incorporated using a 6-12-6 MACD; however, the profitability of this approach was again due to a single trade.
Before suggesting Appel’s bullish/bearish approach to MACD speed degraded over time as systems can do, it’s much more reasonable at this point to evaluate specific trades to determine to what extent Appel’s “rules of thumb” were effectively programmed. Viewing different charts, it appeared the reversal requirement was typically satisfied; however, it was not uncommon to see trades taken on subsequent crosses below the zero line (rather than just the first cross after a reversal).
A second series of tests will be run using just MACD Graph crosses of the MACD Line with different speeds. The bullish-bearish test will be added to see if faster settings can be applied profitability to a long entry when conditions are bearish. A short test will also be run.
Additional Comments
Each trader needs to decide which settings work best for the indicators they use. When you deviate from the default setting, be sure you have a specific reason for changing it and that you recognize the impact it will have on your alerts and signals (whipsaws or delays). Ideally changes you make to your indicator settings reflect time frames that suit your trading style. One trader’s short-term position may be another’s long-term one.
When testing indicators, try to generate rules replicating ideal conditions, as well as stripped down versions of them. Results of stripped down versions of MACD will be posted to my discussion board on Friday, 8/22/08.
To access other articles written by Clare White, please click here.
Clare White, CMT
Contributing Writer and Options Strategist
Optionetics.com ~ Your Options Education Site
Questions for Clare? Visit the Optionetics.com Discussion Board









