Strategies for the Simple Timing Indicator (STI) and MACD to … · 2011. 11. 3. · • The MACD...

22
Strategies for the Simple Timing Indicator (STI) and MACD to Improve Investment Performance AFTA October 18 & 22, 2011 Jim Gunn [email protected]

Transcript of Strategies for the Simple Timing Indicator (STI) and MACD to … · 2011. 11. 3. · • The MACD...

Page 1: Strategies for the Simple Timing Indicator (STI) and MACD to … · 2011. 11. 3. · • The MACD Timing Indicator is usually faster signal than the STI, but more whipsaws • Appel

Strategies for theSimple Timing Indicator (STI) and 

MACD to Improve Investment Performance

AFTAOctober 18 & 22, 2011

Jim [email protected]

Page 2: Strategies for the Simple Timing Indicator (STI) and MACD to … · 2011. 11. 3. · • The MACD Timing Indicator is usually faster signal than the STI, but more whipsaws • Appel

Disclaimer

No Representations are made that the investment strategies presented herein or discussed by the presenter are complete, without error, or will produce desired investment results. This presentation is made for information sharing purposes only. Nor are any representations made that the investment strategies discussed have been employed to achieve successful investment results. Many of the results are based on back testing with historical data and simulated investing. Future investing results may significantly differ. You should perform your own independent research and “Due Diligence” prior to making any investment decisions, and invest accordingly.

10/22/2011 2

Page 3: Strategies for the Simple Timing Indicator (STI) and MACD to … · 2011. 11. 3. · • The MACD Timing Indicator is usually faster signal than the STI, but more whipsaws • Appel

AAII Technical Indicator Quote“AAII Computerized Investing”, 4th Qtr 2011, p1,“Building AAII Stock Screens” Article, by Wayne Thorp

“All of the stock screens AAII develops are based on our interpretation of an approach, often as it was outlined in a book, article or academic paper. For example, in this issue I finish my two-part discussion of Charles Carlson’s formulas for selecting promising dividend-paying stocks. In developing this and other stock screens, I follow the author’s approach as it is outlined in the source. However, many successful investors do not want to “give away the farm” when writing about their approach, so they are purposefully vague when outlining their search criteria. Therefore, there are times when we must use our investment expertise, and the wisdom of other market gurus, when deciphering what the author is trying to say.”

10/22/2011 3

Lessons Learned• Investments Strategies offered by “Experts” and others are often incomplete;

sometimes purposefully or sometimes due to changing market conditions• No Technical Indicator or combinations of Indicators or strategies are reliable over

all time frames, selected investments, and market conditions• Best investment successes will usually be achieved by developing and adapting

our own information, strategies, due diligence, study, and self-training

Page 4: Strategies for the Simple Timing Indicator (STI) and MACD to … · 2011. 11. 3. · • The MACD Timing Indicator is usually faster signal than the STI, but more whipsaws • Appel

Presentation Topics

• Overview of Excel as Investment Tool • Overview of use of STI and MACD Strategies Explanations

• Simple Timing Indicator (STI)• Moving Average Convergence Divergence Indicator (MACD)• Where indicators usually work and don’t• Human Chart Pattern Recognition

• Weekly Chart Examples• Seasonality Analysis• Interactive Charts of Results using Excel (Tuesday, as time permits)

• QQQ – Powershares NASDAQ 100 Index ETF• SPY – S&P 100 Index ETF• IJH – iShares S&P 400 Mid Cap Index ETF• IJR – iShares S&P 600 Small Cap Index ETF• AMZN – Amazon

• EMA vs SMA Analysis• Above and Audience Requests (Saturday at Baylor)

• Advanced Inputs Appreciated to load data base, if necessary (and possible)• Limited others possible, but more time consuming to download data• ~1200 Symbols in current data base

10/22/2011 4

Page 5: Strategies for the Simple Timing Indicator (STI) and MACD to … · 2011. 11. 3. · • The MACD Timing Indicator is usually faster signal than the STI, but more whipsaws • Appel

References

• Appel, Gerald; Technical Analysis; MACD Chapter 8; 2005, FT Press• Elder, Dr. Alexander; Come Into my Trading Room; 2002, Wiley• Elder, Dr. Alexander, Presentation at Money Show Dallas, June 2011• Richards, Fred, STI discussions in various Presentations at Dallas Investors Forum,

2009-2010• Saddler, Rick; “Swing Trade the T-Line” Presentation, DFW AFTA, October 10, 2010

(T-Line is the 8 EMA of Close)

10/22/2011 5

Page 6: Strategies for the Simple Timing Indicator (STI) and MACD to … · 2011. 11. 3. · • The MACD Timing Indicator is usually faster signal than the STI, but more whipsaws • Appel

Methodology and Tools• Goals:

• Better understand Indicators and their utilization in investing• Utilize Black Box Indicators, but better understand when not reliable, and adapt

• Study Historical Charts of Investments of Interest• Carefully note when patterns are most reliable and least reliable and adapt• Judiciously apply human chart pattern recognition abilities and when appropriate

follow most reliable indicator(s) or combinations• Use Excel for all charting, indicator calculations, financial analysis, back testing, step

forward analysis, seasonality analysis, etc.• Excel/Office 2010, released in June 2010• Can use other tools, such as stockcharts.com, yahoo finance, TC2000 etc. for

daily strategy(s) execution, but these often have deficiencies for back testing, historical data (especially longer time frames), step forward analysis, etc.

• Many Stock Indicator “How to” papers often give brief discussions• Excel examples often provided to demonstrate calculations

• Many indicators are old and based on pre-computer era computing and plotting resources

• Simplifications were often used to reduce calculations or plotting efforts• Modern Computer and Communication technologies offer potential to enhance

use of indicators

10/22/2011 6

Page 7: Strategies for the Simple Timing Indicator (STI) and MACD to … · 2011. 11. 3. · • The MACD Timing Indicator is usually faster signal than the STI, but more whipsaws • Appel

-2.0

-1.5

-1.0

-0.5

0.0

0.5

1.0

1.5

7/31/11 8/7/11 8/14/11 8/21/11 8/28/11 9/4/11 9/11/11 9/18/11 9/25/11 10/2/11 10/9/11 10/16/11 10/23/11

QQQ MACD (8,20,7) Histogram DIF Sig

406080

100120140160180200220

7/31/11 8/7/11 8/14/11 8/21/11 8/28/11 9/4/11 9/11/11 9/18/11 9/25/11 10/2/11 10/9/11 10/16/11 10/23/11

QQQ Volume Vol Vol  SMA

48

50

52

54

56

58

60

7/31/11 8/7/11 8/14/11 8/21/11 8/28/11 9/4/11 9/11/11 9/18/11 9/25/11 10/2/11 10/9/11 10/16/11 10/23/11

PowerShares QQQ Trust, Series 1 Price 8EMA 20EMA 50EMA 200EMA

PS QQQ (NASDAQ ETF) (last 2+ months)

10/22/2011 7

20 EMA 50EMA 200EMA8 EMA

STI:  Long when 8EMA >= 20EMA or equivalent when MACD >= 0

MACD(8,20) = DIF = 8EMA – 20EMA

Histogram = DIF ‐ SIG

Page 8: Strategies for the Simple Timing Indicator (STI) and MACD to … · 2011. 11. 3. · • The MACD Timing Indicator is usually faster signal than the STI, but more whipsaws • Appel

Investing Rules• Primary Indicators:

• MACD(8,20,7) of Close• Long MACD > SIG; • Short or Cash MACD < SIG

• Simple Timing Indicator• Long 8EMA >= 20EMA or MACD >= 0• Short or Cash 8EMA < 20EMA or MACD < 0

• Secondary Indicators • T-Line: (Especially note support or resistance over time)

• Long: Ci >= 8EMA (Support)• Short or Cash Ci < 8EMA (Resistance)

• Supporting/Confirming Indicators (Maintain Awareness)• EMA trending Up (Bullish) or Down (Bearest)• MACD trending up (Bullish) or Down (Bearest)• MACD Histogram trending up (Bullish) or Down (Bearest)

• Money Management• Limit loses: 6% - 8%

10/22/2011 8

Page 9: Strategies for the Simple Timing Indicator (STI) and MACD to … · 2011. 11. 3. · • The MACD Timing Indicator is usually faster signal than the STI, but more whipsaws • Appel

Excel Block Diagram: Data, Storage, and Calculation

Access/2010Over 1000 Symbols:

Price: Open, High, Low, Close, VolumeData Storage

YahooWeb

Stock Prices & Volumedownload

Excel/2010/VBACharting

Indicator CalculationsControl Panel(s)

Active Symbol  data, MA, MACD,  & Financial Analysis

Seasonality Analysis

10/22/2011 9

ADOto 

Access Data

Workbooks.Open("http://ichart.finance.yahoo.com/table.csv?s=QQQ")

VBA Statement to download QQQ

Page 10: Strategies for the Simple Timing Indicator (STI) and MACD to … · 2011. 11. 3. · • The MACD Timing Indicator is usually faster signal than the STI, but more whipsaws • Appel

Functionality Additions since AFTA Dec 2010 Presentations

10/22/2011 10

1. Multipage Menus2. Menu Setting STI & MACD parameters (e.g. 8 EMA or 10 SMA, etc.)3. Support for Stock Splits4. Enable Re-charting with select data update

a. Sub-Time Frame Results in back testingb. Stock Splits

5. Weekly Charts6. Menu Driven Daily Price Updates from Yahoo7. Increased Symbols in Data Base

a. S&P 500b. NASDAQ (Market Capitalization > $900,000c. Working Database for Indexes, ETFs, Mutual Funds, others, etc.

8. Step Forward Analysis9. Seasonality Analysis

Page 11: Strategies for the Simple Timing Indicator (STI) and MACD to … · 2011. 11. 3. · • The MACD Timing Indicator is usually faster signal than the STI, but more whipsaws • Appel

Stock Price/Volume Data

Yahoo Data Source• www.finance.yahoo.com• End of Day (EOD) Data• EOD data typically fully available by ~9 – 10 pm on trading days• Data Downloaded: Date, open, High, Low, Close, Volume, and Adjusted Close• Only Adjusted Close accounts for splits and dividends• Initial download of all historical data for a Symbol requires a special setup in

automation• Subsequent daily updates via automation• Mutual Funds, indices, sectors, etc.

• ~1200 Symbols in current data base• 8000+ Symbols can be accommodated in Access, but download time

would be long

10/22/2011 11

Page 12: Strategies for the Simple Timing Indicator (STI) and MACD to … · 2011. 11. 3. · • The MACD Timing Indicator is usually faster signal than the STI, but more whipsaws • Appel

Back Test Methodology

• Use End of Day (EOD, Close) Data• Make next day’s Long, Short, or Cash Decisions with EOD indicators• Go Long, Cash, or Short with Open of next Trading Day• Note: 

• Can be more flexible with human intervention• all discussions today will use next day open for buy/sell

10/22/2011 12

Page 13: Strategies for the Simple Timing Indicator (STI) and MACD to … · 2011. 11. 3. · • The MACD Timing Indicator is usually faster signal than the STI, but more whipsaws • Appel

ExponentialMovingAverageofCloseattimei EMAiEMA EMA C EMA of Close

where C isthecloseonthelatestdate;C latest Trading Day minus 1

For EMA of other indicators, e.g. Volume, Use Vi, instead of Ci

should be less than 1 and greater than 0

= (typical) or = where 20 is the length of a 20EMA

Note: 20 SMAi = ∑

Observations• EMAs typically take 2 – 3 times the period to stabilize

• For example, a 20EMA can require 40 to 60 historical calculations to converge• Simple Moving Averages (SMA) may be employed, but EMAs’ respond faster and

usually provide better performance.• MA indicators generally are more reliable that MACD indicators, but catch market

changes slower that MACDs.• MA have whipsaws, but generally less frequent than MACD

10/22/2011 13

Page 14: Strategies for the Simple Timing Indicator (STI) and MACD to … · 2011. 11. 3. · • The MACD Timing Indicator is usually faster signal than the STI, but more whipsaws • Appel

MovingAverageConvergenceDivergence MACD Indicator

MACD(8,20) = EMA(8) – EMA(20) often called DIFF or MACD(8,20)note when EMA(8) >= EMA(20) that MACD(8,20) >= 0, MACD is equivalent to STI as long as same EMAs are used.

Sig(9) = EMA(MACD(8,20) )often called SIG

Histogram = MACD(8,20) – SIG(9)often plotted with an MACD indicator plot

Observations• The MACD Timing Indicator is usually faster signal than the STI, but more whipsaws• Appel clearly indicates that MACD is not always reliable and provides examples• Apple in his book states that the MACD is most reliable when the DIF passes through

0 before signaling a change (e.g., long, cash, or short)• Appel also indicates that the MACD will become unreliable due to whipsaws when

price (usually close) trends in a narrow channel• Elder states that divergence of price and the MACD is the best indicator in technical

analysis

10/22/2011 14

Page 15: Strategies for the Simple Timing Indicator (STI) and MACD to … · 2011. 11. 3. · • The MACD Timing Indicator is usually faster signal than the STI, but more whipsaws • Appel

QQQ (NASDAQ ETF) BH & STI Return (1/1/2000 Through 10/21/2011)

10/22/2011 15

0

20

40

60

80

100

120

140

1/2/00 7/2/00 1/2/01 7/2/01 1/2/02 7/2/02 1/2/03 7/2/03 1/2/04 7/2/04 1/2/05 7/2/05 1/2/06 7/2/06 1/2/07 7/2/07 1/2/08 7/2/08 1/2/09 7/2/09 1/2/10 7/2/10 1/2/11 7/2/11

PowerShares QQQ Trust, Series 1 Price (Daily) 8EMA 20EMA 50EMA 200EMA

$20$40$60$80

$100$120$140$160$180$200$220

1/2/00 7/2/00 1/2/01 7/2/01 1/2/02 7/2/02 1/2/03 7/2/03 1/2/04 7/2/04 1/2/05 7/2/05 1/2/06 7/2/06 1/2/07 7/2/07 1/2/08 7/2/08 1/2/09 7/2/09 1/2/10 7/2/10 1/2/11 7/2/11

QQQ: Simple TI $ Return BHRet: ‐40.43%ReT:    44.06%

$100K Long Shrt Cash

-8-6-4-20246

1/2/00 7/2/00 1/2/01 7/2/01 1/2/02 7/2/02 1/2/03 7/2/03 1/2/04 7/2/04 1/2/05 7/2/05 1/2/06 7/2/06 1/2/07 7/2/07 1/2/08 7/2/08 1/2/09 7/2/09 1/2/10 7/2/10 1/2/11 7/2/11

QQQ MACD (8,20,7) Histogram DIF Sig

Page 16: Strategies for the Simple Timing Indicator (STI) and MACD to … · 2011. 11. 3. · • The MACD Timing Indicator is usually faster signal than the STI, but more whipsaws • Appel

QQQ (NASDAQ ETF) Back Test Results

10/22/2011 16

BH: Buy & Hold; STI: Simple Timing Indicator; LG: Long; CH: Cash; SH: Short

Notes: Black Box (Mechanically) follow STI or MACD Indicators

2011 through 10/21

YR BH LG/CH LG/SH LG/CH LG/SH2000 ‐39.31% 0.25% 42.23% 40.81% 47.11%2001 ‐33.56% ‐8.59% 11.86% ‐32.66% ‐42.01%2002 ‐38.41% ‐13.36% 15.46% ‐34.63% ‐33.89%2003 47.49% 1.61% ‐31.23% 22.32% 0.80%2004 8.89% 5.94% 2.65% 4.26% ‐1.17%2005 0.80% ‐3.68% ‐8.39% 11.17% 21.96%2006 6.17% 8.63% 8.04% ‐2.69% ‐11.63%2007 17.86% ‐2.99% ‐20.69% 11.23% 3.86%2008 ‐41.99% ‐3.97% 38.85% ‐27.38% ‐15.26%2009 53.78% 28.10% 5.86% 31.61% 11.46%2010 17.55% 10.98% 4.56% 25.84% 32.97%2011 3.91% 10.98% ‐16.62% 0.54% ‐3.84%Total ‐40.43% 14.08% 44.06% ‐50.40% ‐73.30%

STI (8,20) MACH((8,20,7)

Page 17: Strategies for the Simple Timing Indicator (STI) and MACD to … · 2011. 11. 3. · • The MACD Timing Indicator is usually faster signal than the STI, but more whipsaws • Appel

QQQ 2011 (Daily)

10/22/2011 17

Buy & Hold, Best Performance

Comparing MACD and STI, Long‐Short and Long‐Cash; and Buy and Hold

48

50

52

54

56

58

60

1/2/11 1/23/11 2/13/11 3/6/11 3/27/11 4/17/11 5/8/11 5/29/11 6/19/11 7/10/11 7/31/11 8/21/11 9/11/11 10/2/11 10/23/11

PowerShares QQQ Trust, Series 1 Price 8EMA 20EMA 50EMA 200EMA

-2.0-1.5-1.0-0.50.00.51.01.5

1/2/11 1/23/11 2/13/11 3/6/11 3/27/11 4/17/11 5/8/11 5/29/11 6/19/11 7/10/11 7/31/11 8/21/11 9/11/11 10/2/11 10/23/11

QQQ MACD (8,20,7) Histogram DIF Sig

$90$92$94$96$98

$100$102$104$106$108$110

1/2/11 1/23/11 2/13/11 3/6/11 3/27/11 4/17/11 5/8/11 5/29/11 6/19/11 7/10/11 7/31/11 8/21/11 9/11/11 10/2/11 10/23/11

QQQ: MACD TI $ Return BHRet: 4.24%ReT:    0.85%

$100K Long Shrt Cash

Page 18: Strategies for the Simple Timing Indicator (STI) and MACD to … · 2011. 11. 3. · • The MACD Timing Indicator is usually faster signal than the STI, but more whipsaws • Appel

QQQ 2010 (Daily)

10/22/2011 18

MACD Indicator Long‐Short, Best Performance

Comparing MACD and STI, Long‐Short and Long‐Cash; and Buy and Hold

40

42

44

46

48

50

52

54

56

12/27/09 1/17/10 2/7/10 2/28/10 3/21/10 4/11/10 5/2/10 5/23/10 6/13/10 7/4/10 7/25/10 8/15/10 9/5/10 9/26/10 10/17/10 11/7/10 11/28/10 12/19/10

PowerShares QQQ Trust, Series 1 Price 8EMA 20EMA 50EMA 200EMA

-1.4-1.2-1.0-0.8-0.6-0.4-0.20.00.20.40.60.81.01.2

12/27/09 1/17/10 2/7/10 2/28/10 3/21/10 4/11/10 5/2/10 5/23/10 6/13/10 7/4/10 7/25/10 8/15/10 9/5/10 9/26/10 10/17/10 11/7/10 11/28/10 12/19/10

QQQ MACD (8,20,7) Histogram DIF Sig

$90$95

$100$105$110$115$120$125$130$135$140

12/27/09 1/17/10 2/7/10 2/28/10 3/21/10 4/11/10 5/2/10 5/23/10 6/13/10 7/4/10 7/25/10 8/15/10 9/5/10 9/26/10 10/17/10 11/7/10 11/28/10 12/19/10

QQQ: MACD TI $ ReturnBHRet: 17.55%ReT:    32.97%

$100KLong Shrt Cash

Page 19: Strategies for the Simple Timing Indicator (STI) and MACD to … · 2011. 11. 3. · • The MACD Timing Indicator is usually faster signal than the STI, but more whipsaws • Appel

QQQ 2009 (Daily)

10/22/2011 19Comparing MACD and STI, Long‐Short and Long‐Cash; and Buy and Hold

Buy and Hold, Best Performance

24

26

28

30

32

34

36

38

40

42

44

46

48

12/28/08 1/18/09 2/8/09 3/1/09 3/22/09 4/12/09 5/3/09 5/24/09 6/14/09 7/5/09 7/26/09 8/16/09 9/6/09 9/27/09 10/18/09 11/8/09 11/29/09 12/20/09

PowerShares QQQ Trust, Series 1 Price 8EMA 20EMA 50EMA 200EMA

-1.2-1.0-0.8-0.6-0.4-0.20.00.20.40.60.81.01.2

12/28/08 1/18/09 2/8/09 3/1/09 3/22/09 4/12/09 5/3/09 5/24/09 6/14/09 7/5/09 7/26/09 8/16/09 9/6/09 9/27/09 10/18/09 11/8/09 11/29/09 12/20/09

QQQ MACD (8,20,7) Histogram DIF Sig

$80$90

$100$110$120$130$140$150$160

12/28/08 1/18/09 2/8/09 3/1/09 3/22/09 4/12/09 5/3/09 5/24/09 6/14/09 7/5/09 7/26/09 8/16/09 9/6/09 9/27/09 10/18/09 11/8/09 11/29/09 12/20/09

QQQ: MACD TI $ ReturnBHRet: 53.78%ReT:    31.61%

$100K Long Shrt Cash

Page 20: Strategies for the Simple Timing Indicator (STI) and MACD to … · 2011. 11. 3. · • The MACD Timing Indicator is usually faster signal than the STI, but more whipsaws • Appel

10/22/2011 20

QQQ 2008 (Daily)STI, Long and Short, Best Performance

Comparing MACD and STI, Long‐Short and Long‐Cash; and Buy and Hold

25

30

35

40

45

50

55

12/30/07 1/20/08 2/10/08 3/2/08 3/23/08 4/13/08 5/4/08 5/25/08 6/15/08 7/6/08 7/27/08 8/17/08 9/7/08 9/28/08 10/19/08 11/9/08 11/30/08 12/21/08

PowerShares QQQ Trust, Series 1 Price 8EMA 20EMA 50EMA 200EMA

-3.5-3.0-2.5-2.0-1.5-1.0-0.50.00.51.01.5

12/30/07 1/20/08 2/10/08 3/2/08 3/23/08 4/13/08 5/4/08 5/25/08 6/15/08 7/6/08 7/27/08 8/17/08 9/7/08 9/28/08 10/19/08 11/9/08 11/30/08 12/21/08

QQQ MACD (8,20,7) Histogram DIF Sig

$40$60$80

$100$120$140$160$180

12/30/07 1/20/08 2/10/08 3/2/08 3/23/08 4/13/08 5/4/08 5/25/08 6/15/08 7/6/08 7/27/08 8/17/08 9/7/08 9/28/08 10/19/08 11/9/08 11/30/08 12/21/08

QQQ: Simple TI $ ReturnBHRet: ‐41.99%ReT:    38.85%$100K Long Shrt Cash

Page 21: Strategies for the Simple Timing Indicator (STI) and MACD to … · 2011. 11. 3. · • The MACD Timing Indicator is usually faster signal than the STI, but more whipsaws • Appel

Conclusions• Simple Timing Indicator (STI), MACD, T-Line, and other Indictors

• Have varying Performances if Mechanically followed• Time Range• Market Conditions• Specific Symbol (Company, ETF, Index, etc.)

• Human Chart Pattern Recognition abilities can improve performance• Examples provided using MACD and T-Line

• Others are possible with Investor ingenuity and work• Investment books• Investment web searches• Investment Seminars and Meetings

• Best Successes are undoubtedly achieved by:• Studying Indicators and understanding strengths and weaknesses• Devoting time to develop chart pattern recognition skills

• Books, presenters, etc. usually can only cover best and worst examples

• Many others patterns occur, including ones they have not yet observed

• Effective use of Money Management to minimize losses when strategies are unreliable and run with winners when reliable

10/22/2011 21

Page 22: Strategies for the Simple Timing Indicator (STI) and MACD to … · 2011. 11. 3. · • The MACD Timing Indicator is usually faster signal than the STI, but more whipsaws • Appel

Excel VBA Book

10/22/2011 22

Walkenbach, John; Microsoft Excel 2010, Power Programing with VBA; Wiley, 2010