Testing the Profitability of Technical Analysis in Singapore And
Total Page:16
File Type:pdf, Size:1020Kb
View metadata, citation and similar papers at core.ac.uk brought to you by CORE provided by ScholarBank@NUS Testing the Profitability of Technical Analysis in Singapore and Malaysian Stock Markets Department of Electrical and Computer Engineering Zoheb Jamal HT080461R In partial fulfillment of the requirements for the Degree of Master of Engineering National University of Singapore 2010 1 Abstract Technical Analysis is a graphical method of looking at the history of price of a stock to deduce the probable future trend in its return. Being primarily visual, this technique of analysis is difficult to quantify as there are numerous definitions mentioned in the literature. Choosing one over the other might lead to data- snooping bias. This thesis attempts to create a universe of technical rules, which are then tested on historical data of Straits Times Index and Kuala Lumpur Composite Index. The technical indicators tested are Filter Rules, Moving Averages, Channel Breakouts, Support and Resistance and Momentum Strategies in Price. The technical chart patterns tested are Head and Shoulders, Inverse Head and Shoulders, Broadening Tops and Bottoms, Triangle Tops and Bottoms, Rectangle Tops and Bottoms, Double Tops and Bottoms. This thesis also outlines a pattern recognition algorithm based on local polynomial regression to identify technical chart patterns that is an improvement over the kernel regression approach developed by Lo, Mamaysky and Wang [4]. 2 Acknowledgements I would like to thank my supervisor Dr Shuzhi Sam Ge whose invaluable advice and support made this research possible. His mentoring and encouragement motivated me to attempt a project in Financial Engineering, even though I did not have a background in Finance. I would also like to thank my co-supervisor Dr Lee Tong Heng for his guidance and support. I am also grateful to my friends in the NUS Invest Club with whom I had many fruitful discussions. Some of the ideas applied in this thesis owe their origin to these discussions. 3 Contents Abstract ....................................................................................................................2 Acknowledgements ..................................................................................................3 Contents ...................................................................................................................4 List of Figures ..........................................................................................................7 List of Tables ...........................................................................................................8 List of Symbols and Abbreviations ..........................................................................9 Chapter 1 Introduction .........................................................................................11 1.1 Support for Technical Analysis..................................................................14 1.1.1 Survey Studies ............................................................................................... 14 1.1.2 Empirical Studies ........................................................................................... 16 1.2 Research Objective ....................................................................................18 Chapter 2 Technical Indicators and Chart Patterns ..............................................21 2.1 Filter Rules ..................................................................................................22 2.2 Moving Averages .......................................................................................25 2.3 Support and Resistance ..............................................................................28 2.4 Channel Breakouts .....................................................................................29 2.5 Momentum Strategies in Price ...................................................................29 2.6 Head and Shoulders ...................................................................................30 2.7 Broadening Tops and Bottoms ...................................................................33 2.8 Triangle Tops and Bottoms ........................................................................35 2.9 Rectangle Tops and Bottoms .....................................................................37 2.10 Double Tops and Bottoms .......................................................................38 Chapter 3 Chart Pattern Detection Algorithm.......................................................41 3.1 Smoothing Estimators ................................................................................41 4 3.2 Kernel Regression and Determination of the Estimation Weights ............44 3.3 Selection of Bandwidth ..............................................................................45 3.4 Limitations of Kernel Regression ..............................................................50 3.5 Local Polynomial regression ......................................................................50 3.6 The Identification Algorithm .....................................................................53 Chapter 4 Empirical Data, Statistical Tests and Results .....................................61 4.1 Empirical Data ...........................................................................................61 4.2 Statistical Test ............................................................................................62 4.3 Results ........................................................................................................64 4.3.1 In-sample Profitable Rules ............................................................................ 64 4.3.2 Out-of-sample comparison with buy-and-hold strategy ............................... 66 Chapter 5 Conclusion and Future Work ..............................................................73 Appendix A: Parameter Values of Technical Indicators and Chart Patterns .........75 A.1 Filter Rules ................................................................................................75 A.2 Moving Averages ......................................................................................75 A.3 Support Resistance ....................................................................................76 A.4 Channel Breakouts ....................................................................................76 A.5 Momentum Strategies in Price ..................................................................77 A.6 Head and Shoulders and Inverse Head and Shoulders ..............................77 A.7 Broadening Tops and Bottoms ..................................................................78 A.8 Triangle Tops and Bottoms .......................................................................79 A.9 Rectangle Tops and Bottoms ....................................................................79 A.10 Double Tops and Bottoms .......................................................................80 Appendix B: Parameter Values of Best Performing Rules in each class ...............81 B.1 Filter Rules ................................................................................................81 B.2 Moving Averages ......................................................................................81 B.3 Support Resistance ....................................................................................81 B.4 Channel Breakout ......................................................................................81 B.5 Momentum Strategies in Price ..................................................................81 B.6 Head and Shoulders/Inverse Head and Shoulders .....................................82 5 B.7 Broadening Tops and Bottoms ..................................................................82 B.8 Triangle Tops and Bottoms .......................................................................82 B.7 Rectangle Tops and Bottoms .....................................................................82 B.7 Double Tops and Bottoms .........................................................................82 References ..............................................................................................................83 6 List of Figures Figure 1 - Filter Rule – x = 0.1 ..............................................................................23 Figure 2 - Filter Rule – x = 0.1, y = 0.5 .................................................................24 Figure 3 - Filter Rule – x = 0.1, c = 5 ....................................................................24 Figure 4 - Simple Moving Average - n = 50 ..........................................................27 Figure 5 - Crossover Moving Average - n = 200, m = 50 .....................................27 Figure 6 - Head and Shoulders ...............................................................................32 Figure 7 - Inverted Head and Shoulders ................................................................33 Figure 8 - Broadening Top .....................................................................................34 Figure 9 - Triangle Top ..........................................................................................36 Figure 10 - Triangle Bottom ..................................................................................36 Figure 11 - Rectangle Top .....................................................................................38 Figure 12 - Double Top ..........................................................................................39