CHAPTER 1
On Trading Strategies
Trading strategies have been around for as long as people have traded organized markets. Whereas some might quarrel with me in this usage I will state unequivocally that by the terms automated trading strategy and its short form automated strategy, I mean all of the following terms: trading systems, mechanical trading systems, trading model, and algorithmic trading.
In the final analysis, I believe that any successful trader, discretionary or automated, does trade with a systematic trading strategy. In the end, as I think you will see if you work through this book, it is difficult to generate long-term and above-average trading or investment returns without a systematic approach.
Interest in technical methods and trading strategies tends to wax and wane with interest in the markets themselves. Interest in the markets tends to wax and wane with the dynamism of the markets and with the attendant opportunity, or lack thereof, for trading profits.
In the 10 years before the first edition of this book, The Design, Testing, and Optimization of Trading Systems (DTOTS) published by John Wiley & Sons in 1991, interest in trading systems enjoyed tremendous growth. This was due to two main developments.
The first development was the growth in the markets themselves. Not only did a major bull market develop in equities, but the 1980s led to the introduction and development of a number of new futures markets too numerous to mention. The bulk of this new growth was in financial futures, which have completely eclipsed the commodities markets of the 1970s and the 1980s. More money chased more markets. And the money was smarter too, much of which came from institutional, professional traders.
The second development was the explosive growth of inexpensive computing power, which, in turn, brought about growth in the power and availability of sophisticated trading as well as trading strategy development and testing software.
The collaboration of these two primary developments and others produced the beginnings of a renaissance in technical trading methods and trading strategies. One might consider the early 1990s as the birth of algorithmic trading, that is, mechanical and without human judgment.
Since then, as I detailed in the Preface, these trends have accelerated at a pace that makes the early 1990s seem sleepy in comparison. Computing power has reached levels that would have been considered nearly impossible in 1990. The proliferation of markets and trading volume has been almost as explosive. Global trading volume has grown over 1,470 percent. In 1990, global volume of all futures contracts traded was 802,158,782. At the end of 2006, that figure stood at 11,859,266,610. The increase in non-U.S. trading volume has grown over 2,890 percent (7,286,007,180 in 2006 versus 251,771,924 in 1990). The increase in U.S. trading volume was a mere 831 percent (4,573,259,430 in 2006 versus 550,386,858 in 1990). This clearly shows the increasing globalization of futures trading.
This produced, circa 1990, a type of parity with the individual investor and the professional trader, but it has been short-lived. It has been difficult for the individual investor to keep pace with professional traders during the trading renaissance. This combination, however, of inexpensive computing power, sophisticated software, and a growing body of trading methods continues to make it possible for the knowledgeable investor to design and to test trading strategies with, as the pros like to call it, a positive expectancy, or as we call it, the potential for trading profit.
These strategies can be on a par with, worse than, or better than those of many professional investment firms. There is nothing to prevent the individual trader working on his own from creating very sophisticated and successful trading strategies. The technology, price history, and the software are all available. In fact, the capabilities of the contemporary investor equipped with testing software and a powerful computer (circa 2007) far exceeds that of the professional strategist working in 1990. In addition to those increased capacities, the availability, range, and sophistication of current technical analytical methods are also many times greater.
A thorough and comprehensive working knowledge of how to properly design and test strategies, however, has never been more important than it is in todayās extremely competitive markets. I am also sorry to say that the strategy development software arena available to the individual trader has, for the most part, not kept pace with this growth in computing power, software, and technical methods. The life cycle of a successful trading strategy begins as a ātwinkle in the strategistās eyeā and ends in cash trading profits. This book presents the techniques required to successfully test, optimize, and trade mechanical strategies.
The benefit of a successfully tested mechanical strategy is obviousāfinancial gain. The drawbacks of an improperly tested strategy, however, are many. The primary one is financial loss, sometimes as extreme as financial ruin. To add insult to financial injury, these trading losses are often preceded by hundreds of hours of labor and the attendant frustration and disappointment that naturally follow from such a failure.
The trader who diligently applies the procedures provided herein to the development and evaluation of his trading strategy will be able to avoid these costly pitfalls.
WHY THIS BOOK WAS WRITTEN
This book was written to provide a clear-cut and specific road map for the trader who wants to transform a trading idea into a tested, verified, properly capitalized, and profitable automated trading strategy.
The use of technical analysis and trading strategies has become so widespread in the futures trading space that it is now the dominant form of trading by most professionals, and the sophistication and the range of methods just continues to grow. The penetration of many of the types of trading strategies that are pervasive in the futures space, however, is far more limited in the equities and hedge fund spaces.
As the remarkable returns of the rocket-scientists-turned-topalgorithmic traders such as Jim Simons (Renaissance Technologies), David Shaw (D.E. Shaw & Company), and Doyne Farmer (The Prediction Company) have shown, those in these spaces have certainly developed their own original, sophisticated, and extremely effective approach to trading strategies. Interest in the approaches of the futures trading space is also growing in the equities space.
By their very nature, numeric, systematic, and automatic approaches to trading lend themselves to computerized testing. If done correctly, testing can add tremendous value to a trading strategy. In fact, I, and the trading programs at Pardo Capital Limited, would never trade with a strategy that did not prove itself through some form of comprehensive, systematic testing.
Strategy development and testing done incorrectly will lead to real-time trading losses. Make no mistake about this consequence. As the famous computer saying goes, āGarbage in, garbage out.ā Consequently, because of the inevitable results that follow error, poor procedure, and shoddy craftsmanship, computer testing is best done properly or not done at all.
Because of ignorance of proper testing procedures, some traders have become disillusioned with the very idea of computer testing. Poor craftsmanship in trading strategy development has even led some traders to believe that trading strategies donāt work.
Because of ignorance and the difficulties of performing optimization and back-testing correctly, some still believe that testing and optimization are little more than an exercise in curve-fitting. For those of you who are unfamiliar with these terms, donāt worry, they are all formally defined in the appropriate chapters.
The procedures and methods presented in this book prove that the benefits of correct testing and optimization vastly outweigh the effort required to learn and to master their proper application. The procedures mapped out in this book set forth in detail the correct way to formulate, test, and optimize a trading strategy.
To set the record straight, this book makes a clear and unambiguous distinction between the terms optimization and overfitting. Optimization refers to the process whereby a trading strategy is tested and refined so as to produce the best possible real-time trading profits. Optimization then is testing done correctly. Overfitting, which no sane strategist ever does intentionally, is optimization that has gone bad. Overfitting, then, is incorrect testing.
WHO WILL BENEFIT FROM THIS BOOK?
I hope that this book will provide value for anyone planning to employ mechanical strategies in her trading. It presents, from start to finish, the methods that must be employed to obtain and enjoy the fruits of a profitable trading strategy.
A thorough review of strategy testing highlights one of its greatest benefits: the precise measurement of reward and risk. The value of a trading strategy must be evaluated in two interrelated dimensions: profit and risk. One cannot judge these two components of trading performance in isolation. Trading always involves risk. Trading profit can be correctly evaluated only with respect to its risk, which is its major cost.
A trading strategy, therefore, can be evaluated properly only when profit and risk have been measured precisely and accurately, which can best be done through computerized testing. This absolute necessity of the accurate measurement and correct evaluation of risk and reward alone would be sufficient unto itself to justify the computer testing of a trading strategy.
Perhaps the other, and perhaps the greatest benefit, of trading with an objective, consistent, reproducible, and thoroughly understood automated strategy is the subsequent elimination of human emotion and fallible human judgment from the trading equation.
Whether or not you consider yourself a systematic trader, if you succeed at trading and have done so for some years, the odds are that you trade systematically with a perhaps very complex trading strategy formulated over years of trading.
If you have not already done so, I would urge you to make every effort to extract your trading strategy from the confines of your brain cells and reproduce it in a form that is amenable to some form of testing.
I believe, therefore, that this book holds value for any trader, mechanized, computerized, or not. It comprehensively presents the case for the benefits and necessity of the proper testing of a clearly specified trading strategy. A careful study and application of the methods presented herein will hopefully further refine and enhance the readerās computerized trading skills. Perhaps the noncomputerized trader will acquire an appreciation for the many benefits of this approach to trading and strategy development. Moreover, the noncomputerized trader may finally recognize the benefits of a thoroughly researched analysis of her strategy and make a start with the application of these methods to her advantage.
If you are a trader who is using computerized trading strategies but are not trading profitably, you should definitely read this book. You will most likely find out where you have gone wrong. At that point, you can determine whether you can repair your strategy or not.
More important, if you want to begin strategy development, this book is an excellent place to start. A study of the guidelines presented herein will help identify and eliminate the causes of failure, such as a poor strategy, improper testing methodology, or incorrect real-time interpretation.
I also, and this may surprise some, recommend this book for those traders who wish to pursue the path of discretionary, as in nonsystematic, trading. After studying this material, you will at least be advised of some things to look for in your trading so you can make every effort to both balance risk and reward and be properly capitalized.
Again, at the risk of sounding presumptuous, I also hope that this book will help those computerized trading strategists out there who have been enjoying trading profit as a result of their work. I present a number of testing guidelines here for the first time. The systematic and comprehensive procedures mapped out here are very efficient and effective. I also know that this overall approach is not too widely practiced by many strategists.
I also hope that the detailed presentation of Walk-Forward Analysis, fully detailed in Chapter 11: Walk-Forward Analysis, will bring this powerful methodology and its benefits before the eyes of those who will use it to further enhance their trading profit.
THE GOALS OF THIS BOOK
This book will present, explain, clarify, and illustrate:
⢠The many advantages that follow from the use of a properly developed automated trading strategy
⢠How to formulate, test, and evaluate a trading strategy
⢠How to properly optimize a trading strategy
⢠The symptoms of overfitting and guidelines to avoid it
⢠How to incorporate out-of-sample data in the testing of a strategy
⢠The benefits of and how to do a Walk-Forward Analysis
⢠How to develop a trading strategy profile
⢠How to judge real-time trading performance with respect to the trading strategy profile developed through historical testing
I have practiced these principles of trading strategy development presented in this book for years. As such, it is fair to say that they have passed my tests of time and of success in real-time trading.
Of course, there are some refinements and trade secrets that I do not disclose. I can say, however, that if a trading idea has initial merit, then a diligent application of the principles disclosed in this book will produce tradable strategies performing at optimal levels.
If you are new to trading strategy development, I would encourage you to master these principles and put them to the test. In all likelihood, you will save yourself a lot of wasted time, a great deal of grief and frustration, and probably a good deal of money.
You can certainly learn something from this book unless you already know how to effectively apply some form of Walk-Forward Analysis (WFA). It has been my experience that WFA is the only nearly fool-proof method (nothing in trading is 100 percent) of trading strategy optimization. Although some might disagree, I suggest that you put it to the test before forming an opinion about it.
THE LAY OF THE LAND
Everything created under the sun began as an idea. Most ideas are a bit vague when first conceived. As the idea is further explored, however, it gradually gains a more precise form. Once fully formulated and visualized, it takes on a definite and specific form and when formulated in such a way, an idea is capable of becoming a concrete, manifest reality. The same holds true for a trading strategy.
Chapter 2: The Systematic Trading Edge presents the benefits, along with some drawbacks, of trading with a computer-tested automatic trading strategy. This unfolds in three parts, detailing the benefits, respectively, of a trading strategy, the historical simulation, and strategy optimization.
A mechanical trading strategy, called simply a trading strategy, or strategy, is a set of objective and formalized rules external to and i...