Profitability and Impact of Complexity on Technical Trading Systems ...

6 downloads 46938 Views 2MB Size Report
complex technical trading systems are profitable and are able to retain .... This same concept was discussed nearly 200 years ago by economist and trader James ..... upside (downside) is a strong directional movement and the start of a new.
PROFITABILITY AND THE IMPACT OF COMPLEXITY ON TECHNICAL TRADING SYSTEMS IN THE FOREIGN EXCHANGE MARKET

Brian Kenneth Edward Leip*

[May 2011]

* Brian Leip is an undergraduate student in the College of Business Administration Honors Program at California State University, Long Beach, CA 90840. This manuscript serves to fulfill his Honors Thesis requirement. Address correspondence to Brian Leip: [email protected].

Technical Trading Systems in the Forex Market

i

ACKNOWLEDGEMENTS I must begin by offering my deepest gratitude towards Dr. Pamela Miles Homer, Director of the CSULB and my thesis sponsor, without whom this thesis would likely not have been completed. Her deep understanding of the academic thesis process coupled with her persistence and constant encouragement was vital in seeing this paper through to completion. I would also like to thank Dr. Peter Ammermann for supporting me in the CSULB Student Research Competition as well as giving a final review of this paper. Dr. Sam Min also deserves my genuine thanks for the time he spent guiding the CBA Honors Program while Dr. Homer was on sabbatical. I conclude with a heartfelt thanks to my friends, parents, siblings, and girlfriend who patiently supported me throughout this most challenging endeavor. Completing my thesis demanded a significant portion of my time. Their kind words, understanding, and encouragement made the sacrifices easier to bear and the joy of completing the thesis that much greater.

Technical Trading Systems in the Forex Market

1

PROFITABILITY AND THE IMPACT OF COMPLEXITY ON TECHNICAL TRADING SYSTEMS IN THE FOREIGN EXCHANGE MARKET

ABSTRACT This study examines the profitability of 63 publicly available automated technical trading strategies across six complexity levels over a 35-year period (1/1/1975 to 6/30/2010). The strategies are tested on the spot foreign exchange market where technical analysis usage is most prevalent. Prior studies on technical analysis in the foreign exchange market argue that simple technical trading systems generate excess profits that are eroded over time to near zero, yet more complex technical trading systems are profitable and are able to retain profitability over time. However, to my knowledge, the impact of complexity has not been tested empirically. Complexity is here quantified (operationalized) and its impact on risk-adjusted excess profits is tested. In addition, the scope of technical trading systems studied in the past is limited by the number of trading systems tested and the number of foreign currencies used. This study attempts to expand on past findings by using genetic optimization techniques on the sampled 63 strategies on seven major currency pairs for a total of 441 optimization cases. Each optimization case had an average of 69,030 tests, resulting in 30,442,069 total tests. Findings show that although the majority of trading systems are profitable, a substantial portion of those profits can be explained as compensation for the bearing of risk, consistent with the efficient market hypothesis. However, when examining the effect of complexity, there is a clear link between complexity and risk-adjusted excess profits. This implies that technical trading system excess profits are the result of skill, rather than luck, in opposition to the efficient market perspective.

Technical Trading Systems in the Forex Market

2

I. INTRODUCTION The past history of stock prices cannot be used to predict the future in any meaningful way. Technical strategies are usually amusing, often comforting, but of no real value.

This quote in a bestselling finance book (over 1.5 million copies sold as of January 10, 2011) written by Princeton University economics professor and a leading proponent of the efficient market hypothesis, Burton Malkiel (2011, p. 161), is one notable motivation for this study. Contrary to Malkiel’s argument, empirical evidence shows that 59 percent of modern academic studies on technical analysis yielded positive results versus 21 percent negative and 20 percent mixed (Park and Irwin 2007). Yet despite this evidence, vocal critics like the above have resulted in a negative stigma against the practice of technical analysis amongst certain circles. Technical analysis can be defined as "the study of market action, primarily through the use of charts, for the purpose of forecasting future price trends" (Murphy 1999). With the majority of studies favoring the effectiveness of technical analysis, a layperson would likely conclude that academics would be the ones staunchly praising technical analysis with practitioners being behind the curve, but evidence suggests otherwise (Menkhoff and Taylor 2007). The bias against technical analysis is also occasionally found in popular finance textbooks such as Strong (2009). Academia’s skepticism of technical analysis is largely due to its conflict with the efficient market hypothesis (Fama 1970) that is the foundation of modern finance theory. The efficient market hypothesis—even in its weakest form—states that technical analysis should be ineffective. Practitioners, on the other hand, used technical analysis prior to the emergence of the efficient market hypothesis in the 1970’s, and have continued its use, relatively unmoved by critics such as Malkiel and Fama (Cheung and Chinn 2001).

Technical Trading Systems in the Forex Market

3

This divide between ―the classroom‖ and ―the street‖ has created a knowledge and perception gap and begs the question, if not in the classroom, then where are future practitioners to learn proper technical analysis techniques? This study seeks to bridge this gap via an expansive exploration of technical analysis in the foreign exchange (forex) market. Moving beyond the broad academic perception of technical analysis, many studies on technical analysis in the forex market test a limited number of technical trading systems, currencies, and time frames. For example, Okunev and White (2003) test four trading systems on eight forex currency pairs over a 20-year period. As can be expected, as more trading systems and currencies are tested and the time frame is extended, more time, money, and computing power is required. The current study is ambitious in that it analyzes 63 trading systems on seven forex currency pairs over a 35-year period. To my knowledge, there are no other empirical studies on technical analysis with this same broad scope. In addition, I introduce a yet untested qualifying factor, complexity. Most simply, complexity is defined as the utilization of sophisticated formulas, multiple technical indicators, independently defined exits, intermarket analysis, and/or dynamically self-adjusting technical trading rules within the trading system. While previous studies have stated that complexity has a positive correlation with market returns and improved resistance to the ever more efficient markets (Neely, Weller and Ulrich 2009), there is no empirical test of that theoretical argument in the literature. In summary, this study builds on previous studies of technical analysis in the foreign exchange market by testing (1) the profitability an extensive number of publicly available technical trading systems, and (2) the effect of complexity on strategy returns and robustness.

Technical Trading Systems in the Forex Market

4

II. THE PRACTICE OF TECHNICAL ANALYSIS Technical Analysis As stated previously, technical analysis can be defined as "the study of market action, primarily through the use of charts, for the purpose of forecasting future price trends" (Murphy 1999). Price charts are the most frequently used tool by the market technician, hence the outdated nickname "chartist". Today, practitioners of technical analysis are typically referred to as ―technicians.‖ Figure 1 presents a price chart with technical indicators. [Insert Figure 1 about here.] Though evidence of technical analysis usage appears in some form since the 17th century Dutch tulip market and the 18th century Japanese rice markets, modern technical analysis traces back to Wall Street Journal articles written at the end of the 19th century by Charles Dow (namesake of the Dow Jones Industrial Average), though Dow did not use the term technical analysis. According to textbooks on the subject, technical analysis is based on three basic tenets: (1) market action efficiently summarizes all microeconomic, macroeconomic and behavioral information; (2) prices move in trends; and (3) history repeats itself (Murphy 1999). As an extension of the belief that all available information is contained within price history, some technical purists do not perform fundamental or economic analyses because that information is already ―built in‖ to the price data. However, the majority of market technicians use a combination of technical and fundamental analysis and the more recently adopted flow analysis (Menkhoff and Taylor 2007). Technicians believe that price data forecasts fundamentals, and not the reverse (Murphy 1999), since there is a period of learning where some traders recognize and anticipate changes before others. Engel and West (2005) tested and validated this theoretical position.

Technical Trading Systems in the Forex Market

5

Other common beliefs of technical analysts include ―the trend is your friend‖, ―cut your losers short and let the winners ride,‖ and ―prices don’t lie‖ (Lefevre 1994). As suggested by the first, trends need to form and sustain themsemselves long enough to be identified, capitalized upon, and held until reversed in order to profit from them. This ties in to the second belief that profitable positions are held as long as possible, while unprofitable positions exit as soon as possible. This same concept was discussed nearly 200 years ago by economist and trader James Grant (1838). The third concept that ―prices don’t lie‖ acknowledges that some companies are not completely forthright with the public about their company’s financial position. This was most blatantly illustrated with the Enron and WorldCom frauds, though it is quite common practice for public companies to ―manage‖ their numbers and work within GAAP rules in order to show financial statements in the best possible light. In addition to financial statement manipulation, television pundits fill the airwaves with contradictory information and Wall Street analysts use tactics such as publicly promoting the positive aspects of a position so that their firm will have a market to sell into. Technicians feel that the best way to cut through this ―noise‖ and decipher the true direction of the position is through price trends because no matter what is publicly disclosed, if a financial vehicle (stock, bond, forex pair, etc.) is being bought or sold, that represents ―putting your money where your mouth is‖. [Please refer to Murphy (1999) and Pring (1991) for a more in depth coverage of technical analysis.] The Efficient Market Hypothesis and Academic Skepticism The Efficient Market Hypothesis is a theory popularized by Eugene Fama (1970) that operates on the belief that the markets have become efficient enough where the price one would pay at any given point in time is fair and accurate. This means that there are no inefficiencies in the market to exploit. Nothing is under or overpriced, rendering fundamental analysis useless,

Technical Trading Systems in the Forex Market

6

and there are no trends or historical patterns to exploit, rendering technical analysis useless. The core belief of the Efficient Market Hypothesis is that the return one will receive for the purchase of a financial vehicle such as stocks or commodities is equal to the risk one bears while holding that vehicle. Low risk securities will earn a relatively low return and conversely high risk securities garner high returns. After its emergence in the 1970s, the efficient market hypothesis (EMH) quickly gained in popularity until it became the dominant paradigm and the foundation of Modern Portfolio Theory in the 1980s. The subsequent two decades have seen the decline of the EMH and the emergence of behavioral finance, a field of study in finance organized under the belief that the market is an aggregate of human actions replete with inefficient and imperfect decisions. Efficient markets should not have bubbles or crashes, so the dot-com crash and 2008 financial crisis exposed holes in the theory and practitioners sought elsewhere for theoretical arguments that better explain modern markets. One alternative perspective, the Adaptive Market Hypothesis (Lo 2004; Lo 2005; Neely, Weller, and Ulrich 2005) posits that profit opportunities from inefficiencies exist in financial markets, but are eroded away as the knowledge of the efficiency spreads throughout the public and the opportunity is capitalized upon. As opposed to its mutually exclusive relationship with EMH, technical analysis dovetails nicely with AMH. With EMH falling out of favor over the last twenty years, technical analysis gained. Categories of Technical Analysis Technical analysis can be classified as qualitative and quantitative. Qualitative technical analysis involves discovering visual patterns in a chart of historic data. Patterns range from the popular ―head and shoulders‖ pattern (Osler and Chang 1995) to the lesser known ―island reversal‖ pattern. See Figure 2 for an illustration of a head and shoulders pattern.

Technical Trading Systems in the Forex Market

7

[Insert Figure 2 about here.] Qualitative technical analysis is subjective in nature and thus, can be difficult to test. The efficacy of chart patterns are not included in this study, but there others have attempted to quantify and analysis this method (e.g., Chang and Osler 1995, 1999; Lo, Mamaysky, and Wang 2000). Despite the difficulty in recreating subjective human pattern recognition abilities, results from prior endeavors indicate that some patterns do have predictive power. [Please refer to Bulkowski (2005) for a thorough chart pattern reference book.] Quantitative technical analysis performs mathematical and statistical calculations on historic data, typically price and volume data, in an attempt to forecast future prices. Technicians use tools called ―technical indicators‖ that are visual representations of the quantitative calculations on a chart. For example, the most commonly used technical indicator is likely the simple moving average (SMA). The simple moving average is used to smooth the ―noise‖ from price fluctuations in an attempt to distinguish a trend (see Figure 3). [Insert Figure 3 about here.] Technical indicators are rarely used in isolation by practitioners, but are merely a set of tools that can be combined together to form a trading system. This is described in detail later. III. TECHNICAL INDICATORS, TRADING SYSTEMS, BACKTESTING, AND OPTIMIZATION Technical Indicators Technical indicators are important tools used by technical analysts. A technical indicator can be defined as a numerical and/or visual representation of current and historical price, volume and/or market composition data in order to isolate trends, turning points or optimal entry/exit points. They range from the very simple (moving averages) to the more complex (Commodity Channel Index). While moving averages have been covered in depth, notably in Brock,

Technical Trading Systems in the Forex Market

8

Lakonishok, and LeBaron's seminal paper (1992), other popular indicators used widely in the industry have been explored by the academic community less frequently. For example, practitioners frequently use the moving average convergence-divergence indicator (MACD), relative strength index (RSI), Bollinger Bands, and Stochastic indicators, though few have tested them as part of a trading system. Bollinger Bands are illustrated in Figure 4. [Insert Figure 4 about here.] Technical indicators typically have inputs in order to customize the indicator to the underlying financial vehicle. For example, the Bollinger Bands indicator allows the user to customize the length of time used (e.g., 30 days) and the standard deviations of the upper and lower bands. The inputs can be arbitrarily chosen or they can be ―optimized‖ by cycling through a range of inputs to determine what would have been most effective over historic price data. [Optimization is explained in more detail in a later section.] Currently, the most extensive amount of information on technical indicators is outside the academic community (e.g., Achelis 2001; Elder 1993; Katz and McCormick 2000; Kaufman 2005; Murphy 1991, 1999; Pring 1991; Wilder 1978). Indicators are very popular in technical analysis because they consolidate decisions into a simple Boolean decision-making process, and eliminate subjectivity as well as natural human emotions (e.g., fear, greed, anger, frustration). An example of a technical indicator used here is the Relative Strength Index or RSI (Wilder 1978) that is mathematically represented as: ( (

) )

where n is the number of trading days, U is the change on all ―up‖ days (days where the close is higher than the open), D is the change on all ―down‖ days (days where the close is lower than the open), and EMA is an exponential moving average. The RSI indicator is normalized between 0

Technical Trading Systems in the Forex Market

9

and 100, with zero indicating weakness (closing price is near recent lows) and 100 indicating strength (closing price is near recent highs). It is typically used as a mean reversion indicator, which designates a reversal of a trend. Crossing the 70 line is a sell trigger and crossing the 30 line is a buy trigger. If one only had to follow the buy and sell signals on one indicator to earn a profit in the markets, there would be no need for this study — all traders would currently be using that indicator. Unfortunately, there is no single indicator that will predict profitable trades on a perfectly consistent basis. Traders instead use combinations of trading indicators, rules, filters, money management, entries, and exits in order to create a trading system (also referred to as a trading strategy), described in the next section. Beginners often look for a magic bullet-a single indicator for making money. If they get lucky for a while, they feel as if they discovered the royal road to profits. When the magic dies, amateurs give back their profits with interest and go looking for another magic tool. The markets are too complex to be analyzed by a single indicator. (Elder 1993) Although it is rare for practitioners to use individual indicators in isolation for trading decisions, there are some academic studies that assess the efficacy of technical analysis based on this flawed assumption (e.g., Dempster and Jones 2000). To their credit, Dempster and Jones (2000) acknowledge this flaw at the end of their paper. The majority of the trading systems tested in this study utilize multiple indicators, rules, and filters. However, for the sake of understanding the impact of complexity with regard to single indicator trading systems (which are relatively simple), some single indicator trading systems are tested here as well. Trading Systems A trading system is the culmination of all weapons in the technical analyst's arsenal. Trading systems ideally begin with a theory based on the technician's observations of market activity — a pattern or trend that has played out consistently over time or appears to be developing in the near

Technical Trading Systems in the Forex Market

10

future that the technician believes can be capitalized upon. The technician decides which tools would most accurately identify and capture the essence of that theory. Robust trading systems typically incorporate trading rules, filters, money management, entries, and exits. Trading Rules. Trading rules explicitly state when to enter and when to exit the position. The rules may utilize one or more technical indicators (e.g., the MACD indicator rises from below to above the zero line), price action (e.g., the closing price is higher than previous day’s closing price for 3 consecutive days), fundamental data (e.g., US GDP increasing quarter over quarter), or any other quantifiable metric. Filters. In addition to rules, some trading strategies also employ filters in order to limit the number of trades the system creates. Filters are considered a subset of trading rules because they also involve rules based on technical indicators. A definition of a filter is that buy/sell signals created by the trading system rules are ignored unless the filter criterion is also met. Since no indicator or system is accurate every time, filters are employed in the attempt to capture only the best opportunities and avoid "whipsaw", the unfortunate situation induced by a rapid succession of buy and sell signals in non-trending markets, that leads to a large number of unprofitable trades. Filters are also created either with technical indicators or non-indicator data. ―Ignore the buy signal generated by a trading rule if the ADX indicator (shows strength of a trend) is below 10‖ is an example of a filter. Money Management. Another important factor in a trading system, perhaps the most important factor, is money management. Money management is a general term that covers topics such as the amount of capital to be used in each trade, the maximum allowable loss per trade, how and when to close profitable trades, the number of open trades allowed to be open at any time, etc. A basic concept in trading—letting winners run and cutting losers short—falls under the category of money management.

Technical Trading Systems in the Forex Market

11

Some traders believe that money management is the most important ingredient in a trading program, even more crucial than the trading approach itself. I’m not sure I’d go that far, but I don’t think it’s possible to survive for long without it. (Murphy 1999) Entries. All trading systems must have entries and exits. Entries, as the name suggests, are the point when the trading system enters the market either by going long (buying) or going short (selling short) the investment vehicle. Entries occur when predetermined trading rules, and possibly filters, defined in the trading system are triggered. Exits. Exits can be broken into three categories: reversals, targets, and stop losses. Exits are an important part of a trading system’s money management and thus, a very important part of the trading system. Reversal stops, the simplest of the three, take the opposite side of the current trade, occurring when an entry signal is triggered in the opposite direction. Targets are exits performed when the trade has reached an acceptable level of profit or a predetermined price or percentage change from the entry point. Stop losses are safeguard exits put in place to prevent exorbitant losses. They can be fixed, trailing, or dynamic. Fixed stop losses generate an exit signal when the trade has either lost a predetermined dollar amount, or the price has moved adversely by a predetermined number or percentage. Trailing stop losses move in tandem with the currency, trailing below (above for short trades) for each incrementally higher (lower) movement in price. With any movement against the direction of the trade, the trailing stop stays fixed in place. Should the price move far enough against the trade, the stop loss will be triggered, the trade will be exited, and the trading system position will now be ―flat.‖ Dynamic stop losses are the most complex form of stop losses and are a blend of technical indicators and stop losses. The similarities to technical indicators lie in that they incorporate mathematical or statistical calculations and additional factors (such as volatility) besides price highs and lows within the stop loss formula. In fact,

Technical Trading Systems in the Forex Market

12

some technical indicators are designed to be used as stop losses, and include the Parabolic Stop and Reverse (Wilder 1978). Trading Systems: An Example. An example of a relatively simple trading system used in this study is the channel breakout system. The entry rule is: go long (short) when the closing price crosses above (below) the maximum (minimum) of the closing prices over the last x days. No additional indicators or filters are used, and exits are dynamic and executed by the Parabolic Stop and Reverse (SAR) indicator, an intelligent trailing stop. There are three inputs: (1) number of lookback days for the channel highs/lows, (2) the Parabolic SAR acceleration factor, and (3) the Parabolic SAR acceleration limit. Mathematically, the entry rule is expressed as (

)

(

)

where C is closing price, t is today, n is the number of lookback days given as an input. The channel breakout system creates a ―channel‖ around the price history over n days, the idea being that a breakout to the upside (downside) is a strong directional movement and the start of a new trend. Backtesting Backtesting is the process of applying a trading system to actual historical data to evaluate how well the system would have performed. Before the proliferation of advanced computing software, backtesting was done manually. This was an immensely time consuming process and even when it was finally completed, it was prone to errors. There are also subtle nuances that may be overlooked: e.g., what buy or sell price the strategy should get as opposed to what it would actually get given live market conditions. Computing software programs have vastly improved over time, thus reducing human error and unrealistic market expectation problems.

Technical Trading Systems in the Forex Market

13

Optimization Optimization is the process of cycling through a vast number of possible trading system inputs and backtesting each combination on historic data in order to determine the optimal inputs. As stated previously, both technical indicators and trading systems—which utilize technical indicators—have inputs that can be customized to the users preferences and to the financial vehicle (stock, forex pair, etc.). To optimize, the user defines the input starting point, ending point, and increment value. For example, if a trading system has two inputs (indicator 1-number of days, indicator 2-number of days) and sets the minimum at five, maximum at 400, and increment of five for each of the two inputs, that would result in 80 for each input [400/5]. Because there are two inputs, the number of tests are multiplicative and the total backtests for this example would be 6,400 [80 x 80]. This process is extremely computer intensive and time-demanding, depending on the number of tests and the formulas built into the trading system. Brute Strength Optimization. ―Brute strength‖ optimization, also referred to as ―exhaustive‖ optimization, is the process of backtesting the full spectrum of tests that results from the input range. Using the previous example, the full 6,400 backtests would be executed. Genetic Optimization. Genetic optimization is a technique developed to reduce the computing time required for optimizations. It mimics Darwinian evolution by defining chromosomes (input parameters), establishing a fitness metric (e.g., net profit), and performing backtests where weak input parameters (low net profit) ―die out‖ and strong input parameters (high net profit) live on to create future generations of similar but slightly different inputs. This repeats until the strongest set of input parameters remain. The TradeStation platform, used exclusively for optimization in this study, describes genetic optimization in general terms as following these steps:

Technical Trading Systems in the Forex Market

14

1. An initial population of chromosomes (combination of strategy parameter values) is randomly chosen. 2. The fitness criterion is used to identify the best specimens. 3. Weakest chromosomes are discarded. 4. Mutation and crossover are used to find new chromosomes to replace the ―weak‖ ones. 5. The replacement chromosomes are put in the population, defining the next generation. 6. Return to step 2 for fitness evaluation until the last generation is concluded. 7. Find the chromosome with the best fitness in the population. 8. The final chromosome contains the optimized parameter values. Genetic optimization significantly reduces the number of backtests required in an optimization. Using the example above with TradeStation’s suggested genetic optimization settings, backtests are reduced by 80 percent from 6,400 to 1,280 with results the same or very close to that of brute force optimization. As a rule, genetic optimization is used in this study unless the total number of tests is too few (under 1,000) that brute force optimization is rendered acceptable. Genetic programming is an increasingly popular technique in technical analysis studies not only for optimization purposes, but also to determine trading rules (Allen and Karjalainen 1995; Dempster and Jones 2000; Neely, Weller, and Dittmar 1997). Controlling for Data Snooping. A frequent problem of early studies of technical analysis was that input parameters (e.g., number of days for a moving average) were selected either arbitrarily or based on common usage (Poole 1967). There is no reason to believe that arbitrary inputs would ever be successful except through luck and therefore, they are poor predictors of the efficacy of technical analysis. As for testing commonly used input parameters, they are popular because they were successful in the past (the time period being tested), and may not have good predictive power.

Technical Trading Systems in the Forex Market

15

Optimization solves the problem of what input parameters to use by cycling through a large number of possible inputs to determine the best one, however it introduces another problem called ―curve fitting‖. Curve fitting occurs when the inputs chosen are picture perfect for the sample time period being tested, yet perform poorly in a future time period(s). In order to control for these problems, a two-step process is taken. First, the available data is divided into two sections: in-sample data and out-of-sample data. Optimization is performed on the in-sample data in order to isolate potential input parameters. Those input parameters are then backtested on the non-optimized out-of-sample data to see if the positive results from optimization are real or the result of curve fitting. IV. BACKGROUND AND HYPOTHESES Technical Analysis in the Stock Market Early studies on the effectiveness of technical analysis focus on the stock market. They are notable both in that most find technical analysis to be ineffective, and also that many are performed by original proponents of the Efficient Market Hypothesis (EMH). For example, Fama and Blume (1966) report that using filter rules on US stocks is unprofitable when taking transaction costs into account. Fama (1970) then declared technical analysis to be a futile undertaking, at which time he introduced the EMH based on his doctoral thesis. A frequently cited study on the usefulness of technical analysis in the stock market (Brock, Lakonishok, and LeBaron 1992) gained notoriety because the findings conflict with Fama (1970). The authors illustrate that the use of simple moving average crossovers, a basic technical analysis technique, can yield excess returns in the stock market that cannot be accounted for by null ―random walk‖ models such as ARMA or GARCH. Note that the focus of this paper is on the foreign exchange market and thus, discussion on the stock market is constrained. [Please refer to Park and Irwin (2007) for a comprehensive review of the technical analysis literature as a

Technical Trading Systems in the Forex Market

16

whole, and Menkhoff and Taylor (2007) for an equally good review of the literature specifically within the forex market.] The Use of Technical Analysis in the Foreign Exchange (forex) Market Ever since floating exchange rates were created in the early 1970’s to relieve the untenable pressure to peg the US dollar to gold prices, researchers have suspected that technical analysis was used frequently by practitioners in the forex market. However, this belief was not systematically tested until Allen and Taylor (1990, 1992) surveyed chief forex dealers in London. The results were striking as nearly 90 percent of sampled dealers reported placing some importance on technical analysis. In addition, technical analysis was overwhelmingly preferred on shorter time frames (intraday), whereas fundamental analysis preferred on longer time frames (over one year). More recently, similar studies were performed for forex dealers in Austria (Gehrig and Menkhoff 2004; Oberlechner 2001), Germany (Gehrig and Menkhoff 2004; Menkhoff 1997; Oberlechner 2001), Hong Kong (Cheung and Wong 2000; Lui and Mole 1995), Singapore (Cheung and Wong 2000), Switzerland (Oberlechner 2001), Tokyo (Cheung and Wong 2000), the United Kingdom (Cheung, Chinn, and Marsh 2004; Oberlechner 2001), and the US (Cheung and Chinn 2001). Though the number of responses and response rates are quite different for each of these studies, results are notably similar. Findings show that (1) practitioners who use some type of technical analysis range from 90 percent to 100 percent, (2) technical analysis is more important for short time frames, and (3) fundamental analysis is more important for longer time frames. Based on these independent findings, it is safe to say that technical analysis is a widely used and integral part of the foreign exchange market.

Technical Trading Systems in the Forex Market

17

Profitability of Technical Analysis in the Foreign Exchange (forex) Market While it is well-established that technical analysis is an important part of the foreign exchange market, the question of profitability shows mixed results. Early studies on simple moving average and filter rules in the foreign exchange market find sizeable net profits (Cornell and Dietrich 1978; Dooley and Shafer 1984; Logue and Sweeney 1977; Logue Sweeney and Willett 1978; Poole 1967; Sweeney 1986). However, with the exception of Dooley and Shafer (1984) and Sweeney (1986), the studies have many shortcomings by today’s standards. For example, commissions, slippage, and interest rate carry costs are not included. The authors also neglect to perform statistical tests to determine if the profitability occurred by chance, and they fail to test if the profits are compensation for the bearing of risk—which is an implication of the EMH. Because Dooley and Shafer (1984) and Sweeney (1986) attempt to address these issues, they are the most cited of these early studies. Interestingly, modern studies that use improved methodologies and analytical techniques support many findings of these early flawed studies (LeBaron 1999; Menkhoff and Schlumberger 1995; Neely 1997; Pilbeam 1995; Saacke 2002; Surajaras and Sweeney 1992). On balance, the majority of studies find technical analysis to be profitable, though recent studies suggest that those profits have been eroded over time to close to zero since the 1990s. More complex forms of technical analysis can still find modest profits (Neely, Weller and Ulrich 2009). Accounting for Risk Perhaps the biggest challenge faced in technical analysis research is determining the ideal method of accounting for risk. As stated previously, proponents of the EMH do not state that technical analysis rules must be unprofitable, only that any excess profit is compensation for the bearing of risk. Cornell and Dietrich (1978) were the first to address this by using an international capital asset pricing model (ICAPM). Unfortunately, the study is flawed since the

Technical Trading Systems in the Forex Market

18

beta is calculated on the foreign currencies themselves and not on the trading positions taken on the foreign currencies. Sweeney (1986) is an oft-cited pioneer in measuring risk compensation who compares trading rules on currencies versus buy and hold currency strategies. He reports significant profit opportunities that are not explained by the bearing of risk. This result is questioned due to the fact that expecting a positive return on a buy and hold currency strategy implies that one currency has a positive outlook while the other has a negative outlook (cf. Cornell and Dietrich 1978). In addition, the assumption that the forex risk premium is constant and does not change over time is not realistic. Taylor (1992) uses a first-order autoregressive process to create a timevarying risk premium calculation and does not find that returns are due to risk, though it is possible that the model does not calculate risk premium perfectly. In contrast, Kho (1996) finds that a good portion of the excess returns from technical trading rules is a result of the bearing of risk when excess returns are related to the world stock portfolio (MSCI) using ICAPM and GARCH-m models to calculate expected risks. Another method commonly used by modern researchers to account for risk is the Sharpe Ratio (Sharpe 1966) that relates the net returns to the standard deviation of those returns. Mathematically, this is shown as

where R is the asset return, Rf is the return on a benchmark asset (frequently the risk free rate of return), and

is the standard deviation of the excess of the asset return. The Sharpe ratio on the

trading rule returns is then compared to the Sharpe ratio on a broad portfolio index like the S&P 500 or MSCI (Neely 1997; Chang and Osler 1999; Saacke 2002). These studies show that technical trading rule risk-adjusted returns are higher than that of the benchmark. It should be

Technical Trading Systems in the Forex Market

19

noted that the Sharpe ratio, like other risk measurement techniques is imperfect since it requires a long period of time (22 years for significance at the five percent level) and it does not measure the perception of risk, which is inherently difficult to quantify. Alternatively, Menkhoff and Schlumberger (1995) stress the monthly difference in trading rule profitability to buy and hold profitability to determine practitioner myopic loss aversion posture. Due to the instability of the monthly returns, their data show that excess profits cease to be significant at the 5% level. In this study, I expand on the extant literature and utilize the Sharpe ratio of trading rule returns in relation to the Sharpe ratio of buy and hold returns on the US stock market as represented by the S&P 500 index to determine if the excess returns are in the form of risk premia. H1: Technical trading systems have out-of-sample excess profits that cannot be accounted for by the bearing of risk. The Impact of Complexity In addition to the main profit effects examined in H1, I also test a potentially important qualifying factor, complexity. While previous studies have stated that more complex forms of technical analysis outperform less complex forms and that their returns are more stable over time (Menkhoff and Taylor 2007; Neely, Weller and Ulrich 2009), there is no empirical test of that theoretical argument in the literature. Furthermore, a clear definition of complexity with regard to technical trading systems is non-existent. Most simply, complexity in technical trading systems is here defined as the utilization of sophisticated formulas, multiple technical indicators, independently defined exits, intermarket analysis, and/or dynamically self-adjusting technical trading rules within the trading system. I test the theoretical relationship between complexity and profit stability by operationalizing complexity and comparing the average Sharpe ratio across complexity levels.

Technical Trading Systems in the Forex Market

20

H2: More complex technical trading systems yield higher returns than less complex systems. V. METHODOLOGY General Information and Procedural Steps The method used to determine the efficacy of trading systems is to program and optimize/backtest them using the Tradestation software platform. The process involves the following steps: 1. Select the target market [forex], target vehicles [7 major currency pairs], and target time frame [daily]. 2. Write programs in computer code that accurately reflect the technical trading systems. 3. Bifurcate the available test data. One half are used to generate optimal inputs for the technical trading system (in-sample data). The other half are used to test the trading system with optimized inputs in a non-optimized environment (out-of-sample data). This is done to prevent data snooping. It is recommended that the optimization be performed on the more recent block of data so that it is better suited to handle future market conditions. 4. Run optimizations for each trading system [63] on each currency pair [7] for a total of 441 optimization cases, with a minimum of 5,000 tests per optimization. This results in at least 2,205,000 tests that must be filtered down to the top 441. The minimum number of backtests was 499 and the maximum was 357,604, with a mean of 69,030 backtests. 5. Organize the results and apply a scoring metric to all tests. 6. Select the top performing tests from each of the 441 optimizations. 7. Perform out-of-sample backtest using some of the top optimized inputs from the previous step. 8. Analyze all out-of sample results. Forex Market The focus here is on the forex market. Though technical analysis is used in all financial markets, it is most prevalent in the foreign exchange market. Studies report that between 90 and 100 percent of forex market traders use technical analysis in some fashion (Gehrig and Menkhoff 2004; Menkhoff 1997; Taylor and Allen 1992). In a later US survey that asked forex respondents

Technical Trading Systems in the Forex Market

21

what best describes their trading style, 29.53% categorized themselves as technical traders, the largest percent of the four available categories (Cheung and Chinn 2001). The forex market was also chosen based on the popular idea that it forms trends more often than other markets such as the stock market (Clements 2010). There are additional benefits to the forex market over other markets: e.g., it has a manageable number of currency pairs to work with (versus the massive universe of stocks) and continuous price data (versus futures data that is broken up every few months by contract expirations and must be blended together). Currency Pairs The currency pairs used in this study are the most widely traded, and therefore, the most liquid currency pairs. Liquidity is crucial in the forex market because it narrows the loss from the bid/ask spread. If one were to immediately buy and sell a currency pair, it would result in a loss equal to the size of the spread in addition to any commissions involved. This is commonly referred to as ―slippage.‖ Therefore, more liquid currency pairs with narrow spreads are preferred. The six most liquid currency pairs are:      

EUR/USD - Euro/US Dollar GBP/USD - Great Britain Pound/US Dollar USD/JPY - US Dollar/Japanese Yen USD/CHF - Us Dollar/Swiss Franc USD/CAD - US Dollar/Canadian Dollar AUD/USD - Australian Dollar/US Dollar

In addition to the most liquid currency pairs, one additional currency pair was included because it has gained a wide following amongst high frequency currency traders due to it having the highest level of volatility. The higher the volatility of a currency pair, the more likely that trading opportunities will appear over a given time frame. This currency pair is: 

GBP/JPY - Great Britain Pound/Japanese Yen

Technical Trading Systems in the Forex Market

22

Backtesting and Optimization Software The Tradestation platform is recognized as the best of the best when it comes to backtesting and rule based trading, winning numerous awards from well respected practitioner publications. Awards include:        

Barron’s – Best Online Broker (2011) Stocks & Commodities – Best Institutional Platform (9 years in a row) Stocks & Commodities – Best Professional Platform (9 years in a row) Stocks & Commodities – Best Online Analytical Platform (8 years including 2011) Stocks & Commodities – Best Futures Trading System (7 years in a row) Stocks & Commodities – Best Stock Trading System (7 years in a row) Stocks & Commodities – Best Real Time Data (2009, 2011) Brokerage Star Awards – 1st Place (2010)

For this study, all indicators, trading systems, optimization, and backtests are programmed and executed using Tradestation 9.0 (update 8585), the most advanced version when the data were analyzed. Data All forex price data are provided by TradeStation and aggregated on a daily basis. Data ranges used in this study for AUD/USD, GBP/USD, USD/CAD, USD/CHF and USD/JPY include a 35.5-year time frame (1/1/1975 to 6/30/2010). The data ranges for EUR/USD and GBP/JPY are from 1/1/1999 to 6/30/2010 (11.5 years). The data was divided in half for in-sample and out-of-sample testing. In-sample data ranges for AUD/USD, GBP/USD, USD/CAD, USD/CHF and USD/JPY are from 1/1/1993 to 6/30/2010 (17.5 years). In-sample data ranges for EUR/USD and GBP/JPY are from 7/1/2004 to 6/30/2010 (6 years). Out-of-sample data ranges for AUD/USD, GBP/USD, USD/CAD, USD/CHF and USD/JPY are from 1/1/1975 to 12/31/1992 (18 years). Out-of-sample data ranges for EUR/USD and GBP/JPY is 1/1/1999 to 6/30/2004 (5.5 years). All trades assumed one position of 100,000 forex lots in a given direction, long or short, or no position (flat).

Technical Trading Systems in the Forex Market

23

Commissions and Slippage Commission costs and slippage are based on TradeStation commission rates and the bid/ask spread (slippage) tested on 2/15/2011. To be conservative, actual commission and slippage rates are slightly increased. For example, actual commission costs for AUD/USD was $2.50 per trade side, but $3.00 was used. Commission costs are estimated at:       

AUD/USD --------------------------------------------------------------------$3.00 per trade EUR/USD --------------------------------------------------------------------$3.25 per trade GBP/JPY ---------------------------------------------------------------------$4.25 per trade GBP/USD --------------------------------------------------------------------$4.25 per trade USD/CAD --------------------------------------------------------------------$3.00 per trade USD/CHF --------------------------------------------------------------------$3.00 per trade USD/JPY ---------------------------------------------------------------------$3.00 per trade

Slippage costs are estimated at:       

AUD/USD --------------------------------------------------------------------$20.00 per trade EUR/USD --------------------------------------------------------------------$20.00 per trade GBP/JPY ---------------------------------------------------------------------$60.00 per trade GBP/USD --------------------------------------------------------------------$20.00 per trade USD/CAD --------------------------------------------------------------------$30.00 per trade USD/CHF --------------------------------------------------------------------$20.00 per trade USD/JPY ---------------------------------------------------------------------$20.00 per trade

Trading Systems Tested in this Study I test a wide variety of 63 trading systems that are available to the open public, located from a variety of sources (Ammermann 2010; Bollinger 2002; Elder 1993; Katz and McCormick 2000; Murphy 1999; Pruitt and Hill 2003), including some that are self-created. The names and sources of the trading systems are listed in Table 1. [Note that the strategy numbering system is not strictly sequential due to changes from the original 64. Strategies 7, 8 and 9 were removed and strategies 10 and 11 were subdivided into A and B. Original 64 strategies – 3 + 2 = 63.] For more details on the trading system rules, technical indicators, and programming code for each system, please contact the author directly.

Technical Trading Systems in the Forex Market

24

[Insert Table 1 about here.] Trading System Complexity As a clear definition of trading system complexity is neglected in the scientific literature, I created an original operationalization that is based on concepts found in various technical analysis textbooks (e.g., Kaufman 2005; Murphy 1999; Pring 1991; Pruitt and Hill 2003). Complexity (defined above) is here operationalized via a formative scale created by adding one point for each of the following complex tactics:      

Entry uses more than 1 indicator type or calculation Entry is dynamic (changes based on volatility) System has an independently defined exit Exits are dynamic System uses more than 1 time frame System changes modes based on market condition.

The complexity score begins with a minimum score of one and cumulative points are added if any of the previous six tactics are used. Therefore, all trading systems have a score ranging from one to a possible maximum of seven. Applying the scoring metric to each of the 63 trading systems yields the following distribution:       

Complexity level 1 -------------------------------------------------------------- 10 (15.9%) Complexity level 2 -------------------------------------------------------------- 23 (36.5%) Complexity level 3 -------------------------------------------------------------- 11 (17.5%) Complexity level 4 ---------------------------------------------------------------- 7 (11.1%) Complexity level 5 -------------------------------------------------------------- 11 (17.5%) Complexity level 6 ----------------------------------------------------------------- 1 (1.6%) Complexity level 7 ----------------------------------------------------------------- 0 (0.0%)

Scoring Metric The optimization process generated over 5,000 sets of parameter inputs for each of the 441 cases (63 trading systems x 7 currency pairs). Each set of parameter inputs has associated (unique) in-sample profit metrics (e.g., net profit, maximum drawdown, number of trades, percent of trades that were profitable). In order to select the parameter set that would perform the

Technical Trading Systems in the Forex Market

25

best in the non-optimized out-of-sample data, the parameter sets must be rank ordered. The ranking method is determined by the person performing the optimization and can vary significantly, although net profit or Sharpe ratio are used most frequently. Unfortunately, Sharpe ratio is not available in the TradeStation output data and thus, an alternative was required. I chose not to use net profit in isolation due to inherent flaws in the metric. First, net profit does not take the volatility of the returns into account. In addition, net profit only looks at the result as of the arbitrarily chosen ending date of the test, and it is possible that all days before and after were lackluster, but experienced a profit spike on the final day of the optimization. In order to improve the chances of success for out-of-sample testing, I created a scoring metric that combines multiple profitability measures. The scoring metric utilizes four performance measurements: 

Net Profit [Gross profit – Gross Loss]



Average trade [net profit / total number of trades]



Return on account [net profit / maximum drawdown]



Winning days [average days in winning trade * number of winning trades]

The four metrics are ranked as a percentage of the maximum of the parameter sets (N=5,000) generated by the optimization process, and then summed together. Since there are four performance measurements, the maximum possible score for a parameter set is 400%, indicating that the parameter set matched the maximum in all four categories. Furthermore, any parameter set that resulted in 2 or fewer trades was excluded, as there was insufficient data to ensure that the results would hold up in the out-of-sample data set. All parameter sets were then sorted by the scoring metric, and the highest score was selected. The scoring metric is advantageous because it rewards high net profit, fewer trades (though a minimum of 3 is required), low

Technical Trading Systems in the Forex Market

26

volatility via return on account, and a higher percentage of time ―in the market‖ versus being ―flat‖ via winning days. VI. RESULTS Risk Adjustment This study follows the risk adjustment methodology used by Neely (1997), Chang and Osler (1999), LeBaron (2000) and Saacke (2002). The basic procedure is: (1) to prevent data snooping and curve fitting, the available price data is split in half, (2) optimization is performed on insample data, (3) a scoring metric is applied to the optimized parameter sets, (4) the top performing set is selected, then (5) applied to the out-of-sample portion of the data. The key riskadjusted return metric, the Sharpe ratio, is used to determine the success of the out-of-sample results of the technical trade returns. That figure is then compared to the Sharpe ratio on a buy and hold strategy of the S&P 500 US stock market index over the same time period. Excess Profit: H1 Recall that H1 predicts that technical trading systems have out-of-sample excess profits that cannot be accounted for by the bearing of risk. As expected, the optimal trading system parameters for the in-sample data yield significant net profits for all 441 cases (63 trading systems x 7 currencies). The real test is to determine excess profits on out-of-sample data and to compare the risk adjusted returns to that of the S&P 500 index over the same time period. Approximately two-thirds (=67.1%) of the cases (285 of the 425 (441 – 16 with no trades)) are profitable. Seventy-six of the 425 cases (=17.9%) had a Sharpe ratio that outperformed the benchmark, with an average Sharpe ratio below zero at -0.02186. Table 2 presents the out-ofsample results and comparisons to the S&P 500 Sharpe ratio for the total sample. [Insert Table 2 about here.]

Technical Trading Systems in the Forex Market

27

For a cross-section look at the data, out-of-sample results aggregated on the currency level are displayed in Table 3. [Insert Table 3 about here.] The Impact of Complexity: H2 Data also show support for H2: i.e., more complex technical trading systems yield higher returns than less complex systems. Applying the scoring metric, each of the 441 cases were then aggregated and averaged via the Sharpe ratio for each level of complexity. Figure 5 displays the average Shape ratio by complexity level. [Insert Figure 5 about here.] The overall regression model with the Sharp Ratio as the dependent variable and complexity as the independent variable is significant (F(1,439)=6.81, p=.009; R2=.015). The individual beta coefficient for complexity replicates that result (b=.12, t=2.61, p=.009). As presented above, only one percent of the cases are at the highest complexity levels. When those cases are excluded, the data are relatively unaffected, only slightly enhanced: (F(1,432)=7.49, p=.006; R2=.017; b=.13). Isolating the more robust trading systems (complexity level 4 and above) yields much stronger results. Eighty-nine out of 124 cases (=71.8%) are profitable, 30 out of 124 (=24.2%) have a Sharpe ratio that beats the benchmark, and the average Sharpe ratio is positive at .00226. Examination of simple trading systems (complexity 3 and below) shows that 196 out of 301 (=65.1%) are profitable, 46 out of 301 (=15.3%) have a Sharpe ratio that outperforms the benchmark, and the average Sharpe rate is below zero at -0.03179. Table 4 displays various performance metrics by complexity level. [Insert Table 4 about here.]

Technical Trading Systems in the Forex Market

28

VII. DISCUSSION AND CONCLUSIONS This study builds on previous studies of technical analysis in the foreign exchange market by testing (1) the profitability an extensive number of publicly available technical trading systems over a 35-year period, and (2) the effect of complexity on strategy returns and robustness. The profitability of the trading systems is mixed with 67.1% of the trading systems showing positive net income, and 17.9% with risk-adjusted excess returns (as measured by the Sharpe ratio) outperforming the risk-adjusted benchmark returns over the same time period. It is not surprising that some of the trading systems offer sub-par performance as a wide variety of trading strategies are used in this study, including those that are known to be relatively ―simple‖ in order to determine the impact of complexity. However, results are similar to recent evidence (Neely, Weller, and Ulrich 2009) that reports Sharpe ratios between -.35 and .65. The Sharpe ratio range for this study is lower, ranging from -0.78 to .34. While the relatively high profitability percentage (including simple strategies) points to the effectiveness of technical analysis, the lower risk-adjusted excess returns percentage implies that a good portion, but not all of the excess returns can be explained as compensation for the bearing of risk. Looking at average returns across currency levels provides a unique cross-section view of the results. In a thorough review of technical analysis literature in the forex market, Menkhoff and Taylor (2007) argue that technical analysis tends to be more profitable with volatile currencies. Extending this theoretical perspective to the current study, GBPJPY—the most volatile of the currencies—was expected to provide the most opportunity for profit. However, GBPJPY shows the lowest profitability percentage (12.7%) and the lowest average Sharpe ratio (-0.16). This result is surprising as that currency was particularly selected because its’ high volatility makes it popular amongst practitioners. Conversely, USDJPY is the most profitable (95.2%) and has the highest average Sharpe ratio (.077) of the seven currencies tested. These results suggest that

Technical Trading Systems in the Forex Market

29

strongly trending currencies such as USDJPY vastly outperform volatile currencies such as GBPJPY. This also supports the oft-used technical analysis phrase, ―the trend is your friend.‖ Trends reverse too frequently for highly volatile currencies for trading opportunities to develop, to be observed, and to then be capitalized on. The analysis of profitability becomes most interesting when the risk-adjusted profit metrics are examined in relation to complexity. Excluding complexity level six (which was limited to only one trading system of the 63), incrementally moving upwards from level one shows a consistent increase in Sharpe ratios, though there is a slight decrease from complexity level four to five. Regression analysis shows that complexity is a statistically significant contributor to riskadjusted excess profits (p

Suggest Documents