THAT WORK
Building and Evaluating
Effective Trading Systems
THOMAS STRIDSMAN
M c G r a w - H i l l
New York San Francisco Washington, D.C. Auckland Bogota Caracas Lisbon London Madrid Mexico City Milan Montreal New Delhi San Juan Singapore
Library of Congress Cataloging-in-Publication Data Stridsman, Thomas.
Trading-systems that work : building and evaluating effective trading systems / by Thomas Stridsman.
p. cm. 1SBN0-O7-13598O-X
1. Investment analysis. 2. Portfolio management. I. Title. HG4529.S77 2000
332.6—<lc21
00-055008
McGraw-Hill
A Division ofTheMcGravHiUCompanies
Copyright ©2001 by The McGraw-Hill Companies, Inc. All rights reserved. Printed in the United States of America. Except as permitted under the United States Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a data base or retrieval system, without the prior written permission of the publisher.
2 3 4 5 6 7 8 9 0 AGM/AGM 0 9 8 7 6 5 4 3 2 1 0-07-135980-X
This book was set in Times New Roman by Patricia Wallenburg.
Printed and bound by Quebecor World/Martinsburg.
This publication is designed to provide accurate and authoritative information in regard to the subject matter cov-ered. It is sold with the understanding that neither the author nor the publisher is engaged in rendering legal, accounting, futures/securities trading, or other professional service. If legal advice or other expert assistance is required, the services of a competent professional person should be sought.
—From a Declaration of Principles jointly adopted by a Committee of the American Bar Association
and a Committee of Publishers
McGraw-Hill books arc available at special quantity discounts to use as premiums and sales promotions, or for use in corporate training programs. For more information, please write to the Director of Special Sales, Professional Publishing, McGraw-Hill, Two Perm Plaza, New York, NY 10121-2298. Or contact your local book-store.
being there for all of us. There are not enough words in the world to describe how much I love you.
All my forthcoming proceeds from this book will be donated to Children's Wish List in Chicago, and similar voluntary organizations, dedicated to help kids with medical and other urgent needs, to help them grow up as healthy and happy individuals.
DISCLAIMER
H y p o t h e t i c a l p e r f o r m a n c e results have m a n y inherent limitations, s o m e of which are described below. No representation is b e i n g m a d e that any a c c o u n t will or is likely to achieve profits or losses similar to those shown. In fact, there are frequently sharp differences b e t w e e n hypothetical p e r f o r m a n c e results and the actual results achieved by any particular trading p r o g r a m .
O n e of the limitations of hypothetical p e r f o r m a n c e results is that they are generally p r e p a r e d with the benefit of hindsight. In addition, hypothetical t r a d i n g d o e s not involve financial risk, and no hypothetical trading record can completely a c c o u n t for the impact of financial risk in actual trading. For e x a m p l e , the ability to withstand losses or to a d h e r e to a particular trading p r o g r a m in spite of trading losses are material points w h i c h can also adversely affect actual trading results. T h e r e are n u m e r o u s other factors related to the m a r k e t s in general or to the i m p l e m e n t a t i o n of any specific trading p r o g r a m w h i c h cannot be fully accounted for in the preparation of hypothetical
p e r f o r m a n c e results and all of w h i c h can adversely affect actual trading results. All t r a d i n g s y s t e m s and strategies in this book are intended for educational p u r p o s e s only, to provide a perspective of different market c o n c e p t s . T h e y are not m e a n t to r e c o m m e n d or p r o m o t e any trading system or a p p r o a c h . You are advised to do your o w n research and testing to d e t e r m i n e the validity of a trading idea.
I N T R O D U C T I O N x v A C K N O W L E D G M E N T S xxiii
PART ONE
E V A L U A T I N G P E R F O R M A N C E 1 Chapter 1Performance Measures 3
Total N e t Profit 4 M a x i m u m Intraday D r a w d o w n 5A c c o u n t Size R e q u i r e d and Return on A c c o u n t 6 Average T r a d e 7
Largest W i n n i n g a n d L o s i n g T r a d e s 7 G r o s s Profit and G r o s s L o s s 8
The Profit Factor 8
Average W i n n i n g a n d L o s i n g Trades 9 N u m b e r o f ( W i n n i n g / L o s i n g ) T r a d e s a n d Average N u m b e r of B a r s per T r a d e 9 M a x C o n s e c u t i v e W i n n e r s a n d L o s e r s a n d Percent of Profitable T r a d e s 10 C o d e 11 ix
Contents Chapter 2 Better Measures 13 Slippage and C o m m i s s i o n 17 Profit per T r a d e 17 Largest W i n n i n g / L o s i n g T r a d e 20 C u m u l a t i v e Profit and Equity T o p s 21 D r a w d o w n 2 3
Flat T i m e and Run U p s 25 C o d e 2 6
Chapter 3
Futures Contract Data 31 Nonadjusted Data 31
Point-based Back-adjusted Data 32 Ratio-adjusted Data ( R A D ) 37 M u l t i m a r k e t Portfolios 38 Perpetual C o n t r a c t s 41
A Few Final T h o u g h t s A b o u t Part 1 45
PART TWO
S Y S T E M C O N C E P T S 4 7 Chapter 4
Picking Tops and Bottoms 51 Chapter 5
Data Mining 55
Better U s e of Your Data 62 Basic Exit Techniques 69 Chapter 6
Trade or Not to Trade 83 X
Chapter 7
Following the Trend 85 M o v i n g Averages 8 6
D y n a m i c B r e a k o u t S y s t e m s 9 7 Standard Deviation B r e a k o u t 107 A Few Final T h o u g h t s A b o u t Part 2 115
PART THREE G E T T I N G O U T 117 Chapter 8 Efficient Trades 119 D r a w d o w n s 121 Chapter 9 Sweeney's MAE/MFE 143 B e y o n d M A E / M F E 156 Chapter 10
Adding Long-term Exits 167 T h e D y n a m i c B r e a k o u t S y s t e m 168
T h e Standard Deviation Breakout S y s t e m 177 Chapter 11
Working with Random Entries 187 T h e G o l d D i g g e r System 191
T h e M e a n d e r S y s t e m (Weekly D a t a ) 197 T h e B l a c k Jack S y s t e m 2 0 4
xii Contents
PART FOUR
H I G H - P R O B A B I L I T Y F I L T E R S 2 2 5
Chapter 12 Filtering 227
T r e n d Filters for Short-term S y s t e m s 228 T h e G o l d D i g g e r S y s t e m 2 3 6
T h e M e a n d e r S y s t e m 2 3 9 T h e Black Jack S y s t e m 2 4 0 Chapter 13
Long-term Volatility Filters 241 T h e D B S System 2 4 6
T h e S D B S y s t e m 2 4 7
T h e D i r e c t i o n a l S l o p e S y s t e m 2 5 2 Chapter 14
What Makes a Trend 255
A F e w Final T h o u g h t s A b o u t Part 4 2 6 7 PART FIVE M O N E Y M A N A G E M E N T A N D P O R T F O L I O C O M P O S I T I O N 2 6 9 Chapter 15 Money Management 271 Practical A p p l i c a t i o n s for M o n e y M a n a g e m e n t 2 8 2 S h o r t - t e r m S y s t e m s 2 8 5 T h e L o n g - t e r m Strategies 305 The SDB Strategy 305
The Directional Slope Strategy 313 The DBS Strategy 319
Chapter 16
Portfolio Composition 321 Total Equity Contribution I 3 2 1 C o r r e l a t i o n s and Covariances 3 2 4 Total Equity Contribution II 325 Chapter 17
Increasing Your Confidence 331 O u t - o f - s a m p l e Testing 331 A l t e r i n g the Inputs 3 3 4
A Few Final T h o u g h t s A b o u t Part 5 3 3 9 B a c k to the Future 3 4 2
I N T R O D U C T I O N
After I had been an editor, writer, and technical analysis expert for Futures m a g a -zine for two years it b e c a m e a p p a r e n t to me that the main mistake m o s t p e o p l e m a k e in the trading industry is to believe that there is n o t h i n g to it; that it is a piece of c a k e to put together a trading strategy and then go out there and m a k e the big b u c k s , k n o w i n g n o t h i n g about risk m a n a g e m e n t , m o n e y m a n a g e m e n t , why certain s y s t e m s simply do not work w h e n traded on certain m a r k e t s , why your worst draw-d o w n is still to c o m e or w h y a system can work as it shouldraw-d but still break you. A n draw-d horrifyingly e n o u g h , this attitude s e e m s almost equally as c o m m o n a m o n g l o n g -t i m e professionals a s a m o n g w a n n a - b e a m a -t e u r s .
A n o t h e r c o m m o n mistake, m a d e especially by smaller investors, is the thought that lesser m o n e y needs less efficient and less thoroughly researched trading meth-ods. That there will be plenty of t i m e to learn about m o r e "sophisticated" strategies and market intricacies as their accounts grow. T h i s is not so. M o n e y is m o n e y ; you are equally as likely to lose it, w h e t h e r you are a long-time, multimillion dollar m o n e y m a n a g e r or are new to the g a m e with a $ 10,000 savings account, if the meth-ods you are u s i n g w o n ' t allow you to succeed in the first place. Think about it; why would you be any m o r e successful trading $10,000 in a basic moving average crossover system, with no m o n e y m a n a g e m e n t attached (just because this is all you k n o w about trading and all the m o n e y that you have), than if you were sitting on mil-lions of dollars, knowing everything there is to k n o w about trading?
If you think that you do not have e n o u g h m o n e y or k n o w l e d g e to do it the right way from the very b e g i n n i n g , you should not trade. Period. B e c a u s e if you d o , you will find that there will in fact be plenty of time to learn about the m o r e " s o p h i s t i c a t e d " m e t h o d s , but not while trading. A s k m e — I had t h e opportunity t o e x p e r i e n c e this first hand.
Trading Systems That Work is for all of you traders out there, no matter what
y o u r level of experience is, w h o have c o m e to realize that it is not as easy at it s e e m s , XV
but still haven't been able to pinpoint the missing pieces that will solve the w h o l e puzzle. I would guess that what you believe is missing, or what is keeping you from s u c c e e d i n g as a trader, is the overall understanding of h o w it all ties together and what really constitutes a m o r e sophisticated strategy with a higher likelihood for success. T h i s book is my most sincere effort to try to provide you with this overall understanding, to help you solve the w h o l e puzzle. Call me when you d o .
Today, I am primarily an analyst and writer—not a trader, although I have traded in the past and currently have a few s y s t e m s out t h e r e , traded by others. M a n y misinformed traders think that just b e c a u s e you are not a trader, you do not k n o w anything about h o w the markets work. In my opinion, nothing could be fur-ther from the truth. Just as g o o d math skill is no guarantee of g o o d language skill, or good driving skill is no guarantee of good mechanical skill, good trading skill is no guarantee of good analytical skill—and vice versa for that matter. F u r t h e r m o r e , being an analyst and writer also is a matter of choice: I simply cannot resist sitting down in front of the c o m p u t e r and tinkering with something, then later t r y i n g to write about it in o n e form or another.
As an analyst and specializing in s y s t e m s a n d mechanical trading, I believe it follows that I have the necessary trading s k i l l s — a s long as I follow my o w n strategies. If you do not believe m e , please c o n t i n u e r e a d i n g and let me prove you w r o n g . As you turn the p a g e s , I will provide you with a set of useful tools based on my personal and, I believe, highly innovative analysis t e c h n i q u e s ; all on a level of sophistication a n d m a r k e t k n o w l e d g e widely surpassing most of what you can find " o u t t h e r e " today.
Although I sometimes use scientific and academic j a r g o n — w o r d s and phrases such as standard deviation, kurtosis, and mathematical expectancy—and s o m e -times even indulge in the m a t h e m a t i c s and calculus behind it all, I do not p u r p o r t to be a scientist, statistician, or psychiatrist, or to hold any other degree from which I might have stolen s o m e of the techniques used throughout this b o o k . In fact, I am convinced that several of you will identify several situations w h e r e I expose my ignorance in m o r e topics than o n e . But that does not matter. T h e most important thing that I will show you is that you do not need to be a rocket scientist to analyze the m a r k e t s successfully, but you must k n o w a bit m o r e than what you have been able to pick up from other b o o k s , and you must dare to think "outside of the b o x " a little. A n d for that I m a k e no excuse.
W h e n t r y i n g to explain s o m e t h i n g new, a teacher often finds himself in a d i l e m m a . To explain subject C, he first must explain subjects A and B, but often these subjects interweave with each other. So to learn A we need to first under-stand B and C. For the p u r p o s e of this b o o k I have tried hard to keep it all in s o m e logical order and as simple as possible, but invariably there are instances w h e r e I m u s t talk about and explain two new subjects at the s a m e t i m e . In other instances, I have simply left a certain topic unexplained and gotten back to it later, in a m o r e t h o r o u g h analysis and explanation. On a few o c c a s i o n s , I also cheated a bit by
Introduction
oversimplifying things. I a p o l o g i z e for this, w i t h the explanation that I simply c a n -not give away the w h o l e store in o n e book. I h o p e you will b e a r with me and find it worthwhile r e a d i n g j u s t the s a m e .
A l t h o u g h I h o p e that you will perceive this as a practical book, it is not a b o o k a b o u t a n e w set of r e a d y - m a d e technical analysis indicators, or a b o o k about foolproof t r a d i n g s y s t e m s , b e c a u s e there is no such thing. N o r is it a b o o k that will help you identify u n i q u e t r a d i n g opportunities and s h o w y o u how to exploit those opportunities with a swift decision and then go do s o m e t h i n g else. A n d although it m i g h t seem like it, it isn't even a b o o k about n e w t e c h n i q u e s or n e w ways to develop trading strategies.
Instead, this is a b o o k about how to go about reasoning even before you start a development process that eventually and hopefully will allow you to put together a trading strategy that is exactly t h a t — a strategy, a long-term work process, as opposed to a series of single, isolated decisions. With the risk of sounding way too pretentious right off the bat, this b o o k is about philosophy: that is, the philosophy behind the work of putting together a good, working trading strategy; the philosophy behind what drives markets and what m a k e s them behave as they do; and finally, the philosophy that allows us to understand why a strategy works, or why it doesn't.
T h e key point I h o p e to get across is that a trading strategy is a " p r o c e s s m a c h i n e , " w h e r e each decision m a d e automatically and i m m e d i a t e l y leads to the next o n e , and next o n e , and next o n e . . . p r o d u c i n g a l o n g string of interacting deci-sions that form a never-ending p r o c e s s — a l m o s t a p e r p e t u u m mobile. And, just like a perpetuum mobile, the t r a d i n g strategy is a very sensitive m a c h i n e , consisting of a few parts that, by necessity, form a w h o l e greater than those parts and can allow for no loss of energy. Ideally, for this to be possible, each part m u s t be put togeth-er or constructed with all the othtogeth-er parts in m i n d but also be a part of all othtogeth-er parts. (This is the philosophical aspect of this b o o k . ) It is a l m o s t . . . N o , in fact, it
is exactly as if each part is both o n e of the parts that m a k e a car work, and the car
itself, m a d e up of all the parts.
However, just as a perpetuum mobile is an impossibility, p u t t i n g together a g o o d trading strategy is very m u c h like putting together, or b u y i n g , a g o o d and w e l l - b a l a n c e d car. W h i l e d o i n g all this work, you also must think a b o u t y o u r own n e e d s and current status in life, financially and otherwise. For instance, even if you can afford it, y o u do not go and b u y yourself a N A S C A R racer for your S u n d a y afternoon sightseeing drives with the family. N o r w o u l d y o u go and b u y a road g r a d e r for the s a m e p u r p o s e . Instead you probably try to find a car that fulfills its p u r p o s e for y o u r everyday life, although you might think a station w a g o n or a m i n i van a little b o r i n g w h e n you k n o w you really a r e the L a m b o r g h i n i type. T h e s a m e g o e s with t r a d i n g strategies. First, you m u s t c o m e to grips with w h o you are and what t y p e of strategy is suitable for you, even if it is a little b o r i n g a n d leaves lit-tle r o o m for fast "overtaking m a n e u v e r s " or any other cool improvisations " b e h i n d the wheel." In fact, my e x p e r i e n c e is that trading, at least s y s t e m a t i c trading, is as
b o r i n g as w a t c h i n g baseball without a beer in your hand a n d a few in your belly. But the s a m e h o l d s true for both the public roads and the t r a d i n g r o o m s . T h e y are no places for fun a n d g a m e s .
W h e n putting together a trading strategy, this is h o w I look at it: the actual system with its buy and sell rules is the e n g i n e that could be anything from a fast intraday, market specific system ( c o m p a r a b l e to an 800 h.p., fast, N A S C A R - t y p e engine) to a slow, long-term, universal s y s t e m ( c o m p a r a b l e to a slow but steady road grader e n g i n e ) . W h e n this is d o n e , I take a look at the m o n e y m a n a g e m e n t , which is equal to the gearbox and the transmission. With the p u r p o s e of the sys-tem in mind, I now t r y to find a way to get its force d o w n to the g r o u n d as effi-ciently and safely as possible. C o n t i n u i n g with the car analogy, you k n o w it is a recipe for disaster if y o u try to fit the e n g i n e of a N A S C A R racer with the trans-mission of a station w a g o n .
O n c e the e n g i n e (the s y s t e m ) and the transmission (the m o n e y m a n a g e m e n t ) s e e m to be w o r k i n g well in a balanced h a r m o n y with each other it's time to think about the coach and the chassis. In a trading strategy, this is c o m p a r a b l e to the question of w h i c h m a r k e t s to trade. In the case of a market-specific system, this is already d o n e (and a case of when subject C c o m e s before subject A ) . But w h e t h e r a strategy is market specific or not, it still is a g o o d idea to m a k e sure that it works in as m a n y m a r k e t s as possible. In the case of a multimarket strategy, it is equally as important not to start curve-fitting the strategy by optimizing the markets in regard to the s y s t e m , as it is not to curve-fit the system to the m a r k e t s .
T h e r e is a vast difference between a g o o d system and a profitable system. It is p a r a m o u n t to understand this difference. It also is very important to understand that a g o o d system can always be turned into a profitable system, while the opposite does not necessarily hold true. T h i s is because a well working system will usually work well on a multitude of markets, catching the s a m e type of moves, measured in per-centage terms or s o m e other universal measurer. A profitable system, on the other hand, is a well working system that generates a surplus of dollars when applied in the context of a complete strategy to a specific market or portfolio of markets.
W h e n you h a v e put together the car (the overall strategy) with its engine (the s y s t e m ) , the transmission (the m o n e y m a n a g e m e n t ) , a n d the chassis (the portfolio of markets) there still are a few things missing: the fuel and the driver. T h e fuel is y o u r t i m e and money. T h e driver is you. But before you fill the baby up and j u m p into the driving seat, m a k e sure that this really is the vehicle for you (even t h o u g h y o u k n o w in your heart that you really are the L a m b o r g h i n i type).
A l t h o u g h Trading Systems That Work is n o t o n e of t h o s e 13-in-a-dozen b o o k s on day trading that s e e m s to s w a m p the m a r k e t these days, everything said here could be translated to day trading t e c h n i q u e s as well. Neither is it a b o o k specifi-cally a i m e d toward any specific t y p e of m a r k e t , although I have m a d e extensive u s e of the c o m m o d i t y futures m a r k e t s in my e x a m p l e s . Instead, w o r d s such as
Introduction xix
Part 1 takes a close look at how to m e a s u r e the p e r f o r m a n c e of a system u s i n g a set of basic a n d universal m e a s u r e m e n t s and h o w to e x p a n d the analysis further by incorporating a spreadsheet p r o g r a m , such as MS E x c e l or Lotus 1-2-3. T h i s part also takes a closer look at different types of data series a n d discusses when and how to u s e t h e m . T h i s is especially i m p o r t a n t to u n d e r s t a n d if you are a futures trader, but even if y o u h a v e d e c i d e d to stick to the stock m a r k e t , this s e c -tion should provide you with valuable insight on why so m a n y of the s y s t e m s y o u have built so far have ceased to w o r k as s o o n as you have taken t h e m live.
In Part 2 , 1 put together a set of basic longterm and shortterm trading s y s -t e m s , u s i n g differen-t -types of da-ta d e p e n d i n g on w h a -t I am -t r y i n g -to achieve. S o m e of the s y s t e m s are m a r k e t specific, others are suitable for a basket of m a r k e t s . A lot of the analysis is d o n e in a spreadsheet p r o g r a m , a n d for this we need the c o d e developed in Part 1. Other than the specific entry t e c h n i q u e s that we will contin-ue to u s e t h r o u g h o u t the b o o k , the m o s t i m p o r t a n t things to learn from Part 2 a r e that a good working s y s t e m d o e s not necessarily have to be a profitable o n e and that s o m e s y s t e m s are d o o m e d to fail w h e n traded on specific markets.
In Part 3, we t a k e the s y s t e m s that we put together in Part 2 a n d examine t h e m further for their statistical characteristics and h o w they can be improved u p o n , u s i n g J o h n Sweeney's maximum adverse excursion ( M A E ) and maximum
favorable excursion ( M F E ) analysis t e c h n i q u e s a n d different ways of splicing up
the d r a w d o w n . We also take a closer look at a few additional m e a s u r e m e n t s , such as kurtosis and skew. In m a n y ways, Part 3 is the most important part, t h a n k s to the exits that we later attach to a fixed fractional m o n e y m a n a g e m e n t regimen that boosts t h e results ten-fold—at least.
With t h e entries from Part 2 and t h e exits from Part 3, Part 4 takes a closer look at different w a y s of filtering out favorable m a r k e t situations and set-ups. A lot of the w o r k is d o n e using r a n d o m entries to g e n e r a t e as m a n y trades as possi-ble. U s i n g r a n d o m entries, we can take only a few y e a r s ' worth of data to p r o d u c e as m a n y years of u n i q u e trading s e q u e n c e s as we d e e m necessary. (In fact, after w r i t i n g this book, u s i n g the t e c h n i q u e s described in this section, I tested a system on the last t e n years of data for all the D o w - 3 0 s t o c k s , p r o d u c i n g a total of m o r e than 3 , 0 0 0 , 0 0 0 years of u n i q u e trading s e q u e n c e s . If that d o e s n ' t p r o d u c e robust results, n o t h i n g will.) At the end of this part a m o r e theoretically oriented chapter provides the framework for understanding for what m a k e s a trend and why it is my conviction that systematic t r a d i n g is likely to work in t h e first p l a c e .
In Part 5, we tie it all together by c o m b i n i n g all the s y s t e m s with different fixed fractional m o n e y m a n a g e m e n t strategies. We also take a closer look at how to put together a portfolio consisting of several m a r k e t / s y s t e m c o m b i n a t i o n s , w h i c h h e l p each other p r o d u c e results that would have b e e n impossible to achieve without all s y s t e m s w o r k i n g in t a n d e m u n d e r a mutually shared m o n e y m a n a g e -m e n t regi-men. To coin a new word, w h a t we will do is to " o p t i s i z e " rather than o p t i m i z e the system. T h e main difference between " o p t i s i z i n g " and optimizing is
that w i t h o p t i m i z i n g w e are fitting t h e s y s t e m t o the data; with " o p t i s i z i n g " w e are fitting the bet size to the s y s t e m . T h e less o p t i m i z e d y o u r system is, the m o r e " o p t i s i z e d " you can m a k e the strategy. " O p t i s i z i n g " will a l m o s t always do m o r e for y o u r b o t t o m line than optimizing. M o s t of t h e w o r k is with the help of a s p r e a d s h e e t p r o g r a m , a n d there will b e plenty o f e x a m p l e formulas a n d c o d e that you can copy and u s e in y o u r own work. Before we r o u n d off the entire b o o k , we also take a b r i e f look at how to test a system for r o b u s t n e s s to further increase our c o n f i d e n c e in it before we start u s i n g it in real life trading.
A few p e o p l e have a s k e d me w h y I am giving away my ideas instead of m a k -ing the m o s t of t h e m myself. Well, the truth is that I think I am m a k i n g t h e m o s t of t h e m , b e c a u s e even if this b o o k all of a s u d d e n tops The New York Times best-seller list, t h e s e s y s t e m s and strategies w o n ' t be w i d e s p r e a d e n o u g h to arbitrage away what I will show you over the next few p a g e s . W h y ? B e c a u s e , first of all, not e v e r y o n e w h o reads this will u s e it, b e c a u s e they w o n ' t feel comfortable w i t h it or b e c a u s e they simply d o n ' t like w o r k i n g w i t h other p e o p l e ' s i d e a s , but like to c o m e up with ideas of their own. Second, even if they do u s e t h e m , m a n y will still not be able to m a k e any m o n e y out of t h e m , b e c a u s e invariably they will c o m e up with u n t h o u g h t - o f w a y s of s c r e w i n g things up anyway. A n d last but not least, b e c a u s e the m a r k e t s are m u c h b i g g e r than any of us can fathom, these strategies will still only m a k e up a m e r e fraction of all strategies out t h e r e — s t r a t e g i e s that help m a k e these w o r k .
In fact, I h o p e that these strategies will be w i d e s p r e a d e n o u g h to reinforce and feed on t h e m s e l v e s , m a k i n g t h e m even m o r e profitable. If y o u look at it from that perspective, y o u are not my e n e m y in this, but my best friend and a c c o m p l i c e . My only t r u e e n e m y in this g a m e is myself. As in almost any other situation in life t h e r e are a t h o u s a n d - a n d - o n e w a y s I will be able to screw things up w i t h o u t y o u r help. So, t h e b o t t o m line is that even if I give this away to y o u , the d a n g e r that p o s e s to my future wealth and well-being a m o u n t s to nothing, c o m p a r e d to the d a n g e r I p o s e to myself.
L a s t but not least, p l e a s e read t h e following quotation by t h e r e n o w n e d m o n e y m a n a g e r Ralph Vince, then p u t Trading Systems That Work aside for awhile and c o n t e m p l a t e it. B e c a u s e if y o u do not understand, or do not a g r e e with it, there is no n e e d for you to continue:
" T h e key to ensure that you have a positive mathematical expecta-tion in the future is to not restrict your system's degrees of free-d o m . . . This is accomplishefree-d not only by eliminating, or at least m i n i m i z i n g , the n u m b e r of optimizable parameters, but also by eliminating, or at least minimizing, as m a n y of the system rules as possible. Every parameter you add, every r u l e you add, every little adjustment and qualification you add to your s y s t e m diminishes its d e g r e e s of freedom. Ideally, you will have a system that is very
Introduction
primitive and simple, and that continually grinds out marginal profits over time in almost all the different m a r k e t s . A g a i n , it is important that you realize that it really doesn't matter how prof-itable the system is [by itself], so l o n g as it is profprof-itable. T h e m o n e y you will m a k e trading will be m a d e by h o w effective the m o n e y m a n a g e m e n t you employ is. T h e trading system is simply a vehicle to give you a positive mathematical expectation on which to u s e m o n e y m a n a g e m e n t . S y s t e m s that work [show at least a marginal profit] on only o n e or a few markets, or have different rules or parameters for different markets, probably w o n ' t work real-time for very l o n g . . . "
W h i l e you are r e a d i n g through the rest of the book, please feel free to visit me at my Web site, at w w w . T h o m a s S t r i d s m a n . c o m , for u p d a t e s on how to order additional material, to h e l p me help the kids at the Children's M e m o r i a l M e d i c a l Center, or to j u s t leave me a c o m m e n t or t w o .
Thomas Stridsman
I
Never in my w h o l e life did I think that I would get a c h a n c e to thank everybody w h o has m e a n t so m u c h to m e , b o t h professionally and personally. Inevitably, t h a n k i n g everybody would result in a t h a n k - y o u note l o n g e r than the rest of the b o o k , so I j u s t have to settle for a few very special and recent p e o p l e . T h a n k s to N e l s o n Freeburg and his family, and to D a n and M a r y a n n e G r a m z a , for believing in me and r e c o m m e n d i n g me for the j o b as a technical analysis editor for Futures m a g a z i n e .
Thanks to Ginger Szala and Jamey Holter and all the other editors at Futures magazine for hiring me and believing in me as an editor at Futures, despite my limited English. A special thank you to my friends Jim and Margie Kharouf for helping me get settled in Chicago.
T h a n k s also to Jonas Vikstrom and Johan Ljung at Vikstrom, Ljung & Partners, for providing me with a state-of-the-art computer, and to M a x von Liechtenstein for contributing with the very important " W h a t m a k e s a t r e n d " chapter in Part 4 and for helping m e refresh m y m i c r o - and m a c r o e c o n o m i c s proficiencies.
A v e r y w a r m " t h a n k y o u " also to M e l i s s a L a n g e for teaching me everything there is to k n o w about w h a t an o p e n and honest relationship is all about. To all the rest of y o u that I have learned to k n o w and learned from t h r o u g h o u t t h e years, k n o w that I am forever grateful.
A last m i n u t e t h a n k s to Patty Wallenburg for b e i n g a great sport and of t r e m e n d o u s help d u r i n g the final editorial stages of putting this b o o k together.
P A R T O N E
Evaluating Performance
W i t h the stock m a r k e t i n a n u n p r e c e d e n t e d up-trend a n d with ever decreasing p r i c e s for state-of-the-art c o m p u t e r s , m o r e p e o p l e than ever before are playing t h e m a r k e t s , t r y i n g to m a k e a living (and hopefully a fortune). M o r e a n d m o r e p e o p l e also try to do this in a systematic fashion, u s i n g one or several m e c h a n i c a l trading strategies. In the b a c k w a t e r of this, several p r o g r a m v e n d o r s n o w offer p r o g r a m s w i t h w h i c h you c a n b u i l d a n d test your o w n trading strategies, or even b u y a n d p l u g in strategies m a d e by others. A c o u p l e of the m o s t p o p u l a r p r o g r a m s for this are O m e g a R e s e a r c h ' s TradeStation a n d E q u i s ' M e t a S t o c k . O t h e r p r o g r a m s exist, but t h a n k s to their built-in p r o g r a m m i n g capabilities, these two p r o g r a m s are the m o s t popular, a i m e d toward the retail customer.
T h a n k s to its PowerEditor and E a s y L a n g u a g e , TradeStation probably provides the m o s t professional way available today for coding and evaluating your o w n trad-ing strategy. M o s t professional market analysts (myself included) probably have a strange love-hate relationship to TradeStation. On the one hand, it provides you with the m o s t possibilities of any p r o g r a m , but on the other hand, its m a n y possibilities also reveal a few e m b a r r a s s i n g weaknesses, especially w h e n it c o m e s to the evalua-tion p r o c e s s — w h e r e it shares the s a m e w e a k n e s s e s found in m a n y other p r o g r a m s . T h i s is very important, b e c a u s e before you can start to build a n d investigate any t y p e of trading strategy y o u m u s t k n o w w h a t type of information to look for, a n d if t h e information is n o t there, c o m e up w i t h a way to p r o d u c e it yourself. In this first part, y o u will learn which m e a s u r e m e n t s are m o s t important. S o m e of t h e m you will be able to derive directly from TradeStation or M e t a S t o c k ' s per-f o r m a n c e s u m m a r i e s . Others m u s t be e x p o r t e d into a text per-file with t h e h e l p oper-f each p r o g r a m ' s built-in p r o g r a m m i n g capabilities, for further analysis in Excel or any
other s p r e a d s h e e t p r o g r a m . For c o m m o d i t y futures traders, it also is v e r y i m p o r -tant to u s e t h e right t y p e of data a n d to r e m e m b e r that n o t all t i m e series s h o u l d be treated the s a m e .
C H A P T E R 1
Performance Measures
W h i c h system-testing m e a s u r e s are likely to w o r k and w h i c h are not? By necessi-ty all system testing and design m u s t be m a d e on historical data. T h e trick, then, is to m a k e as g o o d use as possible out of this data, and to m a k e your evaluation m e a s -ures as forward-looking as possible. T h i s chapter presents a r u n d o w n of the m o s t c o m m o n l y used m e a s u r e s i n TradeStation's p e r f o r m a n c e s u m m a r y a n d explains w h i c h have s o m e value, w h i c h d o n ' t , and w h i c h can be m o d i f i e d with the help of a spreadsheet p r o g r a m . B u t before we go on, let us start with a little quiz.
If y o u c a n c h o o s e b e t w e e n b u y i n g two different stocks, one currently priced at $ 1 2 . 5 0 and t h e other at $ 2 0 , and y o u k n o w for sure that the o n e priced at $ 1 2 . 5 0 will rise by 1.75 points over the next c o u p l e of days, while the o n e priced at $ 2 0 will increase 2.60 points (almost a full point m o r e ) over the s a m e p e r i o d of time, w h i c h one would you c h o o s e ? If you answer the $ 1 2 . 5 0 stock, you probably under-stand w h a t I am hinting at and should have little trouble u n d e r s t a n d i n g this part of t h e b o o k .
If however, y o u answered the $20 stock, you probably are a little too a n x i o u s -ly chasing that elusive dollar. Just do the m a t h . In this case, 12.50 divided by 20 e q u a l s 0.625, or 5/8. This m e a n s that for every 5 0 0 $ 2 0 stocks you b u y you can use the s a m e a m o u n t of m o n e y to buy, 800 $ 1 2 . 5 0 stocks. 5 0 0 t i m e s 2.60 points equals 1,300 points (or 13%) in profits if y o u b u y $ 1 0 , 0 0 0 w o r t h of the $20 stock. 8 0 0 t i m e s 1.75 e q u a l s 1,400 points (or 14%) in profits if you b u y $ 1 0 , 0 0 0 worth of the $ 1 2 . 5 0 stock.
If y o u think this difference isn't m u c h to w o r r y about, w h a t if y o u could c h o o s e a m o n g 20 trades like this for t h e rest of the year, b e i n g able to use the prof-its from e a c h trade in the next o n e ? T h e n your initial $ 1 0 , 0 0 0 would g r o w to
$ 1 1 5 , 2 3 1 if y o u only b o u g h t t h e $20 stock, but to $ 1 3 7 , 4 3 5 if y o u only b o u g h t the $12.50 stock. A n d w h a t if y o u c o u l d do this for three years straight? T h e n y o u r ini-tial $ 1 0 , 0 0 0 w o u l d g r o w to $ 1 5 , 3 0 0 , 5 3 4 if you only b o u g h t the $ 2 0 stock, b u t to $ 2 5 , 9 5 9 , 1 8 7 if y o u only b o u g h t t h e $ 1 2 . 5 0 stock. T h i s is a difference of m o r e than $ 1 0 , 0 0 0 , 0 0 0 after only 60 trades.
A l t h o u g h t h e s e n u m b e r s a r e idealized, t h e y illustrate t h e p o i n t t h a t i t p a y s to take it e a s y a n d do t h e m a t h before y o u j u m p into a t r a d e . A n d it is e x a c t l y this t y p e o f m a t h t h a t n o m a r k e t a n a l y s i s a n d t r a d i n g software p a c k a g e s a l l o w y o u to d o .
TOTAL NET PROFIT
Probably the m o s t frequently u s e d optimization m e a s u r e is total net profit. Often, it is u s e d together w i t h maximum intraday drawdown.1 Unfortunately, however, the total net profit is of very little value w h e n it c o m e s to evaluating a trading strate-gy's estimated future p e r f o r m a n c e , n o m a t t e r h o w rigorous t h e testing o r h o w robust the system. T h e r e a s o n for this is twofold a n d d e p e n d s on w h e t h e r you p r e -fer to w o r k with only one m a r k e t at a t i m e or w i t h a basket of m a r k e t s a n d / o r sys-t e m s sys-to m a k e up a porsys-tfolio. W h a sys-t a p p l i e s sys-to sys-t h e o n e - m a r k e sys-t c a s e also h o l d s sys-true for a portfolio.
In the o n e - m a r k e t case, the total net profit tells y o u n o t h i n g a b o u t w h e n your profits o c c u r r e d a n d h o w large t h e y w e r e in relation to e a c h other. T h i s is e s p e -cially i m p o r t a n t if the m a r k e t y o u are interested in is p r o n e to t r e n d i n g . For instance, if the m a r k e t h a s been in a p r o l o n g e d up-trend it is likely that t h e dollar value of e a c h trade h a s increased with the increasing dollar value of t h e market. T h i s , in turn, m e a n s that the total net profit is u n e v e n l y distributed t h r o u g h t i m e a n d mostly influenced by t h e v e r y latest m a r k e t action. In a downtrend the o p p o -site h o l d s true. N o t i c e however, that t h e t r e n d of the m a r k e t says n o t h i n g a b o u t w h e t h e r the s y s t e m has b e c o m e m o r e robust or not. In a m a r k e t w i t h several dis-tinctive u p - a n d - d o w n t r e n d s , this m a t t e r is even m o r e c o m p l e x .
In the m u l t i m a r k e t case, the total net profit tells y o u n o t h i n g about h o w well diversified y o u r portfolio is. T h i s is especially true if you stick to trading an equal a m o u n t of shares for all equities, or o n e contract p e r c o m m o d i t y in the c o m m o d -ity futures m a r k e t . T h i s is b e c a u s e w h a t are c o n s i d e r e d h u g e dollar m o v e s in s o m e stocks or m a r k e t s are only considered to be ripples on t h e surface in others. You cannot, for instance, diversify a one-contract trade in t h e S & P 5 0 0 futures m a r k e t s with a one-contract trade in corn, no m a t t e r h o w well your s y s t e m s e e m s to w o r k in e a c h m a r k e t . S i m p l y stated, the larger t h e m a r k e t value of t h e m a r k e t , t h e larg-er the i m p a c t on the total net profit of the portfolio.
1 Your maximum equity loss, or loss of capital, calculated over both open and closed out profits. The term intra-day indicates that this drop in equity can start at any time, at any intra-day, and end at any time, at any intra-day.
CHAPTER 1 Performance Measures 5
In the stock market, to value a s y s t e m by its total net profit can take on a b s u r d c o n s e q u e n c e s w h e n a c o m p a n y decides to do a stock split. For instance, say that a stock currently is trading at $ 9 0 , a n d a trading s y s t e m that consistently b u y s a n d sells 100 stocks p e r trade s h o w s a historical, hypothetically back-tested prof-it of $ 1 5 0 , 0 0 0 . Tomorrow, after the stock h a s b e e n splprof-it 3:1 a n d the stock is trad-ing at $ 3 0 , the historical, hypothetically back-tested profit has decreased to $ 5 0 , 0 0 0 . D o e s this m e a n that the s y s t e m all of a s u d d e n is three t i m e s as b a d as the day before? Of course not; it's exactly the s a m e system, and from this e x a m -ple it is easy to see that after t h e split y o u m u s t trade the stock in lots of 3 0 0 stocks p e r trade t o m a k e the n e w results c o m p a r a b l e w i t h old pre-split results. M a n y t i m e s , however, w h e n we n e e d to c o m p a r e different m a r k e t s , over different p e r i -ods of t i m e , a n d traded w i t h different s y s t e m s , it is not always this easy. T h e fol-lowing chapters t e a c h y o u h o w to work a r o u n d this d i l e m m a a n d build a well-diversified portfolio that is likely to h o l d up in the future a n d c o n t i n u e to provide g o o d risk protection.
MAXIMUM INTRADAY DRAWDOWN
H o w m a n y of us have not heard the old a d a g e " y o u r worst drawdown is still to c o m e ? " W h i l e this is likely to c o m e true sooner or later, it does not have to happen first t h i n g t o m o r r o w , p r o v i d e d y o u h a v e d o n e y o u r h o m e w o r k correctly. Unfortunately, the information m o s t system testing software provides you will not be enough, because the n u m b e r given is in dollars, without any relation to w h e r e and when this b a d trade sequence struck. For instance, with a point value of $250 for a S & P 500 futures contract, there is a vast difference between a $20,000 drawdown w h e n the market w a s trading around 500 a n d a $20,000 drawdown with the market trading at 1,350. In the latter case, a $20,000 drawdown is similar to being caught in a series of bad trades for about 5% of current market value, something that can h a p -p e n to anybody. In the first case, however, an equally large drawdown in dollars w o u l d a m o u n t to approximately 1 6 % of the market value at that point in time. With the market trading at 1,350 a 1 6 % d r a w d o w n translates to $54,000. With only the information from your regular performance summary, however, there is no way for you to find that out. No w o n d e r then, that so m a n y traders blow out before they even have a chance to get started. To calculate the true expected drawdown, you m u s t first find the largest d r a w d o w n — i n percentage t e r m s — i n relation to the market value w h e n it occurred a n d then translate that percentage into today's market value.
A l s o , w h e n evaluating your d r a w d o w n , y o u m u s t k n o w exactly w h a t y o u are l o o k i n g at. In TradeStation's case, the d r a w d o w n is calculated as the closed trade d r a w d o w n ( C T D ) , p l u s t h e o p e n trade d r a w d o w n ( O T D ) , m a k i n g u p the total e q u i -ty d r a w d o w n ( T E D ) at that point in time. B u t this is not necessarily t h e best way to look at the d r a w d o w n w h e n it c o m e s to building a robust system. (We will explore the r e a s o n s for this t h r o u g h o u t this b o o k ) . In Part 3 we also take a look at
h o w to divide t h e O T D into start trade d r a w d o w n ( S T D ) a n d end trade d r a w d o w n ( E T D ) a n d h o w to analyze t h e m for better entries a n d exits. N o t until this is d o n e should you address t h e C T D for a better overall p e r f o r m a n c e .
ACCOUNT SIZE REQUIRED AND RETURN ON ACCOUNT
T h e account size required a n d return on account are p r o b a b l y t h e m o s t deceiving n u m b e r s of t h e m all. As you can see by l o o k i n g at Figure 1.1, w h i c h s h o w s the per-f o r m a n c e s u m m a r y per-for an early version oper-f B l a c k J a c k / M e a n d e r s y s t e m in TradeStation, t h e a c c o u n t size r e q u i r e d is the s a m e as t h e value for the m a x intra-day d r a w d o w n . B u t this is a purely theoretical figure p r o d u c e d w i t h the help of hindsight; there is no way for y o u to k n o w that n u m b e r before you start trading, a n d there certainly is no g u a r a n t e e for this value to hold up in the future.
To calculate t h e return on account, TradeStation simply divides t h e total net profit by the account size required. T h e m a i n thing w r o n g with this n u m b e r is that
F I G U R E 1 . 1
CHAPTER 1 Performance Measures 7
it is s u p p o s e d to be calculated at one point in time (before y o u start trading) w i t h the hindsight from t w o totally different p o i n t s in t i m e (during trading for the w o r s t d r a w d o w n a n d w h e n finished trading for total net profit). Perhaps even m o r e i m p o r t a n t from a real-world p o i n t of view, no trader in his right m i n d w o u l d start out with a trading a c c o u n t that is only expected to cover his worst historical draw-d o w n , especially b e c a u s e this draw-d r a w draw-d o w n figure has no connection to the future w h a t s o e v e r a n d is very likely to be exceeded. T h u s , b e c a u s e there is no way to k n o w your exact largest future d r a w d o w n or e n d i n g equity, y o u have no idea a b o u t h o w large your trade a c c o u n t m u s t be and consequently no way of estimating the return on y o u r a c c o u n t either. Therefore, these two figures are c o m p l e t e l y u n n e c -e s s a r y a n d provid-e y o u w i t h n o information whatso-ev-er.
AVERAGE TRADE
O n e of the m o s t i m p o r t a n t t h i n g s to consider before starting to trade any s y s t e m is the estimated average profit p e r trade in the future. Unfortunately, neither TradeStation's nor M e t a S t o c k ' s p e r f o r m a n c e s u m m a r i e s give you any s u c h for-w a r d - l o o k i n g information. Basically, for-w h a t can be said about the total net profit also can be said a b o u t the average profit p e r trade, at least as long as it is b a s e d solely on historical dollar m e a s u r e s . W h e n it c o m e s to the average profit p e r trade, however, the reasoning is that t h e trades that h a p p e n e d " w a y b a c k w h e n , " w h e n t h e m a r k e t w a s trading at a completely different level, will i m p a c t the value of the average trade t o o m u c h . For instance, if the m a r k e t has traded from 1,000 p o i n t s to 2,500 p o i n t s , a n d y o u ' r e trading a s y s t e m b a s e d on three profitable trades, o n e for $ 1 0 0 w h e n the m a r k e t s w a s trading at 1,000; another for $ 2 0 0 w h e n the m a r -kets w a s trading at 2 , 0 0 0 ; a n d m o s t recently, o n e for $ 1 5 0 w h e n the market w a s trading at 1,500, TradeStation will tell you that the average trade is $ 1 5 0 . B u t this is not w h a t you can expect the average t r a d e to be now, w h e n the market has ral-lied and is trading considerably higher. F r o m this e x a m p l e it is not too difficult to figure o u t that with the m a r k e t trading at the 2 , 5 0 0 level, the next trade is expect-ed to s h o w a profit of $ 2 5 0 . A m o r e disturbing e x a m p l e , however, can be seen in Figure 1.1. H e r e the average profit p e r trade is $ 5 7 7 , while the true expected aver-age profit p e r trade in today's m a r k e t is $ 1 , 2 6 9 (as of O c t o b e r 1999).
LARGEST WINNING AND LOSING TRADES
A l t h o u g h the estimated largest d r a w d o w n h o l d s information a b o u t h o w large your account size m u s t be and can give you an indication of w h e t h e r you have the p s y -chological profile to trade the system in question, the information about the largest losing trade is m u c h m o r e important than the d r a w d o w n for m o n e y m a n a g e m e n t p u r p o s e s . As is the case with so m a n y other of the m o s t p o p u l a r m e a s u r e s , howev-er, the values for the largest w i n n i n g trade a n d the largest losing trade essentially
hold no value as long as you c a n ' t p u t t h e m in relation to w h e n t h e y h a p p e n e d a n d w h e r e the m a r k e t w a s trading at the t i m e . O n c e this is k n o w n , the largest losing trade can be u s e d to set up a fixed fractional m o n e y m a n a g e m e n t strategy that m o s t certainly will prove m u c h m o r e important for your b o t t o m line than the s y s t e m itself. (Fixed fractional m o n e y m a n a g e m e n t is discussed in Part 5.)
GROSS PROFIT AND GROSS LOSS
If the total net profit is of little g o o d as a performance evaluator, it should follow that so are the gross profit a n d the gross loss, right? Unfortunately, it is not that simple a n d the answer is " y e s — a n d — n o . " L o o k e d at separately, it is likely that the gross profit a n d the gross loss will be influenced in the very s a m e way as the total net prof-it. T h a t is, in a m a r k e t p r o n e to trending, the values of the w i n n i n g a n d losing trades are likely to vary with the value of the market. A n d in a portfolio, the larger the m a r -ket value of the mar-ket, the larger the impact on the gross profit a n d the gross loss of the portfolio. However, provided that the profits a n d the losses are evenly distrib-uted through t i m e a n d the relationship between t h e m stays approximately the s a m e over time, they can h o l d a wealth of information that is very useful in your initial performance evaluation. T h i s information is derived via the profit factor.
The Profit Factor
To calculate t h e profit factor, simply divide the gross profit by t h e g r o s s loss; the answer tells y o u h o w m a n y dollars y o u are likely to win for every dollar y o u lose. For instance, say that y o u have $2 a n d place $1 in a bet, h o p i n g to w i n $2 m o r e , e n d i n g up w i t h $4. T h e first t i m e y o u try, y o u lose a n d y o u r gross loss is $ 1. W i t h your last $ 1, you take another c h a n c e . T h i s t i m e y o u w i n $2, ending up w i t h a total of $ 3 . Your gross profit is therefore $ 2 . Two divided by one equals two, w h i c h is your profit factor.
Now, do the s a m e betting s e q u e n c e all over again, b u t this t i m e multiply all values by 10. This t i m e you first lose $10 a n d then w i n $20, e n d i n g up with $30. 20 divided by 10 also equals t w o . H e n c e , t h e profit factor is simply the relationship between dollars lost and dollars gained and, b e c a u s e it is a ratio, it is a way of nor-malizing your results to m a k e t h e m c o m p a r a b l e b e t w e e n t i m e frames a n d m a r k e t s .
For t h e profit factor to work, it does not m a t t e r if the m a r k e t h a s b e e n trend-ing or n o t as l o n g as it is r e a s o n a b l e to a s s u m e that your profits a n d losses have fluctuated at an equal p a c e a n d are evenly distributed t h r o u g h t i m e . For t h e s a m e reason, it also is possible to u s e t h e profit factor as a c o m p a r i s o n b e t w e e n differ-ent s y s t e m s a n d m a r k e t s . It is obvious that t h e h i g h e r t h e profit factor the better t h e s y s t e m . It is even m o r e i m p o r t a n t to d e t e r m i n e h o w robust t h e profit factor is, t h a n h o w h i g h it is. T h a t is, h o w likely is it that t h e profit factor will h o l d up in the future a n d in different m a r k e t situations?
CHAPTER 1 Performance Measures 9
M a n y s y s t e m v e n d o r s a n d trading experts believe that y o u should n o t trade a s y s t e m with a hypothetically b a c k - t e s t e d profit factor b e l o w t h r e e , b e c a u s e they k n o w from experience that the profit factors for all their s y s t e m s will d e c r e a s e considerably w h e n t h e s y s t e m is traded live on u n s e e n data. Probably the only rea-s o n for thirea-s r e c o m m e n d a t i o n irea-s that they do n o t u n d e r rea-s t a n d h o w to build a roburea-st trading strategy in the first p l a c e . If n o w h e r e else, this b e c o m e s evident w h e n they c o n t i n u e to u s e the total net profit a n d d r a w d o w n s as their m o s t i m p o r t a n t per-f o r m a n c e evaluators. To build a robust trading s y s t e m that is likely to c o n t i n u e to p e r f o r m in the future, m a k e sure that the u n d e r l y i n g logic is sound a n d simple, that the trading rules are as s i m p l e a n d as few as possible, a n d that the gross profit a n d the gross loss are evenly distributed t h r o u g h t i m e a n d in relation to e a c h other. If you m a n a g e to do all this, y o u will be surprised at h o w m u c h you can expect to p r o d u c e from a s y s t e m w i t h a profit factor as low as 1.5, or even lower.
AVERAGE WINNING AND LOSING TRADES
A s i s t h e c a s e w i t h g r o s s profit a n d g r o s s loss, t h e a v e r a g e w i n n i n g a n d l o s i n g t r a d e s can h o l d s o m e v e r y v a l u a b l e i n f o r m a t i o n i f u n d e r s t o o d a n d t r e a t e d cor-rectly. A g a i n , however, t h e trick i s t o m e a s u r e t h e m a t t o d a y ' s m a r k e t v a l u e . For i n s t a n c e , if y o u c u r r e n t l y a r e in a d r a w d o w n a n d k n o w the v a l u e s of y o u r aver-a g e w i n n e r aver-a n d loser aver-a n d the frequency w i t h w h i c h they aver-are likely t o occur, y o u can c a l c u l a t e t h e m i n i m u m e s t i m a t e d n u m b e r o f t r a d e s ( a n d t i m e ) i t s h o u l d t a k e to r e a c h a n e w e q u i t y h i g h . For i n s t a n c e , if y o u k n o w that y o u r a v e r a g e profit p e r t r a d e e q u a l s $ 4 0 0 , a n d y o u c u r r e n t l y are in a $ 2 , 5 0 0 d r a w d o w n , t h e e s t i m a t -ed n u m b e r of t r a d e s to get y o u out of t h e d r a w d o w n is seven ( I N T ( 2 , 5 0 0 / 4 0 0 ) + 1).
NUMBER OF (WINNING/LOSING) TRADES AND
AVERAGE NUMBER OF BARS PER TRADE
M a n y traders a n d analysts p a y very little or no attention to the n u m b e r of trades a s y s t e m is likely to generate. B u t this is very i m p o r t a n t information that gives you t h e first clue to w h e t h e r t h e s y s t e m is suitable for you. T h e questions you m u s t ask y o u r s e l f are " d o e s this s y s t e m trade often e n o u g h " a n d " d o e s it k e e p me in the market e n o u g h to satisfy my n e e d for a c t i o n ? " T h e s e are seemingly silly questions at first glance, but the truth is that a specific s y s t e m will not suit everybody, no m a t t e r h o w profitable it is. If it does n o t fit your personality or style of trading, y o u will n o t feel comfortable trading it.
W h a t is even m o r e important, however, is h o w m u c h t i m e the s y s t e m is expected to stay in t h e m a r k e t . T h i s is b e c a u s e t i m e spent in the market equals risk a s s u m e d . Therefore, the less t i m e you c a n s p e n d in the m a r k e t to reach a certain profit, the better off y o u are. To calculate the relative t i m e spent in t h e market,
multiply the n u m b e r o f w i n n i n g trades b y t h e average n u m b e r o f b a r s2 for the w i n -n e r s . A d d this t o t h e -n u m b e r o f losi-ng t r a d e s , m u l t i p l i e d b y t h e average -n u m b e r o f b a r s for the losers. Finally, divide by t h e total n u m b e r of b a r s e x a m i n e d . U s i n g the p e r f o r m a n c e s u m m a r y above, this equals a p p r o x i m a t e l y 0.4, w h i c h m e a n s that y o u will be in a t r a d e only four days out of ten. Obviously, you also will be better off t h e fewer a n d shorter t h e losing trades are.
MAX CONSECUTIVE WINNERS AND LOSERS AND PERCENT OF PROFITABLE TRADES
You should t r y to keep t h e m a x i m u m n u m b e r s of consecutive winners a n d losers as low as possible a n d t h e percent of profitable trades as h i g h as possible. T h e n u m -b e r of consecutive losers is especially important, if y o u like to feel comforta-ble with trading the system. For a correctly built system* however, with a relatively high n u m b e r of profitable trades, these n u m b e r s hold v e r y little value a n d should be l o o k e d u p o n m o r e as freak o c c u r r e n c e s than anything else. W h e n you e x a m i n e your system, it is v e r y important to k n o w w h e t h e r the s y s t e m has a tendency to p r o d u c e strings of trades with similar o u t c o m e s . If it does, t h e s y s t e m and the market are still h o l d i n g valuable information that y o u h a v e n ' t yet exploited. If you do not m a n -a g e to get rid of this tendency, you n e e d to k e e p this inform-ation in m i n d w h e n you are designing t h e m o n e y m a n a g e m e n t strategy to go w i t h the system.
It also is a g o o d idea, w h e n m o n i t o r i n g y o u r real-time p e r f o r m a n c e , to k e e p track of h o w m a n y consecutive w i n n e r s it m i g h t take to b r i n g y o u out of a drawd o w n . C o n t i n u i n g w i t h t h e $ 2 , 5 0 0 drawd r a w drawd o w n e x a m p l e , it will take you four w i n -n i -n g trades i-n a r o w to reach a -n e w e q u i t y h i g h if your average w i -n -n i -n g trade is w o r t h $ 7 0 0 ( I N T ( 2 , 5 0 0 / 7 0 0 ) + 1). O n c e y o u k n o w this, ask yourself h o w likely it is for this to h a p p e n . If t h e answer is it m o s t likely h a p p e n s o n c e in a blue m o o n , that t h e m o s t w i n n i n g trades y o u can e x p e c t in a row are t w o , that it is highly like-ly that t h e losers will c o m e in pairs, a n d that your average loser is for $ 3 0 0 . T h e n y o u k n o w that in t h e b e s t of w o r l d s , it can be expected to take at least ten trades before you are in the b l a c k a g a i n — p r o v i d e d that you experience t w o w i n n e r s in a row, three t i m e s in a row, never experience m o r e than t w o losers in a row, a n d start out w i t h two w i n n i n g t r a d e s . If y o u instead start out with t w o losing trades, t a k i n g t h e d r a w d o w n d o w n t o $ 3 , 1 0 0 , everything else b e i n g equal, t h e estimated n u m b e r of trades w o u l d be 16.
Together w i t h t h e profit factor, t h e p e r c e n t profitable trades is the only p e r f o r m a n c e m e a s u r e that c a n b e derived i m m e d i a t e l y from t h e p e r f o r m a n c e s u m m a r y a n d h a s any value w h e n it c o m e s to estimating t h e system's future p e r f o r m a n c e . A g a i n , however, this a s s u m e s that t h e u n d e r l y i n g logic is sound a n d
2 A bar is a marker in a chart that shows the trader how the price of the market fluctuated over a specific time period. A bar usually shows the opening, high, low, and closing price. It can be specified to cover any time period, such as 1 minute, 1 hour, 1 day, 1 week, etc.
CHAPTER 1 Performance Measures 11
v
that t h e s y s t e m can be considered robust. Obviously you should try to k e e p this n u m b e r as high as possible to feel comfortable w i t h the strategy, but, as is t h e case w i t h the profit factor, a m o r e robust n u m b e r is better than a high one w h e n it c o m e s t o t h e system's tradability a n d w h e n p i c k i n g the best m o n e y m a n a g e m e n t strategy. In fact, s o m e t i m e s it even is a g o o d thing to k e e p this n u m b e r d o w n in favor of a h i g h e r n u m b e r of profitable m o n t h s for the overall strategy or portfolio. N o n e t h e l e s s , with this n u m b e r in hand, we n o w can p u t together a m o r e g e n e r i c formula to calculate the estimated n u m b e r of trades, N, to get out of a d r a w d o w n : N = I N T ( D D A / (X * AW - (1 - X) * A L ) ) + 1, w h e r e
D D A = D r a w d o w n a m o u n t
X = Likelihood of a winner, b e t w e e n zero a n d one AW = Average w i n n e r
AL = Average loser
For e x a m p l e : If the average w i n n i n g trade is worth $ 7 0 0 , the average losing trade $ 3 0 0 , a n d the likelihood of a w i n n e r is 4 5 % , then the estimated n u m b e r of t r a d e s it will take to bring you out of a $ 2 , 5 0 0 d r a w d o w n is 17. F u r t h e r m o r e , if the average trade l e n g t h is five days a n d the total a m o u n t of t i m e spent in the m a r k e t is 3 3 % , then it will take you an estimated 2 5 0 trading days (17 5 + 0.33) to get out of the red again, n o t c o u n t i n g w e e k e n d s a n d holidays. T h a t is almost a full year's worth of trading to get out of a situation that, at a first glance, only s e e m s to require "just a few g o o d trades."
T h i s equation shows that trading is a very deceptive b u s i n e s s , a n d that we h a d better m a k e sure that we k n o w w h a t we are d o i n g . N o t e also that in this e x a m -p l e we are w o r k i n g w i t h dollar a m o u n t s a n d a fixed n u m b e r of contracts traded on one m a r k e t only. In u p c o m i n g sections, w h e r e we start w o r k i n g w i t h p e r c e n t a g e s a n d an everchanging n u m b e r of contracts traded on a w i d e variety of both m a r -kets a n d s y s t e m s , this m a t t e r b e c o m e s even m o r e c o m p l e x .
CODE
T h i s c h a p t e r discussed w h i c h o f TradeStation a n d M e t a S t o c k ' s p e r f o r m a n c e s u m -m a r y -m e a s u r e s are likely to w o r k a n d w h i c h are not. T h e only two -m e a s u r e s that you can p u t to i m m e d i a t e use are the profit factor a n d the percent profitable trades. W i t h the c o d e below, you can create a file that exports this information to a spread-sheet p r o g r a m , together with the t i m e spent in the m a r k e t . T h i s c a n c o m e in h a n d y if you, for instance, want to c o m p a r e the s a m e s y s t e m on a w i d e variety of m a r -k e t s , or several variations of t h e s a m e s y s t e m on o n e mar-ket d u r i n g the initial steps of the building p r o c e s s . By interchanging the SysVer input w i t h all your o t h e r inputs, you can k e e p track of w h i c h version of the s y s t e m e a c h row refers to.
In the next chapter we show h o w to u s e TradeStation's E a s y L a n g u a g e to export m o r e data into E x c e l for further analysis, a n d h o w to c o m e up w i t h a n e w set of forward-looking evaluation m e a s u r e s that are better suited to h o l d i n g up in t h e future a n d h e l p i n g y o u to b u i l d m o r e robust a n d reliable trading strategies.
Inputs: SysVer(O);
Vars: PFactor(O), WTrades(O), TotBars(O), TradeStrl(""); If CurrentBar = 1 Then Begin
TradeStrl = "Market" + "," + "Version" + "," + "P factor" + "," + "% Winners" + "," + "% in trade" + NewLine;
FileAppend("C:\Temp\Chap 1 -1 .csv", TradeStrl); End;
If LastBarOnChart Then Begin
PFactor = GrossProfit / -GrossLoss;
WTrades = NuraWinTrades * 100 / TotalTrades;
TotBars = (TotalBarsLosTrades + TotalBarsWinTrades) * 100 / BarNumber; TradeStrl = LeftStr(GetSymbolName, 2) + "," + NumToStr(SysVer, 0) + "," + NumToStr(PFactor, 2) + "," + NumToStr(WTrades, 2) + "," + NumToStr(TotBars, 0) + NewLine;
FileAppend("C :\Temp\Chap 1-1 .csv", TradeStrl); End;
C H A P T E R 2
Better Measures
So far, m o s t testing p a c k a g e s (and back-adjusted time series for the c o m m o d i t y futures markets) have only allowed you to back-test your strategies using dollar val-ues. T h i s is all fine and well if you are only interested in how m u c h m o n e y you could have m a d e h a d you been able to trade your strategy in the past. T h e m a i n disadvan-tage with this way of testing, however, is that it tells you very little about h o w well your strategy is likely to hold up in the future. To achieve this, a whole new set of per-formance measures must be put together. In this chapter, we take a closer look at how to export the necessary data from your system trading software into a text file and h o w to calculate this n e w set of performance m e a s u r e s in a spreadsheet program.
In e s s e n c e , w h a t y o u m u s t do is to calculate all t h e n e c e s s a r y values in c e n t a g e t e r m s rather than in dollars or points. In this way, you will be able to perform m o r e accurate c o m p a r i s o n s of h o w a s y s t e m is likely to work in different m a r -kets a n d t i m e frames. For instance, say that a m a r k e t (the S & P 5 0 0 ) currently is trading at 1,350 a n d that e a c h point m o v e is worth $ 2 5 0 . If this m a r k e t rises 1%, that m o v e is w o r t h $3,375 (1,350 X 0.01 X 2 5 0 ) . But if the s a m e p e r c e n t a g e m o v e h a p p e n e d " w a y b a c k w h e n , " w h e n the market w a s trading at 2 5 0 , a 1% m o v e w a s only w o r t h $ 6 2 5 (250 X 0.01 X 2 5 0 ) . If t h e m a r k e t value increases, it is likely that the dollar m o v e s increase as well, while t h e p e r c e n t a g e m o v e s are likely to r e m a i n a p p r o x i m a t e l y the s a m e . (For p r o o f of this, see Figures 2.1 t h r o u g h 2.3.) T h u s , by using p e r c e n t a g e - b a s e d calculations, you give each a n d every trade an o p p o r t u n i t y to influence your strategy to an equal d e g r e e and y o u are able to build better a n d m o r e reliable strategies, w h i c h are m o r e likely to h o l d up in the future. T h e s a m e r e a s o n i n g can also be applied to a c o m p a r i s o n of different m a r k e t s with different m a r k e t values. O n c e you are d o n e with y o u r p e r c e n t a g e - b a s e d calculations, you can transform t h e m into dollar values b a s e d on w h e r e the m a r k e t is trading today.
F I G U R E 2 . 1
CHAPTER 2 Better Measures 15
F I G U R E 2 . 2
F I G U R E 2 . 3
CHAPTER 2 Better Measures 17
SLIPPAGE AND COMMISSION
Although there is no way around these costs once the system is up and running, you should not concern yourself with slippage and commission when building and researching a trading strategy. This sounds strange, but there are several reasons for this. First of all, when you're back-testing on historical data, you should not try to squeeze out as many dollars or points as you can, but rather try to capture as many and as large favorable moves as possible, while spending as little time in the market as nec-essary, because the m o r e time you spend in the market, the m o r e risk you're assuming.
For instance, if y o u are building a s y s t e m to trade t h e S & P 5 0 0 stock index futures contract, it can p r o v e tricky to c o m e up with a s y s t e m that b e a t s a s i m p l e b u y - a n d - h o l d strategy. B u t with a b u y - a n d - h o l d strategy, y o u are in the market 1 0 0 % of the t i m e , w i t h the s a m e a m o u n t of contracts for the entire period. W h a t if y o u , instead, c o u l d c o m e up with a strategy that only kept y o u in the m a r k e t 5 0 % of the t i m e , while the profit p e r contract traded only decreased 4 0 % ? To a s s u m e the s a m e effective risk as in the b u y - a n d - h o l d strategy, you n o w can trade t w i c e as m a n y contracts p e r t i m e units spent in the market, b u t w i t h only a 4 0 % drop in return p e r contract traded. T h e final net o u t c o m e , m e a s u r e d in dollars, is still 2 0 % h i g h e r than it w o u l d have been for the b u y - a n d - h o l d strategy.
T h u s , taking into consideration slippage a n d c o m m i s s i o n at this point, w h i c h favor s y s t e m s w i t h few a n d longlasting trades, only results in the risk for a s u b -optimal solution that can prove to be less profitable and robust w h e n you r u n your s y s t e m real-time. In a trending m a r k e t , t h e slippage a n d c o m m i s s i o n settings have a larger i m p a c t on your b o t t o m line, the lower the v a l u e of t h e m a r k e t . In C h a p t e r 1, a b o u t different p e r f o r m a n c e m e a s u r e s , we l o o k e d at h o w the dollar value of the m o v e s involved is likely to increase with t h e value of the market. Subtracting the s a m e cost for slippage a n d c o m m i s s i o n across all trades in s u c h a m a r k e t only low-ers t h e i m p a c t of t h e low-value trades even further. T h e s a m e goes for c o m p a r i n g different m a r k e t s w i t h each other. A n d finally, as already mentioned, in m o s t cases you s h o u l d n ' t even use dollar-based calculations w h e n y o u ' r e p u t t i n g your s y s t e m together. T h i s m a k e s the dollarbased slippage a n d c o m m i s s i o n a s s u m p t i o n s o b s o -lete as well.
First calculate the expected p e r c e n t a g e m o v e you are likely to catch, then transform that m o v e into dollar t e r m s in today's m a r k e t by multiplying by today's m a r k e t level a n d p o i n t value. T h e n d e d u c t the p r o p e r a m o u n t for slippage and c o m m i s s i o n . If this dollar value still looks good e n o u g h , you should take the trade.
PROFIT PER TRADE
Figure 2.4 s h o w s y o u the dollar profit for e v e r y t r a d e m a d e w i t h a s i m p l e stock i n d e x a n d b o n d s y s t e m traded o n historical d a t a for t h e S & P 5 0 0 stock i n d e x future contract, u s i n g dollar-based calculations. N o t i c e h o w the profits a n d