Thomas Stridsman Trading Systems That Work PDF
Thomas Stridsman Trading Systems That Work PDF
THAT WORK
Building and Evaluating
Effective Trading Systems
THOMAS STRIDSMAN
McGraw-Hill
New York San Francisco Washington, D.C. Auckland Bogota
Caracas Lisbon London Madrid Mexico City Milan
Montreal New Delhi San Juan Singapore
Sydney Tokyo Toronto
2. Portfolio management.
I. Title.
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
0987654321
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 covered. 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
by a
Declaration
Committee
of Principles jointly
of the American
and a
adopted
Bar Association
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 bookstore.
This book is printed on recycled, acid-free paper containing a minimum of 50% recycled, de-inked fiber.
DISCLAIMER
Hypothetical performance results have many 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 account will or
is likely to achieve profits or losses similar to those shown. In fact, there are
frequently sharp differences between hypothetical performance 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 performance results is that they are
generally prepared with the benefit of hindsight. In addition, hypothetical
trading does not involve financial risk, and no hypothetical trading record can
completely account for the impact of financial risk in actual trading. For
example, the ability to withstand losses or to adhere to a particular trading
p r o g r a m in spite of trading losses are material points which 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
markets in general or to the implementation of any specific trading p r o g r a m
which cannot be fully accounted for in the preparation of hypothetical
performance results and all of which can adversely affect actual trading results.
All trading systems and strategies in this book are intended for educational
purposes only, to provide a perspective of different market concepts. T h e y are
not meant to r e c o m m e n d or promote any trading system or approach. You are
advised to do your o w n research and testing to determine the validity of a
trading idea.
CONTENTS
INTRODUCTION xv
ACKNOWLEDGMENTS
xxiii
PART ONE
EVALUATING P E R F O R M A N C E
Chapter 1
Performance Measures
Total N e t Profit 4
M a x i m u m Intraday D r a w d o w n 5
A c c o u n t Size Required and Return on A c c o u n t 6
Average Trade 7
Largest W i n n i n g a n d L o s i n g Trades
7
Gross Profit and Gross Loss 8
The Profit Factor
8
Average W i n n i n g a n d Losing Trades
9
N u m b e r of (Winning/Losing) Trades a n d Average
N u m b e r of Bars per Trade
9
M a x Consecutive Winners a n d Losers a n d
Percent of Profitable Trades
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 Trade
17
Largest Winning/Losing Trade
20
Cumulative Profit and Equity Tops
Drawdown
23
Flat Time and Run Ups
25
Code
26
21
Chapter 3
Futures Contract Data
31
Nonadjusted Data
31
Point-based Back-adjusted Data
Ratio-adjusted Data ( R A D )
37
Multimarket Portfolios
38
Perpetual Contracts 41
32
PART TWO
SYSTEM CONCEPTS
47
Chapter 4
Picking Tops and Bottoms
Chapter 5
Data Mining
55
83
51
45
xi
Contents
Chapter 7
Following the Trend
85
M o v i n g Averages
86
D y n a m i c Breakout Systems
Standard Deviation B r e a k o u t
97
107
115
PART THREE
GETTING OUT
117
Chapter 8
Efficient Trades
Drawdowns
119
121
Chapter 9
Sweeney's MAE/MFE
Beyond M A E / M F E
143
156
Chapter 10
Adding Long-term Exits
167
T h e D y n a m i c Breakout System
168
T h e Standard Deviation Breakout System
Chapter 11
Working with Random Entries
187
T h e Gold D i g g e r System
191
T h e M e a n d e r System (Weekly Data)
T h e Black Jack System
204
A Few Final T h o u g h t s A b o u t Part 3
197
223
177
Contents
xii
PART FOUR
HIGH-PROBABILITY FILTERS
225
Chapter 12
Filtering
227
228
Chapter 13
Long-term Volatility Filters
T h e D B S System 2 4 6
T h e S D B System 2 4 7
T h e Directional Slope System
241
252
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
267
PART FIVE
MONEY MANAGEMENT AND
P O R T F O L I O C O M P O S I T I O N 269
Chapter 15
Money Management
271
282
xiii
Contents
Chapter 16
Portfolio Composition
321
331
Out-of-sample Testing
331
Altering the Inputs
334
A Few Final T h o u g h t s About Part 5
Back to the Future
342
INDEX
345
339
INTRODUCTION
After I had been an editor, writer, and technical analysis expert for Futures magazine for two years it b e c a m e apparent to me that the main mistake most people
m a k e in the trading industry is to believe that there is nothing to it; that it is a piece
of cake to put together a trading strategy and then go out there and m a k e the big
bucks, k n o w i n g nothing 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
systems simply do not work when traded on certain markets, why your worst drawdown is still to c o m e or w h y a system can work as it should but still break you. And
horrifyingly enough, this attitude s e e m s almost equally as c o m m o n a m o n g longtime professionals as a m o n g wanna-be amateurs.
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 money needs less efficient and less thoroughly researched trading methods. That there will be plenty of time to learn about m o r e "sophisticated" strategies
and market intricacies as their accounts grow. This is not so. M o n e y is money; you
are equally as likely to lose it, whether you are a long-time, multimillion dollar
m o n e y manager or are new to the g a m e with a $ 10,000 savings account, if the methods you are using won'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
know about trading and all the m o n e y that you have), than if you were sitting on millions of dollars, knowing everything there is to know about trading?
If you think that you do not have enough money or knowledge to do it the
right way from the very beginning, you should not trade. Period. Because if you do,
you will find that there will in fact be plenty of time to learn about the more
"sophisticated" m e t h o d s , but not while trading. Ask m e I had the opportunity to
experience this first hand.
Trading Systems That Work is for all of you traders out there, no matter what
your level of experience is, w h o have c o m e to realize that it is not as easy at it seems,
XV
xvi
Introduction
but still haven't been able to pinpoint the missing pieces that will solve the whole
puzzle. I would guess that what you believe is missing, or what is keeping you from
succeeding 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. This book is my most sincere effort to try to provide you with this overall
understanding, to help you solve the whole puzzle. Call me when you d o .
Today, I am primarily an analyst and writernot a trader, although I have
traded in the past and currently have a few systems out there, traded by others.
M a n y misinformed traders think that just because you are not a trader, you do not
know anything about h o w the markets work. In my opinion, nothing could be further from the truth. Just as good math skill is no guarantee of good language skill,
or good driving skill is no guarantee of good mechanical skill, good trading skill is
no guarantee of good analytical skilland vice versa for that matter. Furthermore,
being an analyst and writer also is a matter of choice: I simply cannot resist sitting
down in front of the computer and tinkering with something, then later trying to
write about it in one form or another.
As an analyst and specializing in systems a n d mechanical trading, I believe
it follows that I have the necessary trading skillsas long as I follow my o w n
strategies. If you do not believe m e , please continue reading and let me prove you
wrong. As you turn the pages, I will provide you with a set of useful tools based
on my personal and, I believe, highly innovative analysis techniques; all on a level
of sophistication a n d market knowledge widely surpassing most of what you can
find "out t h e r e " today.
Although I sometimes use scientific and academic jargonwords and phrases
such as standard deviation, kurtosis, and mathematical expectancyand s o m e times even indulge in the mathematics and calculus behind it all, I do not purport
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 book. In fact, I am
convinced that several of you will identify several situations where I expose my
ignorance in more topics than one. But that does not matter. The most important
thing that I will show you is that you do not need to be a rocket scientist to analyze
the markets successfully, but you must know a bit m o r e than what you have been
able to pick up from other books, 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 trying to explain something new, a teacher often finds himself in a
dilemma. 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 understand B and C. For the p u r p o s e of this book I have tried hard to keep it all in some
logical order and as simple as possible, but invariably there are instances where I
must talk about and explain two new subjects at the s a m e time. In other instances,
I have simply left a certain topic unexplained and gotten back to it later, in a m o r e
thorough analysis and explanation. On a few occasions, I also cheated a bit by
Introduction
xvii
oversimplifying things. I apologize for this, w i t h the explanation that I simply cannot give away the w h o l e store in one book. I h o p e you will bear with me and find
it worthwhile reading j u s t the s a m e .
Although I h o p e that you will perceive this as a practical book, it is not a
b o o k about a n e w set of ready-made technical analysis indicators, or a book about
foolproof trading systems, because there is no such thing. N o r is it a book that will
help you identify unique trading opportunities and show y o u how to exploit those
opportunities with a swift decision and then go do something else. And although
it might seem like it, it isn't even a book about n e w techniques or n e w ways to
develop trading strategies.
Instead, this is a book 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 thata 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 book 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 makes 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 "process
machine," where each decision m a d e automatically and immediately leads to the
next one, and next o n e , and next o n e . . . producing a long string of interacting decisions that form a never-ending p r o c e s s a l m o s t aperpetuum mobile. And, just like
a perpetuum mobile, the trading 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 must be put together or constructed with all the other parts in m i n d but also be a part of all other
parts. (This is the philosophical aspect of this book.) It is almost.. . N o , in fact, it
is exactly as if each part is both one 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, putting together a
good trading strategy is very m u c h like putting together, or buying, a good and
well-balanced car. While doing all this work, you also must think about your own
needs 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 Sunday
afternoon sightseeing drives with the family. N o r would y o u go and b u y a road
grader for the s a m e purpose. Instead you probably try to find a car that fulfills its
p u r p o s e for your everyday life, although you might think a station w a g o n or a mini
van a little boring when you know you really are the Lamborghini type. The s a m e
goes with trading strategies. First, you m u s t c o m e to grips with w h o you are and
what type of strategy is suitable for you, even if it is a little boring a n d leaves little r o o m for fast "overtaking m a n e u v e r s " or any other cool improvisations "behind
the wheel." In fact, my experience is that trading, at least systematic trading, is as
xviii
Introduction
boring as watching baseball without a beer in your hand a n d a few in your belly.
But the s a m e holds true for both the public roads and the trading rooms. They 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 engine that could be anything from a fast
intraday, market specific system (comparable to an 800 h.p., fast, N A S C A R - t y p e
engine) to a slow, long-term, universal system (comparable to a slow but steady
road grader engine). W h e n this is done, 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 purpose of the system in mind, I now try to find a way to get its force down to the ground as efficiently and safely as possible. Continuing with the car analogy, you know it is a
recipe for disaster if y o u try to fit the engine of a N A S C A R racer with the transmission of a station wagon.
O n c e the engine (the system) and the transmission (the m o n e y m a n a g e m e n t )
seem to be working 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 comparable to the
question of which markets to trade. In the case of a market-specific system, this is
already done (and a case of when subject C c o m e s before subject A ) . But whether
a strategy is market specific or not, it still is a good idea to make sure that it works
in as m a n y markets 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 system, as it is not to curve-fit the system to the markets.
There is a vast difference between a good system and a profitable system. It is
paramount to understand this difference. It also is very important to understand that
a good system can always be turned into a profitable system, while the opposite does
not necessarily hold true. This is because a well working system will usually work
well on a multitude of markets, catching the same type of moves, measured in percentage 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 have put together the car (the overall strategy) with its engine (the
system), the transmission (the money 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
your time and money. The 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 though
y o u know in your heart that you really are the Lamborghini type).
Although Trading Systems That Work is not one of those 13-in-a-dozen books
on day trading that s e e m s to s w a m p the market these days, everything said here
could be translated to day trading techniques as well. Neither is it a book specifically aimed toward any specific type of market, although I have m a d e extensive
use of the c o m m o d i t y futures markets in my examples. Instead, words such as
stocks, markets, and contracts should be looked at as s y n o n y m s .
Introduction
xix
XX
Introduction
that w i t h optimizing we are fitting the system to the data; with "optisizing" we are
fitting the bet size to the system. T h e less optimized your system is, the m o r e
"optisized" you can m a k e the strategy. " O p t i s i z i n g " will almost always do m o r e
for your bottom line than optimizing. M o s t of the work is with the help of a
spreadsheet program, a n d there will be plenty of e x a m p l e formulas a n d code that
you can copy and use in your own work. Before we round off the entire b o o k , we
also take a brief look at how to test a system for robustness to further increase our
confidence in it before we start using it in real life trading.
A few people have asked me w h y I am giving away my ideas instead of m a k ing the most of them myself. Well, the truth is that I think I am m a k i n g the most
of t h e m , because even if this b o o k all of a sudden tops The New York Times bestseller list, these systems and strategies won't be widespread enough to arbitrage
away what I will show you over the next few pages. W h y ? B e c a u s e , first of all, not
everyone w h o reads this will use it, because they w o n ' t feel comfortable w i t h it or
b e c a u s e they simply don't like working w i t h other people's ideas, but like to c o m e
up with ideas of their own. Second, even if they do use 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 them, because invariably they will c o m e up with
unthought-of ways of screwing things up anyway. A n d last but not least, because
the markets are m u c h bigger 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 therestrategies that help m a k e
these work.
In fact, I h o p e that these strategies will be widespread e n o u g h to reinforce
and feed on themselves, m a k i n g them 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 accomplice.
My only true enemy in this g a m e is myself. As in almost any other situation in life
there are a thousand-and-one ways I will be able to screw things up without your
help. So, the bottom line is that even if I give this away to you, the danger that
p o s e s to my future wealth and well-being amounts to nothing, compared to the
danger I p o s e to myself.
L a s t but not least, please read the following quotation by the renowned
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 contemplate it. Because if y o u do not understand, or do not a g r e e with it, there
is no need for you to continue:
" T h e key to ensure that you have a positive mathematical expectation in the future is to not restrict your system's degrees of freed o m . . . This is accomplished not only by eliminating, or at least
minimizing, the n u m b e r of optimizable parameters, but also by
eliminating, or at least minimizing, as many of the system rules as
possible. Every parameter you add, every rule you add, every little
adjustment and qualification you add to your system diminishes its
degrees of freedom. Ideally, you will have a system that is very
Introduction
xxi
Stridsman
ACKNOWLEDGMENTS
Never in my whole life did I think that I would get a chance to thank everybody
w h o has m e a n t so m u c h to m e , both professionally and personally. Inevitably,
thanking everybody would result in a thank-you note longer than the rest of the
book, so I just have to settle for a few very special and recent people. T h a n k s to
N e l s o n Freeburg and his family, and to Dan and M a r y a n n e Gramza, 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
magazine.
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.
Thanks 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 makes a trend" chapter in Part 4 and for
helping me refresh my micro- and macroeconomics proficiencies.
A very w a r m "thank y o u " also to Melissa L a n g e for teaching me everything
there is to k n o w about w h a t an open 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 throughout the years, know
that I am forever grateful.
A last minute thanks to Patty Wallenburg for being a great sport and of
tremendous help during the final editorial stages of putting this book together.
xxiii
PART
ONE
Evaluating Performance
PART 1
Evaluating Performance
other spreadsheet program. For c o m m o d i t y futures traders, it also is very important to use the right type of data a n d to r e m e m b e r that n o t all time series should be
treated the same.
CHAPTER
Performance Measures
W h i c h system-testing m e a s u r e s are likely to work and which are not? By necessity 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 good 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. This 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 measures in TradeStation's performance s u m m a r y a n d explains
which have some value, which don't, and which can be modified with the help of a
spreadsheet program. B u t before we go on, let us start with a little quiz.
If you can choose between b u y i n g two different stocks, one currently priced
at $12.50 and the other at $20, and you know for sure that the one priced at $12.50
will rise by 1.75 points over the next couple of days, while the one priced at $20
will increase 2.60 points (almost a full point more) over the same period of time,
which one would you choose? If you answer the $12.50 stock, you probably understand what I am hinting at and should have little trouble understanding this part of
the book.
If however, you answered the $20 stock, you probably are a little too anxiously chasing that elusive dollar. Just do the math. In this case, 12.50 divided by 20
equals 0.625, or 5/8. This m e a n s that for every 500 $20 stocks you buy you can use
the s a m e a m o u n t of m o n e y to buy, 800 $12.50 stocks. 500 times 2.60 points equals
1,300 points (or 13%) in profits if you b u y $10,000 worth of the $20 stock. 800
times 1.75 equals 1,400 points (or 14%) in profits if you b u y $10,000 worth of the
$12.50 stock.
If you think this difference isn't m u c h to worry about, what if you could
choose a m o n g 20 trades like this for the rest of the year, being able to use the profits from each trade in the next one? T h e n your initial $10,000 would grow to
3
PART 1
Evaluating Performance
$115,231 if you only b o u g h t the $20 stock, but to $137,435 if you only bought the
$12.50 stock. A n d w h a t if you could do this for three years straight? T h e n your initial $10,000 would grow to $15,300,534 if you only b o u g h t the $20 stock, but to
$25,959,187 if you only bought the $12.50 stock. This is a difference of m o r e than
$10,000,000 after only 60 trades.
A l t h o u g h these n u m b e r s are idealized, they illustrate t h e point that it pays
to take it easy and do the m a t h before y o u j u m p into a t r a d e . A n d it is exactly
this t y p e of m a t h that no m a r k e t analysis a n d trading software p a c k a g e s allow
y o u to d o .
Your maximum equity loss, or loss of capital, calculated over both open and closed out profits. The term intraday indicates that this drop in equity can start at any time, at any day, and end at any time, at any day.
CHAPTER 1
Performance Measures
In the stock market, to value a system by its total net profit can take on
absurd consequences 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 $90, and a trading system that consistently buys
and sells 100 stocks per trade shows a historical, hypothetically back-tested profit of $150,000. Tomorrow, after the stock has been split 3:1 and the stock is trading at $30, the historical, hypothetically back-tested profit has decreased to
$50,000. D o e s this m e a n that the system all of a sudden is three t i m e s as bad 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 the split you m u s t trade the stock in lots of 300 stocks
p e r trade to m a k e the new results comparable with old pre-split results. M a n y
times, however, w h e n we need to compare different markets, over different periods of time, and traded with different systems, it is not always this easy. T h e following chapters teach you how to work around this dilemma and build a welldiversified portfolio that is likely to hold up in the future and continue to provide
g o o d risk protection.
PART 1
Evaluating Performance
FIGURE
1.1
The performance summary for an early version of Black Jack/Meander system In TradeStation.
CHAPTER 1
Performance Measures
it is supposed to be calculated at one point in time (before you start trading) with
the hindsight from two totally different points in time (during trading for the worst
d r a w d o w n and when finished trading for total net profit). Perhaps even m o r e
important from a real-world point of view, no trader in his right m i n d would start
out with a trading account that is only expected to cover his worst historical drawdown, especially because this drawdown figure has no connection to the future
whatsoever and is very likely to be exceeded. T h u s , because there is no way to
k n o w your exact largest future drawdown or ending equity, you have no idea about
how large your trade account m u s t be and consequently no way of estimating the
return on your account either. Therefore, these two figures are completely u n n e c essary and provide you with no information whatsoever.
AVERAGE TRADE
O n e of the m o s t important things to consider before starting to trade any system
is the estimated average profit per trade in the future. Unfortunately, neither
TradeStation's nor MetaStock's performance summaries give you any such forward-looking information. Basically, what can be said about the total net profit
also can be said about the average profit per trade, at least as long as it is based
solely on historical dollar measures. W h e n it c o m e s to the average profit per trade,
however, the reasoning is that the trades that happened "way back when," when the
market was trading at a completely different level, will impact the value of the
average trade too m u c h . For instance, if the market has traded from 1,000 points
to 2,500 points, and y o u ' r e trading a system based on three profitable trades, o n e
for $ 1 0 0 when the markets was trading at 1,000; another for $200 w h e n the markets w a s trading at 2,000; and most recently, o n e for $150 when the market w a s
trading at 1,500, TradeStation will tell you that the average trade is $150. But this
is not what you can expect the average trade to be now, when the market has rallied and is trading considerably higher. F r o m this example it is not too difficult to
figure out that with the market trading at the 2,500 level, the next trade is expected to show a profit of $250. A m o r e disturbing example, however, can be seen in
Figure 1.1. H e r e the average profit per trade is $ 5 7 7 , while the true expected average profit per trade in today's market is $1,269 (as of October 1999).
PART 1
Evaluating Performance
hold no value as long as you can't put t h e m in relation to w h e n they happened and
where the market was trading at the time. Once this is known, the largest losing
trade can be used 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 system
itself. (Fixed fractional m o n e y m a n a g e m e n t is discussed in Part 5.)
CHAPTER 1
Performance Measures
M a n y system vendors and trading experts believe that you should not trade a
system with a hypothetically back-tested profit factor below three, because they
k n o w from experience that the profit factors for all their systems will decrease
considerably w h e n the system is traded live on u n s e e n data. Probably the only reason for this r e c o m m e n d a t i o n is that they do not understand how to build a robust
trading strategy in the first place. If nowhere else, this b e c o m e s evident w h e n they
continue to use the total net profit and drawdowns as their m o s t important performance evaluators. To build a robust trading system that is likely to continue to
perform in the future, m a k e sure that the underlying logic is sound and simple, that
the trading rules are as simple and as few as possible, and that the gross profit and
the gross loss are evenly distributed through time and in relation to each other. If
you m a n a g e to do all this, y o u will be surprised at how m u c h you can expect to
p r o d u c e from a system with a profit factor as low as 1.5, or even lower.
PART 1
10
Evaluating Performance
multiply the n u m b e r of w i n n i n g trades by the average n u m b e r of b a r s for the w i n ners. A d d this to the n u m b e r of losing trades, multiplied by the average n u m b e r of
bars for the losers. Finally, divide by the total n u m b e r of b a r s examined. U s i n g the
performance s u m m a r y above, this equals approximately 0.4, w h i c h m e a n s that you
will be in a trade only four days out of ten. Obviously, you also will be better off
the fewer and shorter the losing trades are.
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
that the system can be considered robust. Obviously you should try to keep this
n u m b e r as high as possible to feel comfortable with the strategy, but, as is the case
with 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 to the system's tradability and when picking the best m o n e y m a n a g e m e n t
strategy. In fact, sometimes it even is a good thing to keep this n u m b e r down in
favor of a higher n u m b e r of profitable m o n t h s for the overall strategy or portfolio.
Nonetheless, with this n u m b e r in hand, we now can put together a m o r e generic
formula to calculate the estimated n u m b e r of trades, N, to get out of a drawdown:
N = I N T ( D D A / (X * AW - (1 - X) * A L ) ) + 1, w h e r e
DDA = Drawdown amount
X = Likelihood of a winner, between zero and one
AW = Average w i n n e r
AL = Average loser
For example: If the average winning trade is worth $700, the average losing
trade $ 3 0 0 , and the likelihood of a w i n n e r is 4 5 % , then the estimated n u m b e r of
trades it will take to bring you out of a $2,500 drawdown is 17. Furthermore, if the
average trade length is five days and the total a m o u n t of time spent in the market
is 3 3 % , then it will take you an estimated 250 trading days (17
5 + 0.33) to get
out of the red again, not counting w e e k e n d s and holidays. That 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 good trades."
This equation shows that trading is a very deceptive business, and that we
h a d better m a k e sure that we know w h a t we are doing. N o t e also that in this e x a m ple we are working with dollar amounts and a fixed n u m b e r of contracts traded on
one market only. In u p c o m i n g sections, where we start working with percentages
a n d an ever-changing n u m b e r of contracts traded on a w i d e variety of both markets and systems, this matter b e c o m e s even m o r e complex.
CODE
T h i s chapter discussed which of TradeStation and MetaStock's performance s u m m a r y measures are likely to work and w h i c h are not. T h e only two measures that
you can put to immediate use are the profit factor a n d the percent profitable trades.
With the c o d e below, you can create a file that exports this information to a spreadsheet program, together with the time spent in the market. T h i s can c o m e in h a n d y
if you, for instance, want to compare the same system on a w i d e variety of markets, or several variations of the s a m e system on o n e market during the initial steps
of the building process. By interchanging the SysVer input with all your other
inputs, you can keep track of which version of the system each row refers to.
12
PART 1
Evaluating Performance
NumToStr(TotBars, 0) + NewLine;
FileAppend("C :\Temp\Chap 1-1 .csv", TradeStrl);
End;
CHAPTER
Better Measures
So far, most testing packages (and back-adjusted time series for the commodity
futures markets) have only allowed you to back-test your strategies using dollar values. This is all fine and well if you are only interested in how m u c h money you could
have m a d e had you been able to trade your strategy in the past. The main disadvantage with this way of testing, however, is that it tells you very little about how well
your strategy is likely to hold up in the future. To achieve this, a whole new set of performance 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
how to calculate this new set of performance measures in a spreadsheet program.
In essence, what you m u s t do is to calculate all the necessary values in percentage terms rather than in dollars or points. In this way, you will be able to perform m o r e accurate comparisons of how a system is likely to work in different markets and time frames. For instance, say that a market (the S & P 500) currently is
trading at 1,350 and that each point m o v e is worth $250. If this market rises 1%,
that move is worth $3,375 (1,350 X 0.01 X 250). But if the s a m e percentage move
happened " w a y b a c k when," w h e n the market was trading at 2 5 0 , a 1% move was
only worth $625 (250 X 0.01 X 2 5 0 ) . If the market value increases, it is likely that
the dollar moves increase as well, while the percentage moves are likely to remain
approximately the same. (For proof of this, see Figures 2.1 through 2.3.) T h u s , by
using percentage-based calculations, you give each and every trade an opportunity
to influence your strategy to an equal degree and you are able to build better and
m o r e reliable strategies, which are m o r e likely to hold up in the future. T h e same
reasoning can also be applied to a comparison of different markets with different
market values. O n c e you are done with your percentage-based calculations, you can
transform t h e m into dollar values based on w h e r e the market is trading today.
13
14
PART 1
FIGURE
2.1
The higher the market value, the higher the point-based volatility.
Evaluating Performance
CHAPTER 2
FIGURE
Better Measures
2.2
15
16
PART 1
FIGURE
2.3
Evaluating Performance
CHAPTER 2
Better Measures
17
18
PART 1
FIGURE
Evaluating Performance
2.4
es per trade have increased dramatically for the last h u n d r e d trades or so. In this
case, the average profit per trade c o m e s out to $ 7 5 5 , which also can be seen in
Figure 1.1. Now, contrast this to Figure 2.5, which shows the s a m e sequence of
trades but this time with percentage-based calculations. Notice h o w the profits
a n d losses per trade now are m u c h m o r e evenly distributed in time and c o m e out
to $ 1 , 2 6 9 , based on a 0 . 3 8 % average profit per trade and a m a r k e t value, (in
today's marketplace), of 337,500 (1,350 X 250). If you w e r e to start using this
s y s t e m today (and provided that it is robust a n d your reasoning is sound), this is
the average profit p e r trade that you could expect to m a k e in the i m m e d i a t e
future. N o t $ 7 5 5 , as implied by the performance summary. T h a t is, by m e a s u r i n g
the profit per trade in dollars, for a robust system, the value for both the profits
a n d the losses increases (decreases) at the s a m e rate at w h i c h the m a r k e t trades
higher (lower). T h i s in turn gives m o r e weight to the m o r e distant results and consequently lowers (raises) the value of the average trade. M e a s u r i n g the profit per
trade in p e r c e n t a g e s , however, all trades are given an equal weighting. For a
robust system, the percentage returns for both the profits and the losses stays the
s a m e no matter what the market is doing. O n c e the system building process is
over, it is easy to transform the average percentage return into a dollar value
applicable to today's m a r k e t situation.
CHAPTER 2
19
Better Measures
FIGURE
2.5
The same sequence of trades as in Figure 2.4 but with percentage-based calculations.
To calculate the percentage profit per trade in TradeStation you can use the
following Easy L a n g u a g e code:
Vars: TotTr(O), Prof(0);
TotTr = TotalTrades;
If TotTr > TotTr[l] Then Begin
Prof = 1 + PositionProfit(l)/(EntryPrice(l) X BigPointValue);
To export your data to a text file, the E a s y L a n g u a g e code is as follows:
Vars: Prof(0), TradeStr2("");
TradeStr2 = NumToStr((Prof - 1) XI00, 2) + NewLine;
File Append("C:\Temp\Chap 1 -2.csv", TradeStr2);
O n c e in Excel (or the spreadsheet p r o g r a m of your choice), type in the following formula at the b o t t o m of the column w h e r e the data are stored:
=AVERAGE(A1 :AX)
w h e r e A denotes the column for data stored and X denotes the n u m b e r of
rows/trades.
20
PART 1
Evaluating Performance
To calculate your average w i n n e r ( " > 0 " ) and loser ( " < = 0 " ) use the following formula:
=SUMIF(A1 :AX,">0")/COUNTIF(A1 :AX,">0")
If you also would like to calculate these values for the short and the long side
respectively, you m u s t first m u s t modify your E a s y L a n g u a g e export function to:
TradeStr2 = NumToStr(MarketPosition(l), 0) + "," + NumToStr((Prof - 1)
X100, 2) + NewLine;
Finally, to calculate the dollar value of all trades into today's market value,
multiply the results by the current trading level and dollar value per trade, either
in the s a m e or in an adjacent cell. If typed into the s a m e cell, the formula for the
average dollar value p e r trade would look like:
=AVERAGE(A 1: AX)/100 X 250 X1,350,
w h e r e 250 is the dollar value per point a n d 1,350 is the current trading level for
the S & P 500.
CHAPTER 2
21
Better Measures
market. This m e a n s , with 9 5 % certainty, the true average profit for this system
should lie somewhere within the interval $10,545 to $12,107. T h e smaller the
interval, the m o r e uniform the trades and the less risky the system. Notice, however, that in this case the interval stretches well into negative territory. This
explains why a seemingly good system suddenly can start to p r o d u c e large losers.
M a n y t i m e s the system has not b r o k e n down, but with a large n u m b e r of trades
m a d e on unseen data, it simply has m o v e d closer to its true average per trade,
which happens to be negative. To keep the standard deviation interval completely
in positive territory is virtually impossible, a n d I have yet to see such a non-curve
fitted system. In fact, I believe that the system that I ' m using here for demonstration p u r p o s e s is v e r y robust, with very uniform trades, and that it will continue to
stay in positive territory for m a n y years to c o m e , although it undoubtedly has a few
very scary features as well.
With this information in hand, you also can calculate the likelihood of failure
as the distance between the zero-profit line down to the lower standard deviation
boundary, divided by the total distance between the two standard deviation boundaries. In this case, it comes out to 0.46, or 4 6 % (= 10,545 / (10,545 + 12,107)).
Obviously, this too is a risk measure that you should try to keep as low as possible.
To get a better feel for w h a t you can expect from your system (less any freak
occurrences) and depending on w h a t type of system you're building/trading, it also
may be a good idea to w e e d out all outlayer trades before you continue to investigate it further. R e m e m b e r , however, that s o m e s y s t e m s ' sole p u r p o s e is to catch
as m a n y "outlayers" as possible, to m a k e up for long strings of expected small
losses. It also is questionable to w e e d out too m a n y (if any at all) losers and, hence,
fool yourself into believing that your system is better than it really is, especially
considering that you cannot rule out that the true, future value of the average trade
easily could be negative.
1
An outlayer trade is a trade that is judged to be so far away from the average trade that it can be considered a "freak occurrence". Usually trades that are more than three standard deviations away from the average trade are considered outlayers.
22
PART 1
Evaluating Performance
X 100,2) - NewLine;
FileAppend("C:\Temp\Chapl-2.csv",TradeStr2);
T h e plot in Figure 2.6 shows the cumulative, percentage-based equity curve for
a version of the Black Jack system. The trick is to m a k e all lines coincide with each
other as m u c h as possible and keep the " b o x e s " as small and as few as possible. T h e
squiggly line is the cumulative profit, the upper straight line depicts the latest equity peak, and the lower straight line is the latest equity drawdown.
T h e reason the cumulative profit is of lesser interest at this point is that as
long as the system is considered to be robust, with a stable profit factor a n d a constant relative a m o u n t of winners, a n d has a positive expectancy p e r trade b a s e d on
today's market value a n d less expected costs for slippage and commission, the
final equity g r o w t h is only a result of how aggressively you choose to trade it
and/or what type of m o n e y m a n a g e m e n t strategy you use.
Also, in the calculation above we are assuming that the entire equity, including
previously m a d e profits, is being reinvested each time. This is not all that correct,
especially not in the futures markets, but could be so in the stock market, provided
that you can b u y fractions of a share. W h a t it does allow you to do, however, is to
compare different systems and markets with each other on an equal basis, or test how
FIGURE
2.6
The cumulative, percentage-based equity curve for a version of the Black Jack system.
CHAPTER 2
Better Measures
23
your strategy would have held up compared to a buy-and-hold strategy over the same
time period.
DRAWDOWN
M a n y traders and analysts prefer to calculate the drawdown as the m a x i m u m intratrade drawdown, or total equity drawdown ( T E D ) , including both closed trade
drawdown ( C T D ) and open trade d r a w d o w n ( O T D ) in the same figure. To build a
robust trading system, however (as already mentioned in Chapter 1), this is not the
way to go about finding the optimal solution. T h e problem really consists of several parts. First, you must m a k e each and every trade as efficient as possible, by
dividing the O T D into the start trade drawdown ( S T D ) and the end trade drawdown ( E T D ) . This is achieved by a trade-by-trade efficiency analysis primarily
using John Sweeney's m a x i m u m adverse excursion ( M A E ) and m a x i m u m favorable excursion ( M F E ) techniques {Campaign Trading: Tactics and Strategies to
Exploit the Markets [Wiley Finance Editions, 1996] and Maximum Adverse
Excursion: Analyzing Price Fluctuations for Trading Management [Wiley Trader's
Advantage Series, 1997]).
O n c e this is done, you should have a trade m a n a g e m e n t technique that will
let you trade (at least marginally) profitably over a wide variety of markets, time
frames, and market conditions, no matter what entry technique you use. T h e n , a n d
only then, should you finalize your entry technique and start to look for a high
probability filter technique to c o m b i n e with your trade-by-trade management. The
drawdown n u m b e r s you then c o m e up with should be for closed out trades only.
As mentioned, the drawdown really isn't that interesting when it comes to deciding
whether a system is robust and profitable enough to trade. But that doesn't free you
from the responsibility to investigate it as thoroughly as you can to make sure that
you're properly capitalized when you start trading. Take another look atTradeStation's
performance summary in Figure 1.1. This system has a drawdown of $18,178.
"Great," you think: "I can stomach a drawdown of less than $20,000, and if I start out
with $60,000, the worst expected drawdown will only make up a third of my initial
capital." But nowhere does it say when in time this drawdown happened or how large
it was in relation to where the market was trading at the time (in this case it happened
during mid-1998, when the market was trading around the 1,000 level).
A good way to get a feel for the drawdown for any trading strategy is to chart
it as a so-called underwater equity curve, as in Figure 2.7, which shows the depth
of the historical drawdown. From this chart you can see that the worst equity dip
for this system is about 8%, which corresponds to approximately $27,000 in today's
market value (1,350 X 250 X 0.08). This, in turn would have taken away close to
5 0 % of your initial equity of $60,000, as mentioned above. If you do not want to
experience a drawdown of, for instance, one-third of your equity right off the bat,
you would need an initial trading capital of at least $81,000 were you to start trad-
24
PART 1
FIGURE
Evaluating Performance
2.7
The underwater equity curve measures the depth of the historial drawdowns.
ing this system today. To c o m e to the necessary conclusions, the drawdowns must
be measured in percentages and then transformed into today's market value.
O n l y the most risk-seeking people, w h o thrive on stomach aches and sleepless nights, would trade a system with an expected drawdown closing in on 5 0 %
of their equity. That is in addition to all those w h o do not know that the expected
d r a w d o w n of their system usually is m u c h higher than w h a t their system trading
software's performance s u m m a r y tells them. R e m e m b e r also that your worst drawdown is always still to c o m e . In fact, not only is your worst drawdown still to
c o m e t h e truth is that you will eventually be completely w i p e d out. It is only a
question of h o w long you stick around. If we all stick around long enough, the
probabilities have it that we all will be w i p e d out sooner or later. It is j u s t a matter of time. T h e trick then, is to do your homework as well as possible so that you
can keep disaster in front of you and quit while you are still ahead. (Or, as in the
case above, avoid getting started in the first place.)
This little piece of TradeStation code shows you h o w you can export the n e c essary drawdown information for your closed out trades to a text file for further
analysis in Excel:
Vars: CumProf(l), EBot(O), EDraw(O), TradeStr2("");
EBot = MinList(EBot, CumProf);
CHAPTER 2
Better Measures
25
FIGURE
2.8
The flat time measured as the time spent between two equity highs.
PART 1
26
Evaluating Performance
we define it.) A good system should have a m a x i m u m flat time of no longer than
18 months. In this case, with a flat time of little m o r e than 4 0 0 days, we c o m e pretty close to w h a t is tolerable.
If you started to trade this system just prior to this drawdown, y o u would
have started out losing, stuck it out for approximately 1.5 years just to get your
m o n e y back, a n d eventually broke even. But d o n ' t despair; drawdowns are simply
something you have to learn to live with and the truth of the matter is that even the
m o s t robust and profitable trading strategies will keep you feeling on your way
d o w n m o r e often than on your way u p .
To chart the time spent between two equity highs and to calculate the average, you m u s t add the following E a s y L a n g u a g e code (which also allows you to
calculate the time spent between equity lows) to the system:
Vars: Etop(0), TopBar(O), EBot(O), BotBar(O), TopInt(O), Botlnt(O);
IfETop > ETop[l]Then
TopBar = CurrentBar;
IfEBot < EBot[l]Then
BotBar = CurrentBar;
Toplnt = CurrentBar TopBar;
Botlnt = CurrentBar - BotBar;
TradeStr2 = NumToStr(TopInt, 0) + "," + NumToStr(BotInt, 0) + NewLine;
FileAppend("C:\Temp\Chap 1 -2.csv", TradeStr2);
T h e average time for this system spent in a flat is 86 bars, and the average
time between equity lows is 66 bars. In "psychological t e r m s " this m e a n s that only
about four times per year, on average, will you be allowed to feel like a really successful trader, setting a n e w equity high; you will spend five times every year feeling really rotten, setting a new equity low before the markets finally start to move
your way again.
M o s t institutional investors will not tolerate a drawdown over 30 to 3 5 % of
total equity, or a m a x i m u m flat time of m o r e than 18 months. So, if you are aspiring to selling services to the "big money," these are the measures within which you
m u s t keep yourself.
CODE
In this chapter we looked at how to build a new set of system testing measures that
give you m o r e realistic results that are m o r e likely to hold up in the future. T h e
most important m e a s u r e s w h e n you are building your system are average expected profit p e r trade and largest expected losing trade. Others, like the expected
d r a w d o w n and expected flat time, are only of interest from a psychological point
of view, as long as you can keep t h e m within tolerable levels. However, all vari-
CHAPTER 2
27
Better Measures
28
PART 1
Evaluating Performance
FileAppend(FName, TradeStr2);
End;
O n c e you have exported all the necessary data into Excel or any other
spreadsheet program, you can use it to put together your own performance s u m mary, which will be m u c h m o r e telling about your system than any other performance s u m m a r y you are likely to find in any other program. F r o m n o w on, we
will work extensively with a type of performance s u m m a r y that resembles that in
Table 2 . 1 .
To put together a performance s u m m a r y like this, type the following formulas into your spreadsheet p r o g r a m :
For the average percentage profit, in cell C ( X + 4 ) :
=AVERAGE(F$2: FX)/100
where F denotes the c o l u m n w h e r e you have stored the profit from each individual trade, and X denotes the n u m b e r of rows/trades.
For the standard deviation in percent, in cell C ( X + 5 ) :
= STDEV(F$2:FX)/100
For the n u m b e r of winners, in cell F ( X + 2 ) :
,,
=COUNTIF(F$2:FX, >0"),
For the largest (%) winner, in cell F ( X + 3 ) :
=MAX(F$2:FX)/100
For the average (%) winner, in cell F ( X + 4 ) :
=SUMIF(F$2:FX,">0")/COUNTIF(F$2:FX,">0")/100
For the cumulative (%) profit, in cell F ( X + 5 ) :
=GX/100
w h e r e G denotes the c o l u m n w h e r e you have stored the cumulative profit.
For the n u m b e r of losers, in cell I ( X + 2 ) :
TABLE
2.1
150
Profit factor
1.80
Winners
Lrg winner
Avg profit
0.38%
1,269
Avg winner
St Dev
1.61%
5,421
Cum profit
92
61.33%
58
38.67%
4.88
16,470
Losers
Lrg loser
-5.74%
-19,373
1.38
4,667
Avg loser
-1.22%
-4,121
74.12
250,155
Drawdown
-7.76%
-26,190
CHAPTER 2
Better Measures
29
=COUNTIF(F$2:FX,"<=0")
For the largest (%) loser, in cell I ( X + 3 ) :
MIN(F$2:FX)/100
For the average (%) loser, in cell I ( X + 4 ) :
=SUMIF(F$2 :FX," <=0")/COUNTIF(F$2:FX," < = 0 " ) / 1 0 0
For the largest (%) drawdown, in cell I ( X + 5 ) :
=MIN(L$2:LX)/100
w h e r e L denotes the c o l u m n for w h e r e you have stored the drawdown.
For today's dollar value of the average trade, in cell D ( X + 4 ) :
= C ( X X 4 ) X 1350X250
w h e r e 1350 denotes today's index value, and 250 denotes dollar value per point.
For today's dollar value of the standard deviation, in cell D ( X + 5 ) :
= C ( X + 5 ) X 1350X250
For the n u m b e r of trades, in cell D ( X + 2 ) :
=F(X+2)+I(X+2)
For the percentage of winners, in cell G ( X + 2 ) :
=F(X+2)/D(X+2)
For today's dollar value of largest winner, in cell G ( X + 3 ) :
= F ( X + 3 ) X 1350X250
For today's dollar value of average winner, in cell G ( X + 4 ) :
= F ( X + 4 ) X 1350X250
For today's dollar value of the cumulative profit, in cell G ( X + 5 ) :
= F ( X + 5 ) X 1350X250
For the percentage of losers, in cell J ( X + 2 ) :
=I(X+2)/D(X+2)
For today's dollar value of largest loser, in cell J ( X + 3 ) :
= I ( X + 3 ) X 1350X250
For today's dollar value of average loser, in cell J ( X + 4 ) :
= I ( X + 4 ) X 1350X250
30
PART 1
Evaluating Performance
CHAPTER
NONADJUSTED DATA
With the nonadjustment method, you simply stop charting o n e contract when it
expires or w h e n you otherwise d e e m it justifiable to do so and continue to chart the
next contract in line, w h i c h n o w is the new front contract. Usually, this coincides
with w h e n the market as a whole moves from one contract to the next, resulting in
31
32
PART 1
Evaluating Performance
an increase of the open interest for the n e w front contract surpassing the open
interest for the old contract. M a n y traders, however, prefer to roll over on a certain
day of the month or when there are a certain n u m b e r of days left on the life of the
old contract. If there happens to be a difference in price between the new and the
old contract, it is left unadjusted.
T h e m a i n advantage of the nonadjusted time series is that, at each point in
time, it shows you exactly how the front contract at that particular time w a s traded, with all trading levels and price relationships intact and exactly as they
appeared in real life. Figure 3.1 illustrates w h a t this looked like for the D e c e m b e r
contract on the S & P 500 index during the crash of 1987. F r o m the high of 333 on
October 2, the market fell a total of 152 points, or $38,000 (152 X 2 5 0 ) to the low
of 181 on October 20. In percentage terms, this equals a drop of 4 5 . 6 % (152 / 333)
of the total market value ( r e m e m b e r these n u m b e r s ) .
T h e m a i n disadvantage of the nonadjustment m e t h o d is the difference in
price that frequently appears on the day of the roll, which will distort your backtesting results. Therefore, nonadjusted data is best for day traders or other c o m modity futures traders with very short trading horizons, w h o m o r e often than not
close out all their trades at the end of the day. With the TradeStation code provided in Chapter 1 and 2 it is easy to export all trading results from several different
and separately tested contracts into the same spreadsheet for a c o m b i n e d analysis.
CHAPTER 3
FIGURE
3.1
33
34
PART 1
FIGURE
3.2
Evaluating Performance
CHAPTER 3
35
4 1 5 . 3 5 , for a total difference of 152 points. B e c a u s e of the transition upward, however, the original percentage difference of 4 5 . 6 % n o w has decreased to 2 6 . 8 % (152
/ 567.35). What's m o r e , for each roll all these contract values will continue to
change slightly, presumably upward, resulting in an ever-decreasing percentage
difference.
This continuing decrease (increase) of the relative importance of historical
moves in an up-trending (down-trending) market a n d markets that are traded at a
p r e m i u m (discount) is the m a i n disadvantage of the point-based back-adjusted
contract. For instance, if the 2 6 . 8 % d r o p a s implied by the back-adjusted contractwere to be used to calculate the dollar value of the drop from the actual top
of 3 3 3 , we would c o m e up with $22,311 (0.268 X 333 X 250) instead of $38,000
(0.456 X 333 X 250). Therefore, to keep the relative importance of all historical
moves constant, they m u s t be viewed in percentage terms. By the s a m e token,
those w h o claim that the volatility of the stock market has increased over the years
and, therefore, has b e c o m e m o r e difficult to trade, do not k n o w what they are talking about. Yes, the dollar- or point-based volatility has increased considerably, but
this is only a natural consequence of the market's trading higher.
Viewed in percentage terms, the volatility, if anything, actually has decreased
somewhat. This is illustrated by Figures 2.1 through 2.3, which show a nonadjusted monthly chart of the nearest future on the S&P 500 index, covering the period
late 1985 to late 1999, together with the absolute monthly changes in points and
percentages, relatively. If we look at Figure 2 . 1 , it seems that the price bars have
b e c o m e wider and wider in recent time, indicating that the market has b e c o m e m o r e
volatile and difficult to trade. This is only a consequence of the increasing market
value, however, a n d should prove no problem if dealt with properly.
T h e straight lines that run through the two latter charts are best-fit regression
lines. As you can see, the regression line for the absolute point changes has
increased over the years from close to 0 to over 30 points p e r month. Contrast this
to the regression line for the absolute percentage change, which has stayed approximately constant (the slope is slightly down) around 3 . 5 % p e r month. That is,
measured in dollars or points, the volatility has indeed increased considerably over
the years, as the regression line in Figure 2.2 indicates. But, measured in percentages, the volatility has stayed approximately the s a m e since late 1985. In fact, if
anything volatility has decreased somewhat.
W h a t immediate consequences does this have for you as a trader? Well, aside
from those topics discussed in the previous chapters, one important thing to
r e m e m b e r is never to use dollar- or point-based stops. Consider, for instance the
following example:
U s i n g TradeStation, a $5,000 m o n e y m a n a g e m e n t stop (equal to approximately 1.5% of current market value, with the market trading around 1,350) a n d a
$10,000 trailing stop (approximately 3% of current market value) were added to a
standard breakout system. In back-testing this system on nonadjusted S & P 500
PART 1
36
FIGURE
3.3
Evaluating Performance
CHAPTER 3
37
data, covering the period January 1983 to April 1999, it took 55 trades (out of a
total of 197 trades) before any of these stops got hit in October 1987. After this, it
t o o k another 35 trades before they were hit again in October 1990, only showing
up again in M a r c h 1996. F r o m t h e n on, however, the hits b e c a m e m o r e frequent;
for the period D e c e m b e r 1996 to present, 25 out of 33 trades were stopped out, and
from July 1998 to present, 13 out of 13 trades w e r e stopped out this way.
i o l d
X(l+(C-c)/C)
Where:
c
inew
ioid
38
PART 1
Evaluating Performance
B.
C.
D.
N o n e of the above
MULTIMARKET PORTFOLIOS
T h e benefits of the R A D contract also b e c o m e evident when you want to put
together a multimarket portfolio. We discuss multimarket portfolios and trading
strategies in m o r e detail in Part 5. For now we only state that the percentage-based
calculations do not take into consideration h o w m a n y contracts y o u ' r e trading and,
therefore, give each market an equal weighting in the portfolio. Let us look at the
following example:
U s i n g a regular 20-day breakout system that is always in the market, I h y p o thetically traded the Japanese yen and the S & P 500 over a period of 10 years,
resulting in 71 trades for the Japanese yen and 79 trades for the S & P 500. Figure
CHAPTER 3
39
3.4 shows what the individual and c o m b i n e d equity curves would have looked like
had we b e e n able to place all these trades for real, trading o n e contract. In short,
the Japanese yen would have e n d e d up with a profit of close to $60,000, and the
S & P 500 with a profit of approximately $20,000, resulting in an overall profit for
the portfolio of about $80,000. However, to m a k e results comparable between the
two markets and at the same time relevant to today's markets, we m u s t look at how
m u c h a percentage m o v e in each market is worth today. It turns out that a 1% move
in the S & P 500, in today's market, is worth approximately $3,275, but only $1,200
in Japanese yen. H e n c e , had you been able to place all trades in today's markets,
you would have had to trade approximately five Japanese yen contracts for every
two S & P 500 contracts (3,275 / 1,200), which in turn would have resulted in an
overall profit of approximately $240,000.
Now, wait a minute, you say, those results are purely hypothetical. H o w can
I place all the trades in the same market at presumably the s a m e point in time?
Well, you can't, so that is a good and valid question; but let me ask you, can you
place any of these trades for real, no matter how you do it? N o , of course not. They
all represent foregone opportunities. Isn't it better then to at least place t h e m h y p o thetically in today's marketplace to get a feel for what might happen today, rather
than in a ten-year-old market situation to get a feel for how the situation was back
FIGURE
3.4
PART 1
40
Evaluating Performance
then? I think we all can agree that it is better to k n o w w h a t might happen today,
rather than what h a p p e n e d ten years ago.
Nonetheless, this is looking good. By m a k i n g the profits from the two markets m o r e comparable to each other we have raised the total profit from $80,000
to $240,000. W h a t we forget, however, is that this relationship changes with time,
something we have not taken into consideration in the above example.
Furthermore, from the previous chapters we k n o w that only looking at hypothetical dollars m a d e is not the m o s t efficient way to j u d g e a trading strategy. A n d
because both the dollar moves and the contract relationships between different
markets are constantly changing, we m u s t put together a chart based on the (cumulative) percentage moves we would have been able to catch. As you can see from
Figure 3.5, this results in an approximately 4 0 % c o m b i n e d move in the right direction (the market moved in favor of our position) for the Japanese yen, but in an
almost 2 5 % c o m b i n e d move in the w r o n g direction (the market moved against our
position) for the S & P 500, resulting in an overall c o m b i n e d move that barely m a n aged to reach a profit of 5 % . (To understand how a 4 0 % positive m o v e and a 2 5 %
negative m o v e can end up being close to zero, multiply 1 by 1.4 (1 + 0.4) and then
by 0.75 (1 - 0.25), that is: 1 + 4 0 % - 2 5 % = 1 X 1.4 X 0.75 = 1.05 = 1 X (1
- 0.05) = 1 + 5%.)
FIGURE
3.5
The results from a multi-market portfolio traded on a percentage basis with compounded returns.
CHAPTER 3
41
PERPETUAL CONTRACTS
No matter h o w good the back-adjusted contracts are there is a certain situation
w h e n n o n e of them should be used. That is when you m u s t c o m p a r e the developm e n t of two different markets, p e r h a p s to find the one that seems to have the
strongest relative strength. T h i s is because none of these contracts stays stationary
in time, but each is recalculated each t i m e there is a roll from one contract to the
next, which in turn can lead to perceptual changes in the historical relationship
between the markets.
Figure 3.6 shows a ratio spread between the S&P 500 and the T-bill, as it is
perceived to have looked in D e c e m b e r 1984, using the point-based back-adjusted
contract. W h e n the squiggly line is below its fast and slow moving averages, the
trend for the spread is down a n d the T-bill can be expected to outperform the stock
market and, in this case, trigger a short position in the S & P 500 futures. Overall,
this looks like a smooth ride with few erroneous signals a n d whipsaw trades,
w h i c h leaves plenty of r o o m for a quick buck, trading the S & P 500 from the short
side. Now, look at Figure 3.7, which shows you the s a m e market action, as it
looked in D e c e m b e r 1984, through the actual contracts traded at the time. This is
what you actually would have seen had you monitored this spread at the time. This
time the picture is no longer as clear, with m o r e j a g g e d curves and several w h i p saw trades.
W h a t looked like a fairly smooth ride w h e n looked at through the pointb a s e d back-adjusted contracts, turns out to be a little bit m o r e j a g g e d a n d dangerous w h e n looked at through the original contracts as they actually were trading at
the time. T h e difference in the two pictures is caused by the back-adjustment
process in combination with the ratio calculation, which also adds s o m e smoothing to the historical data. This can be very deceiving if you're not aware of the
problem and might m a k e you build trading systems that will not work as well as
they seemed to have done in the past. Worse yet, they might not work at all because
the underlying assumption for your strategy was not there in the first place.
To work a r o u n d this problem, you m u s t put together a so-called perpetual
contract that stays stationary in time, despite the rollovers. That is, once a historical value is calculated, it stays the same. T h e m e t h o d for calculating a perpetual
series m a d e up of two contracts (the nearest contract and the second nearest contract) is as follows:
First set a forward quote day a certain n u m b e r of days in the future and keep
this n u m b e r of days constant as time passes. Then calculate the n u m b e r of days
PART 1
42
FIGURE
3.6
A spread between two markets put together using point-based back-adjusted contracts.
Evaluating Performance
CHAPTER 3
FIGURE
3.7
A spread between two markets put together using the actual contracts at the time.
43
44
PART 1
Evaluating Performance
between the expiration days for the two contracts a n d the forward quote day. W h e n
the distance to the forward quote day is kept constant (i.e. roll it forward one position for every new bar) the relative distance for the two contracts in relation to this
day changes for each day. Finally, multiply the relative distance for both contracts
by their respective prices and add t h e m together, for today's perpetual price. T h e
closer the nearest contract c o m e s to expiration, the less weight it gets. W h e n it
expires it b e c o m e s 0; the second nearest contract is now the nearest contract, and
the third nearest contract is the n e w second nearest contract.
PART
ONE
This part started out by taking a closer look at which system testing measures are
m o r e useful than others, and why it could be a good idea to expand the analysis
work a bit with the help of a spreadsheet program, like MS Excel or Lotus 1-2-3.
To properly evaluate a trading system, it is of paramount importance to use a set of
universal measures that give an equal weighting to all the trades, no matter where
and when they are derived. To accomplish this, it also is important to use the right
type of data. As we have seen, not all data can be used all the time; knowing when
to use what is vital in building a robust and profitable trading system.
Later chapters take a closer look at how to evaluate a system or a strategy that
is already up and running, to m a k e sure that it stays on track and performs as it
should. Before we go any further in the evaluation process, we need a couple of systems to trade. Building a system suited for a specific type of market action or trading perspective is the major topic in the next section.
45
PART
TWO
System Concepts
In the first part, we discussed a few important concepts to understand and think
about before the system building process can begin. Unfortunately, however, it does
not stop there. There is m o r e than one thing to think about w h e n trying to put
together a mechanical trading strategy. Aside from the psychological a s p e c t s
whether the system fits your style of trading, personality, trading budgetseveral
other m o r e technical questions m u s t be answered as well. Before we can start
designing and investigating any trading system, we must understand what it should
try to accomplish.
We must know if the trading methodology should be long-term, short-term, or
perhaps even intraday. Should the system be market specific or tradable over a wide
variety of markets? If the system is a multimarket system, h o w should it be built
and tested so that all the markets have an equal impact on the final result? Should
we try to capture a certain type of trending move, or should we try to capture the
shorter-term moves within a previously defined trend? Or are we trying to a c c o m plish something completely different, like arbitraging o n e market or contract month
against another, or buying or selling volatility with the help of options? T h e n there
is the question of what type of m o n e y m a n a g e m e n t strategy to use, and w h e n this
should be taken into consideration.
But even before these fundamental questions can be answered, there is a set
of basic questions of a m o r e philosophical character, which must be addressed
a n d i f not answeredat least contemplated. W h a t is long t e r m and short term? Or
what is high and low? There really are no generic, r e a d y - m a d e answers to these
questions, because long t e r m for me might be short t e r m for you, and something
completely different for s o m e o n e else. Whatever your answer is, it is correct for you
and not for anyone else to question.
47
48
PART 2
System Concepts
Before you answer, however, here is some food for thought: w h a t if, instead
of measuring long-term or short-term market activity in regular time units, such as
minutes, hours, or days, you were to m e a s u r e it in n u m b e r of bars (market time
units) encapsulating as m u c h time (regular time units) as you d e e m necessary? Or
perhaps, long t e r m and short term simply should be defined by the system, where
a breakout-type system is always considered long term while a top-and-bottom
picking system is always considered short term, no matter for how long the trade
actually lasts, whether measured in regular time units or market t i m e units?
A n o t h e r important thing to consider before researching a trading system (and
a c o m m o n l y debated question a m o n g system builders) is whether it is a good idea
to save some of the data for out-of-sample testing. T h e answer is that it depends
on the system and its underlying assumptions; m a n y times it shouldn't m a k e any
difference. In a correctly built system, y o u ' r e interested in exploiting something
that should, on average, work well in several different markets and over several different t i m e periods, not with any specific type of anomaly that might or might not
still exist in a particular market. By saving some of your data for out-of-sample
testing, you can strengthen your trust in the m o d e l , but in doing so, you also use
up valuable data that could have added even further to the robustness of the system. Only you can m a k e that choice. T h a t said, in m a n y of these examples, we
work with an out-of-sample period for comparative reasons. Whatever you choose,
it is important to r e m e m b e r that by necessity 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 good use as possible out of
these data and m a k e your evaluation measures as forward looking as possible.
Building systems is no easy matter, and you h a d better k n o w the o d d s against
you before you get started. For instance, if you only traded the S & P 500 index
approximately every fifth day (I picked out all days randomly 20 times, calculated the c o m p o u n d e d returns, and averaged the results), between M a y 1992, and
October 1999, and if you could have been absolutely sure that all these days would
have been d o w n days, you would have m a d e a w h o p p i n g 71 times the index. If you
instead h a d b e e n able to pick the same a m o u n t of up moves, you would have m a d e
an incredibly 161 t i m e s the index. This tells us that we are m u c h better at going
with the underlying trend (as it undoubtedly has been up during the last few years),
and if we can only t e m p e r ourselves and trade only on a few selected days, the
rewards can be v e r y good. No wonder day trading is such an alluring business. But
rewards like this do not c o m e without a price. T h e above examples assume that we
can be 1 0 0 % sure of the move, but what if we can only be 5 0 % sure? Well, then
the expected return sinks to only 0.25 t i m e s index, if going long only, or to a mere
0.11 times index, if going short only.
Similarly, if y o u ' r e a long-term trader and prefer to c o m p a r e yourself to a
buy-and-hold strategy, you could have increased you return to 4.9 times the index,
had you been able to stay out of the market every 20th d a y i f you also were
absolutely sure that day also was a down day. But if you only were 5 0 % sure about
CHAPTER
52
PART 2
System Concepts
but because of the way it is constructed you cannot channel any information from
one market to another. To give all moves an equal importance, and to derive the necessary input for your calculations, it is of paramount importance that you only use
percentage-based calculationsand if you are a futures trader, also use the newly
invented R A D contract (see "Data Pros and Cons," Futures magazine, June 1998,
and "Truth Be Told," Futures magazine, January 1999). In a trending market, the
dollar value of the magnitude of the moves changes with the market value, so that if
the market is in an up trend, with a steadily increasing market value, the dollar- or
point-based move is likely to increase as well. T h e relationship between the moves
and the market value stays the same, resulting in a average percentage move that is
m o r e likely to stay the same, no matter at what level the market is trading. This is
also the contract you need as soon as you start to work with any type of percentagebased decisions, such as rate-of-change analysis or percentage-based stops.
Notice that the key words here are "equally w e l l " instead of "equally profitable." To build a trading system that continues to work equally well in the future
as it did during the building process, w h e n it w a s hypothetically traded on historical data, it also is important to understand the difference between a good working
system and a profitable system. Furthermore, once this is fully comprehended, it
is even m o r e important to understand w h y a good working system is not necessarily a profitable system, but why a profitable system always m u s t be a good system. T h e s e key concepts that will be stressed continuously throughout this book.
W h e t h e r a good working system will be profitable or not has nothing to do
with the system, but rather with the level at which the market is currently trading
a n d the dollar value of that level. For instance, suppose the dollar value of the S & P
500 futures contract were to be lowered from today's $250 per point to $2.50 per
point. H o w many S & P 500 systems would still be profitable in the future, or even
test profitable in hypothetical back-testing? Probably not many. T h e point is that
the actual value of the market and its move is a technicality decided by the
exchange, which has nothing to do with whether the system is good at capturing
the moves of the market.
D u r i n g the building process, the actual dollar values are of no concern.
Instead, we focus on the universal measures: the profit factor, the percentage
move, and the n u m b e r profitable trades. To m a k e sure the results do not differ too
m u c h between markets, we also look at the standard deviations of all these measures. T h u s , a well-working s y s t e m a good systemis a system that captures as
m a n y and as large moves as possible in any and all market environments, as m e a s ured with a universal m e t h o d like those mentioned. For a system to be profitable,
however, it must be traded in a market where the moves it is designed to catch also
are worth taking. This has nothing to do with the system, but rather with the level
at which the market currently is trading and the dollar value of that level.
Once you k n o w what to look for in terms of the data and the different measurements, you also must figure out exactly what it is you would like to do. That is,
CHAPTER 4
53
should you only take trades that go in the s a m e direction as the longer-term underlying trend, or should you also look for counter-trend moves? Whatever your
answer, you then m u s t ask yourself whether you should try to anticipate the turning
point with an early limit-order entry; or play it a little safer and look for proof that
the preceding m o v e has run its course, and then enter with a stop? Furthermore,
once you're in the trade, should you then try to ride it for as long as possible, or
should you only go with the short-term thrust and perhaps exit m a n y of the winners
with a limit order at a specific price or after a move of a certain magnitude?
In this chapter, we took a closer look at a few different system ideas that all
have a high likelihood of producing a large n u m b e r of profitable trades for a
decent overall profit. T h e first two are a couple of market-specific data m i n i n g
systems, w h e r e we only are interested in the specific characteristics of that particular market, or group of related markets, although it is fully possible and realistic
to apply both the research technique and the systems to any market. T h e next is
based on a proprietary indicator perhaps best described as a mix b e t w e e n percentage-based analysis, Bollinger b a n d s , and pivot-points. T h e last system, which really is only a demonstration of how to c o m e up with a good set of exit rules, I have
given the n a m e Black Jack, because of its ability to m a k e u s e of small statistical
advantages, w h i c h are the s a m e for all markets, in an attempt to p r o d u c e long-term
profits out of several smaller a n d sometimes just barely profitable trades. It is
especially designed to w o r k well together with m o r e advanced m o n e y m a n a g e m e n t strategies, s u c h as Ralph Vince's Optimal f, or fixed fractional investing. (In
Part 3, we will continue to work with different ways of deriving exits, which we
then apply to all our systems.)
CHAPTER
Data Mining
W h a t will the market do today? E a c h day we ask our fellow trader friends and ourselves the same old question, and each day the market answers us at the end of the
day. One would think that after having asked the question and observed the answer,
say, a couple of thousand times or so, we either would learn the answer or stop wasting time pondering the question. Yet, we keep on asking and each day the market baffles us, by always behaving m o r e or less out of sync with what we had expected.
O n e day the stock market is behaving exactly as anticipated, except for that
little dip after lunch that had us stopped out with a loss. W h i c h , by the way, reminded almost everybody about how the T-bond used to behave a couple of years ago,
w h e n the typical characteristics of the European currency crisis were casting their
shadow over the financial world. Then, the next day, the very same market behaves
in a way never seen before. Except for your b u d d y Joel that is, w h o traded the grain
and meat markets back in the 1970s and therefore recognizes the similarities to how
the corn market used to behave back then.
T h e point I am trying to m a k e here is that it's very difficult to distinguish the
behavior of one market from that of another, and the very s a m e second that we
think w e ' v e nailed it, it all changes and the experience gained loses almost all its
value. Let's face it: can you really say that the stock market today behaved exactly
as the stock market usually does, or w a s it m o r e like the recent coffee market or the
lumber market in the 1980s? And, if it behaved like the coffee market, is the recent
behavior for the coffee market really typical for coffee at this time, and on and on
and on? Is there really a specific, consistent behavior for each and every market,
and, if so, can it be traded profitably? To find out you m u s t e x a m i n e each and every
market very carefully and ask yourself an a b u n d a n c e of questions:
55
56
PART 2
System Concepts
For h o w long does a typical trend last? W h a t are the typical characteristics of
any corrections? W h e n can a m o v e be considered to have g o n e too far? W h a t is
the likelihood for a certain amount of days in a row in the s a m e direction? A n d
m o s t important: h o w can you benefit from this information and i m p l e m e n t it in
your arsenal of existing trading tools? T h o s e are only s o m e of the questions to ask
when you start m i n i n g your data to c o m e up with high-probability trading opportunities; or at least, in trying to avoid the m o s t obvious bad ones.
For example, if the market has been in a down trend for four m o n t h s straight
but you k n o w that a typical d o w n trend should last for only two months, it probably isn't too good an idea to a d d to your position w h e n your breakout system signals that you once again should go short. Granted, the market might have changed
from w h a t is typical for o n e market to what is typical for another, but at least you
still have the long-term statistics on your side. Alternatively, if you already are
short, perhaps it is a good idea to start scaling back, no matter what your system
is telling you. Or, if you k n o w that only 2 2 % of all down moves, measured on daily
data, last for m o r e than two days, you could speculate on the high statistical likelihood for a short up trend to follow, set up a contrarian trading system, and p r o b e
the market with a small position whenever the market has fallen for two days or
m o r e . Similarly, if you k n o w that only 9% of all d o w n moves result in a decline of
8% or m o r e , measured on monthly data, you could take a long position, betting on
an extended up m o v e to follow, as soon as the market has declined that amount.
To get a feel for relationships like these, it is a good idea to put together a set
of tables like Table 5.1 through Table 5.3, which serve as good starting points for
experimentation. All tables have been put together using the R A D contract for the
S & P 500 futures market, with data expanding from January 1985, to D e c e m b e r
1994, and January 1995 to October 1999. (The m o s t up-to-date data, from January
1995 to October 1999, w e r e used for out-of-sample testing, and are placed within
parentheses.) F r o m Table 5.1 you can see that during the period January 1, 1985,
to D e c e m b e r 3 1 , 1994, the average up m o v e for the S & P 500, measured on weekly data, went on for 2.29 weeks, for an average total gain of 3 . 3 % , while the average down move, measured on monthly data, went on for 1.35 m o n t h s with an average total decline of 4 . 8 2 % . F r o m Table 5.2 you can see that measured with daily
data, 2 5 % of all up moves lasted for longer than two weeks, while only 6% of all
down moves could be expected to last for three weeks or m o r e . In Table 5.3 the
monthly amplitudes are within the parentheses in the headers. M e a s u r e d with
weekly data, 4 2 % of all up moves resulted in an increase of the market value of
m o r e than 3 % . M e a s u r e d with monthly data, 4 6 % of all up moves resulted in an
increase of the market value of m o r e than 6%.
To put together Tables 5.1 through 5.3 you m u s t be able to export your data
into a text file, which can be opened with the help of MS Excel or any other
spreadsheet program. O n c e in Excel, you first must calculate the percentage
change of the closing price with the following formula:
CHAPTER 5
Data Mining
TABLE
57
5.1
Amplitude
Daily data
All moves
0.68%
1.95
1.34%
Up moves
0.69% (0.77%)
2.04 (2.17)
1.41% (1.68%)
Down moves
0.68% (0.71%)
1.86 (1.93)
1.26% (1.36%)
Weekly data
All moves
1.52%
1.97
2.99%
Up moves
1.44% (1.78%)
2.29 (2.21)
3.30% (3.98%)
Down moves
1.64% (1.67%)
1.65 (1.52)
2.70% (2.52%)
Monthly data
All moves
3.32%
1.72
Up moves
3.22% (3.47%)
2.09 (3.31)
6.72% (11.93%)
Down moves
3.56% (3.50%)
1.35 (1.25)
4.82% (4.36%)
TABLE
5.73%
5.2
>1
>2
>3
Daily data
All moves
50%
50%
23%
11%
Up moves
4 6 % (43%)
54% (57%)
2 5 % (33%)
13% (15%)
Down moves
5 3 % (53%)
4 7 % (47%)
2 2 % (25%)
10% (12%)
Weekly data
All moves
50%
50%
25%
11%
Up moves
4 1 % (43%)
5 9 % (57%)
3 3 % (28%)
17% (15%)
Down moves
6 0 % (67%)
4 0 % (33%)
17% (13%)
6% (4%)
Monthly data
All moves
57%
43%
16%
Up moves
3 7 % (38%)
6 3 % (61%)
2 3 % (46%)
Down moves
7 6 % (83%)
24% (17%)
9 % (8%)
6%
9 % (46%)
3 % (0%)
PART 2
58
TABLE
System Concepts
5.3
>1(2)%
>2(4)%
>4(8)%
>3(6)%
>5(10)%
Daily data
All moves
55%
45%
20%
9%
4%
2%
Up moves
5 1 % (42%)
4 9 % (58%)
2 2 % (28%)
1 1 % (18%)
4 % (11%)
2 % (4%)
Down moves
5 9 % (57%)
4 1 % (43%)
18% (25%)
8 % (11%)
4 % (6%)
2 % (3%)
Weekly data
All moves
26%
74%
53%
36%
25%
16%
Up moves
2 3 % (10%)
7 7 % (90%)
6 1 % (75%)
4 2 % (59%)
2 8 % (41%)
18% (24%)
Down moves
2 8 % (28%)
7 2 % (72%)
4 5 % (43%)
3 1 % (27%)
2 2 % (21%)
14% (18%)
Monthly data
All moves
25%
Up moves
2 6 % (0%)
Down moves
75%
2 4 % (25%)
7 6 % (75%)
35%
19%
12%
4 6 % (62%)
2 9 % (46%)
1 7 % (46%)
2 4 % (17%)
9% (8%)
6 % (8%)
45%
7 4 % (100%) 5 7 % (92%)
3 2 % (33%)
=E3/E2
w h e r e E denotes the column where the data is stored.
To calculate h o w m a n y periods in a row a certain move lasts, first use the following formula in the adjacent column:
=IF(OR(AND(F3 > 1 ;F2 < 1); AND(F3 < 1 ;F2 > 1)); 1 ;G2 + 1 )
T h e n , continue the calculation in the next column:
=IF(G3>=G4;SIGN(F3-1)XG3;"")
Finally, in the last column, use the following formula to calculate the percentage move:
M
=IF(H3<> ";PRODUCT(INDEX(F:F;ROW()-ABS(H3)+l;l):
INDEX(F:F;ROW();l))-1;"")
After you have filled in all the calculations, type in the following sets of formulae at the b o t t o m of the spreadsheet to derive the necessary n u m b e r s for the
tables. (For the down moves, simply change " > " t o " < = " . )
To calculate the total n u m b e r of periods u p :
=ABS(SUMIF(H$3:H4429;">0"))
To calculate the total n u m b e r of moves up:
=ABS(COUNTIF(H$3:H4429;">0"))
CHAPTER 5
Data Mining
59
,,
=SUMIF(I$3:I4429; >0")/COTJNTIF(I$3:I4429;">0 )
To calculate the average percentage amplitude for each period within the up
move:
A
=((H4434+1) (1/H4433)-1)
To calculate the likelihood for an up m o v e to last for two periods or m o r e :
=COUNTIF(H$3 :H4429;" > 1 ")/H4432
To calculate the likelihood for the amplitude of an up m o v e to be greater than
1%:
=COUNTIF(I$3:I4429;">0.01")/H4432
To test a simple trading system that m a k e s use of information like this, you
can, for instance, set up a system that only goes long as soon as you have a down
day that follows a down week that follows a down month. Because of the natural
u p w a r d drift in the stock market and because of w h a t the data mining has shown
about up moves going on for a longer period of time, the requirements for a short
position could be two up days, two up w e e k s , and two up m o n t h s . T h e
TradeStation code for this simple system, G o l d D i g g e r I, looks something like
this:
Condition 1 = CloseM(l) > C and CloseW(l) > C and C[l] > C;
Condition2 = CloseM(2) < CloseM(l) and CloseM(l) < C and
CloseW(2) < CloseW(l) and CloseW(l) < C and C[2] < C[l] and C[l] < C;
If Condition 1 = True and MarketPosition = 0 Then
Buy ("Go long") at open;
If C[2] < C[l] and C[l] < C Then
ExitLong ("Exit long") at close;
If Condition2 = True and MarketPosition = 0 Then
Sell ("Go short") at open;
I f C [ l ] > CThen
ExitShort ("Exit short") at close;
U s i n g the trade-by-trade export function from Part 1, together with the R A D
contract for exporting the results into a spreadsheet program, and then using the
Excel formulae we also derived in Part 1, you can put together a performance s u m m a r y table like those in Tables 5.4 and 5.5.
PART 2
60
TABLE
System Concepts
5.4
251
Winners
Profit factor
1.34
Lrg winner
0.18%
597
Avg winner
2.01%
6,799
C u m profit
Avg profit
St Dev
Losers
15
63.35%
7.76
26,190
Lrg loser
1.09
3,684
Avg loser
47.74
161,123
Drawdown
36.65%
-19.12
-64,530
-1.40
-4,739
-26.71
-90,146
Over the period January 1, 1985, to D e c e m b e r 3 1 , 1994, Gold D i g g e r I p r o duced 251 trades, a m o n g w h i c h close to 6 4 % w e r e profitable, for an average gain
p e r trade of 0 . 1 8 % (or $597 in today's m a r k e t value, with the S & P 500 trading
around 1,350). A fairly low d r a w d o w n and standard deviation also m a k e us want
to continue the research.
W h e n tested on out-of-sample data, the average profit h a d increased to
$ 1 , 4 6 7 , while the largest loss h a d d e c r e a s e d to 4 . 2 0 % (or $14.175 in today's m a r ket value). An ever-low standard deviation a n d a h i g h p e r c e n t a g e profitable trades
k e e p us interested. No m o n e y w a s deducted for slippage a n d c o m m i s s i o n , but
w i t h an expected $75 in slippage and c o m m i s s i o n , you can expect this system to
generate approximately $1,392 p e r contract traded ($1,467 $ 7 5 ) in the i m m e diate future. Table 5.5 also shows that t h e d r a w d o w n decreased substantially from
close to 2 7 % , for the in-sample period, to 7% for the out-of-sample period. For
d r a w d o w n a n d cumulative profit values to be correct, however, we are a s s u m i n g
that the entire equity, including previously m a d e profits, w a s reinvested at each
new trade. As m e n t i o n e d in Part 1, this is s e l d o m possible, especially not in the
futures m a r k e t s , but it could be so in the stock market, provided that you can b u y
fractions of a share. W h a t this does allow you to do, however, is to c o m p a r e different systems a n d m a r k e t s with each other on an equal basis, or c o m p a r e h o w
your system would have held up against a b u y - a n d - h o l d strategy over the s a m e
t i m e period.
Despite the not too b a d results, it is important to r e m e m b e r that Gold Digger
I is put together merely to illustrate a simple system for taking advantage of a market's statistical characteristics. This particular system is n o t a good system to trade
if you compare the statistical characteristics in Tables 5.1 to 5.3 for the m a r k e t dur-
TA B L E
5.5
Total trades
105
Profit factor
2.27
Lrg winner
Avg profit
0.43%
1,467
Avg winner
St Dev
1.40%
4,719
Cum profit
66.67%
33.33%
3.45
11,644
Losers
Lrg loser
-4.20
-14,175
1.16
3,928
Avg loser
-1.02
-3,456
56.10
189,338
Drawdown
-7.20
-24,300
APTER 5
61
Data Mining
ing the first 10-year period, with the characteristics for the latest four years.
C o m p a r i n g the in- a n d out-of-sample periods with each other shows that ever-sosmall differences between the daily and weekly data soon add up to quite large differences in the monthly time perspective. For instance, when looking at the m o n t h ly data, you notice the average m a g n i t u d e of an up move, measured on monthly
data, has grown from 2.09 m o n t h s and 6 . 7 2 % to 3.31 m o n t h s and 1 1 . 9 3 % . Also,
in the table describing the likelihood for periods of moves of certain length, for the
period up until 1994 there was only a 9% chance for an up move to last for m o r e
than three m o n t h s , but for the period spanning January 1995 to October 1999,
there was a 4 6 % chance for the s a m e type of move.
In the s a m e table, the m o s t recent study suggests that 5 7 % of up moves m e a s ured on weekly data go on for more than one week. This is two percentage points
less than what could be expected looking at the period ending in 1994. Hence,
while the n u m b e r of persistent up trends measured on weekly data has decreased,
the n u m b e r of persistent up trends measured on monthly data has skyrocketed. T h e
s a m e p h e n o m e n o n also can be seen in the table for percentage of moves of certain
amplitude, w h e r e the percentage of up moves with an amplitude of m o r e than 5 % ,
measured on weekly data, has only increased by 3 3 % (from 1 8 % to 2 4 % ) , while
the n u m b e r of up moves with an amplitude of m o r e than 10%, measured on
monthly data, has skyrocketed by 1 7 0 % (from 1 7 % to 4 6 % ) .
This suggests that when the market changes its characteristics or m o d e , these
changes can be very hard to detect w h e n looking at a shorter time frame within the
bigger picture. Or, put differently: no matter what long-term m o d e the market is
in, the short-term statistical characteristics are likely to still look the s a m e and be
close to stationary in nature. This is a very important conclusion, because if this is
true, the only way to build a mechanical trading system that holds up and behaves
the s a m e way in the future as it does during testingno matter what the longert e r m underlying trend looks likeis to focus on the shorter time perspective, with
trades lasting for no longer than approximately a week and using as little historical data for the signals as possible.
To test if this could be true, a modified version of the original system considers only daily and weekly data, as suggested by the following TradeStation
code, which also does not differentiate between up trends and down trends:
Conditionl = CloseW(2) > CloseW(l) and CloseW(l) > C and C[2] > C[l] and
C[l] > C;
C o n d i t i o n = CloseW(2) < CloseW(l) and CloseW(l) < C and C[2] < C [ l ] and
C[l] < C;
If Conditionl =True and MarketPosition = 0 Then
Buy ("Go long") at open;
IfC[2] < C[l] and C[l] < C T h e n
ExitLong ("Exit long") at close;
62
PART 2
System Concepts
5.6
107
Profit factor
1.98
Winners
Lrg winner
Avg profit
0.31%
1,045
Avg winner
St Dev
1.38%
4,666
Cum profit
62.62%
7.31
24,671
1.00
3,364
37.84
127,710
Losers
Lrg loser
37.38%
-4.06
-13,703
Avg loser
-0.84
-2,840
Drawdown
-7.26
-24,503
CHAPTER 5
Data Mining
63
ing into account that each b a r actually holds three other important price levels.
That is, w h e n calculating a moving average of closing prices, all open, high, and
low prices usually are ignored. Using regular m o v i n g averages a n d Bollingerb a n d - t y p e indicators to identify trading opportunities also present a problem in
that the readings are not always comparable over time. For e x a m p l e , a value of
1,350 for the S & P 500 index m a y very well be below its moving average and standard deviation bands today, but m a y not be so a couple of years from now, if and
w h e n the market trades at the same level again. It all depends on where the market is c o m i n g from at that point in time.
Wouldn't it be great to c o m e up with an indicator that can m a k e use of all
four of these price extremes, shorten the lookback period by 7 5 % , a n d at the s a m e
time m a k e it possible to m a k e all of the indicator observations comparable with
each other, regardless of w h e n they happened or at w h a t level the market w a s trading at the time?
Contrast the above with a statistical examination, where you are measuring the
height of a random sample of m e n that you meet throughout the day. At the end of the
day you write down the height of the first man, the tallest man, the shortest man, and
the last man you have measured that day. It does not matter in what order you write
t h e m down. After five days you have 20 observations, which is the m i n i m u m amount
required to make any statistical conclusions. (This number varies; some say 20, others say 30, while still others say 100 or more. In the medical field, it is close to 1,000.
Aside from the fact that you will not always have that m u c h data to experiment with,
there is no reason why you shouldn't treat your m o n e y any less seriously.)
Let us say that the average for all 20 m e n was 6 feet and the standard deviation was 3 inches. T h e one standard deviation boundaries and the two standard
deviation boundaries hold approximately 6 8 % and 9 5 % , respectively, of the m e n
m e a s u r e d and the expected height of all m e n to be measured in the future. With
this information at hand y o u now can classify all m e n that you met as, for instance,
average height (between 5 feet 9 inches to 6 feet 3 inches), short (between 5 feet
6 inches to 5 feet 9 inches), very short (below 5 feet 6 inches), tall (between 6 feet
3 inches to 6 feet 6 inches), and very tall (above 6 feet 6 inches). For each and
every investigation d o n e this way, and depending on w h e r e they are done, these
levels will vary slightly. B u t for each investigation, at least s o m e of the previous
information will be useful in estimating the future outcome or what can be expected for the next day. For instance, because the chances of meeting a tall or very tall
m a n are approximately 1 6 % ((1 0.68) X 100 / 2), you also know that the c h a n c e
of meeting two such m e n in a row is a m e r e 2 . 5 % (0.16 X 0.16 X 100).
To develop and use the same type of research in the markets, it is important
to note not at what level the markets are trading, but the amplitude of the moves. To
m a k e each move comparable to all others, both in time and between different markets, we m u s t use the R A D contract, which keeps the percentage changes constant
instead of using the actual point or dollar values. To calculate the move rather than
PART 2
64
System Concepts
the level, it also is necessary to relate each move to a base or ground level.
Continuing the comparison with measuring m e n on the street, it m a k e s little or no
sense to measure each man's height from sea level instead of from the ground where
he is standing. That is, for a comparison to be meaningful, it is necessary to normalize the data; the obvious level from which to normalize a person's height is the
ground on which he stands.
In m a r k e t research, there are a few levels to which e a c h m o v e can be normalized, like the previous bar's close or the average price of the previous bar. H e r e
each move has been normalized to the previous bar's closing price. A n o t h e r difference between m e a s u r i n g m e n and market action is the use of absolute and percentage values. If you are 6 feet tall, you will be 6 feet tall whether you are standing on a pair of skis in Vail or lying down on a beach towel in Hawaii. It would
m a k e little or no sense to c o m p a r e your height in percentage terms to h o w high
you are from the ocean. B u t in the market there is a huge difference between a
move worth $20,000 if the market is trading at the 1,350 level, compared to the
s a m e dollar move if the market is trading at 2 5 0 . In the first case, a $20,000 move
equals only a 6% move, while in the latter the s a m e dollar move a m o u n t s to over
3 0 % . T h u s , it is of p a r a m o u n t importance to m e a s u r e market moves in percentages
rather than point or dollar values so that you can c o m p a r e different types of moves,
no matter where and w h e n they happened.
In our m e a s u r i n g - m e n example, four observations were kept each day. This
can be done for the markets as well with what I call the M e a n d e r indicator. The
following TradeStation c o d e sets up an array containing all the opening moves,
moves to the highs, moves to the lows, and moves to the close, for a total of 20
data points for the last five bars:
Input: VSStd(l);
Vars: SumVS(O), AvgVS(O), DiffVS(O), StdVS(O), SetArr(O), SumArr(O),
DiffArr(O), VSLow(O), VSMid(O), VSHigh(O), FNameC*"), TradeStrl("");
Array: VS[20](0);
For SetArr = 0 To 4 Begin
VS[SetArr * 4 + 0] = (0[SetArr] - C[SetArr + 1]) / C[SetArr + 1];
VS[SetArr * 4 + 1] = (H[SetArr] - C[SetArr + 1]) / C[SetArr + 1];
VS[SetArr * 4 + 2] = (LfSetArr] - C[SetArr + 1]) / C[SetArr + 1];
VS[SetArr * 4 + 3] = (C[SetArr] - C[SetArr + 1]) / C[SetArr + I];
End;
For SumArr = 0 To 19 Begin
If SumArr = 0 Then
SumVS = 0;
SumVS = SumVS + VS[SumArr];
If SumArr = 19 Then
CHAPTER 5
65
Data Mininj
PART 2
66
System Concepts
in a spreadsheet p r o g r a m , such as Excel. Figure 5.1 shows w h a t this pivotp o i n t - t y p e indicator looks like w h e n charted together with the latest price action
for the S & P 500 futures contract. As you can see, the Meander indicator consists
of three lines, a m o n g which the upper (VS High) and lower ( V S L o w ) lines can be
chartered one or two standard deviations away from the middle (VS M i d ) line. T h e
M e a n d e r indicator works exactly the s a m e for all markets.
With the necessary data imported into Excel, you can type in the following
formula in adjacent c o l u m n s to calculate the long entry level, the long risk level
(stop loss), the long exit level, and the result of the trade. (Reverse the calculations
in the next four c o l u m n s for the short side.)
= IF(B2<F2;B2;IF(D2<F2;F2;"")),
C o l u m n B denotes the opening price, c o l u m n F denotes the VS L o w level,
and c o l u m n D the Low.
=IF(I2<>"";I2*(1-H$1212/100);"")
C o l u m n I denotes the long entry level a n d cell HI212 refers to the cell where
you have typed in your percentage risk.
=IF(I2<>"**;IF(D2<J2;J2;IF(AND(C2>H2;E2<H2);H2;E2));"")
C o l u m n J denotes the long risk level, column C denotes the High, column H
the VS High level, and column E the closing price.
n
CHAPTER 5
FIGURE
Data Mining
5.1
67
68
(VS High) level if the market trades below (above) that level. It exits with a loss if
the market moves against the position with a certain percentage, or with a profit if
it trades above (below) the VS H i g h ( V S L o w ) level but then moves b a c k down
again, as suggested by the closing price. All trades are also closed out at the end
of the day. B e c a u s e this is an intraday system based on daily data, and sometimes
we do not k n o w what came first, the high or the low, we m u s t play it safe and look
for the losing trades first. Table 5.7 shows the results for this system broken down
into long and short trades, tested on the S & P 500 futures contract, for the period
January 1995 to October 1999. No m o n e y has been deducted for slippage and
c o m m i s s i o n . The percentage risked at each trade w a s 0 . 7 5 % . In this version, the
M e a n d e r had over 5 0 % profitable trades on the long side, for a total average profit in today's m a r k e t value of $287. With an estimated $75 deducted for slippage
and commission, the average profit for the long side will be $ 2 1 2 . N o t too b a d for
an intraday trading system on a one-contract basis. R e m e m b e r also that because
we played it safe by always considering a trade to be a loser if it reached the stop
loss level, although we very well might have reached the profit target first, there
is a high likelihood for the percentage profitable trades and the average profit to
be even higher than shown.
In this case, the standard deviation was set to 1, w h i c h m e a n s that the system
triggers a trade fairly frequently. With the standard deviation set to 2, the system
generates fewer trades, but with a higher probability for success. A l s o , the highest
probability trades are those that enter immediately at the open. This is because if
the open is below (above) the trigger level, the low (high) will be, too. That is,
there will be two low probability occurrences in a row, analogous to the chance of
meeting two tall m e n in a row, which increases the probability for a move in the
opposite direction. Or rather, if we continue on the tall m e n analogy, it increases
the likelihood that we have run out of tall m e n .
Now, let us take a look at the very s a m e system, with the very same settings,
but this time traded on corn. As you can see in Table 5.8, the system continues to
work fairly well if we only look at the percentage average profit and the n u m b e r
of profitable trades.
TABLE
5.7
Long trades
Number of trades
Percent winners
522
52.30%
Number of trades
Percent winners
459
43.79%
0.09%
0.03%
287.16
112.81
CHAPTER 5
69
Data Mining
TABLE
5.8
Short trades
439
48.97%
0.07%
6.88
Number of trades
Percent winners
Average profit (%)
Average profit ($)
476
44.75%
0.07%
7.02
But when it comes to the dollar profits, the results look less promising. This
is because there is a huge difference between a good working system and a profitable system. This is an interesting observation, which adds to the never-ending
debate on whether or not to trade the s a m e system on several different markets. T h e
conclusion from this simple test is to test the same percentage-based system on several different markets to m a k e sure that it works equally well on all markets, but
only to trade those markets in which the percentage-based moves also equal a high
enough dollar profit. Or, in continuing our analogy to measuring men, if you were
to sell pants to as m a n y of the m e n you have measured as possible, choosing your
sizes and markets would be beneficial in selling as many pairs as possible.
To put it in trading terms: just because a system is equally good at capturing
all 2% moves in corn as it is in S & P 500, this doesn't m e a n that it will be equally
as profitable in both markets. For a system to be profitable, it needs to be traded
in a market w h e r e the moves it is designed to catch also are worth taking. Because
a system is working well on all markets, it does not m e a n it will be tradable on all
markets, because not every system will produce big enough dollar profits to overc o m e the costs. In the case of corn, the M e a n d e r does not even c o m e close. But
r e m e m b e r that this does not m e a n that M e a n d e r is a b a d system. W h e t h e r a good
working system will be profitable or not has nothing to do with the system, but
rather at what level the market currently is trading and the dollar value of that
level. And, as previously noted, this is a technicality decided by the exchange,
w h i c h has nothing to do with whether the system is good at capturing the moves
of the market.
70
PART 2
System Concepts
the current composition of the deck and how to analyze your odds correctly as
compared to the dealer's. T h e basic rules are to bet m o r e aggressively, but hold at
a lower n u m b e r if there are m o r e high cards left in the deck, especially if the dealer's card is high as well. If you know how to do this, in the long run it will not matter what cards you are being dealt, you will end up being a winner anyway.
In the trading system Black Jack, all this is comparable to being able to trade
profitably, no matter what the entry rule looks like, as long as you only take trades
in the direction of the underlying trend, and know exactly when to exit and why. You
are trying to keep your average trade (hand) in positive territory with just enough
money to make it worthwhile. If you can accomplish this, the rest is just a matter of
trading as frequently (playing as many hands) as possible in as short a time as possible. Therefore, it is not only essential that your entry rule allows you to take as
many trades as possible, but even more important that your trades don't last too long.
W h e n exiting a trade, you can do so under four different assumptions. In the
best of worlds, exit technique n u m b e r one is the profit target, which lets you exit
the market with a limit order at the m a x i m u m open profit. Exit technique n u m b e r
two is the trailing stop, which c o m e s into play when the market is starting to move
against you after you have accumulated an open profit. N u m b e r three is the stop
loss for those occurrences when the trade goes against you right off the bat.
Finally, you also can exit with a time-based stop, possibly in combination with any
of exit techniques one to three.
W h e n it c o m e s to the entries and trade triggers, there are probably as m a n y
ways to go about designing them as there are traders (and then some), so instead
of delving any deeper into this matter, and because of the reasoning above, this
version of Black Jack was put together with a very simple top-and-bottom-picking
entry technique paired with a short-term breakout system in case the retracement
w a s n ' t deep e n o u g h to trigger an entry. In Part 3, where we focus m o r e explicitly
on efficient exits and overall trade efficiency, we will substitute these entries with
random entries. That said, for a set of good short-term entry ideas, look into the
work of Linda Bradford Raschke or T o m D e M a r k .
Finally, there is the trend filter. In the academic c o m m u n i t y and a m o n g fundamental analysts w h o pay h o m a g e to the efficient market hypothesis, for the
longest time there was no such thing as a trend. However, in recent years even
these people have had to cave in and admit that there is something that they call
"a r a n d o m walk with a drift." For decades, this drift has been measured by technical analysts with the help of moving averages of various lengths. Probably the
m o s t simple trend filter, w h i c h also has withstood the test of time, is the 200-days
moving average. To continue to keep it as simple as possible, this is also what we
use for Black Jack. If you would like to look into m o r e sophisticated long-term
techniques, d o n ' t overlook the work of N e l s o n Freeburg.
Before we can put together the system, we also need to understand what it is
we are trying to achieve, and consequently, how to go about doing it. Picture your-
CHAPTER 5
Data Mining
71
self as a quality controller standing at the end of an assembly line. Your pay (final
estimated profit) for this j o b is dependent on how m a n y units (number of trades) you
and your machine (system) can produce, but also on how little you can m a k e the
look of all these units deviate from each other or from the average look (a low standard deviation). Obviously, you would like the assembly line to run as fast as possible, but only after you have examined one unit can the next unit be placed on the line,
so the longer the time spent examining a single unit, the lower your payoff will be.
A l o n g c o m e s an obviously defective unit that is bound to lower your results.
Without wasting any time, you toss it b e h i n d your back right away, freeing up the
line for another unit to be placed upon it. T h e next unit looks pretty average, but
to be sure, you e x a m i n e it for a while longer than you did the previous one. In fact,
without k n o w i n g it, with this average unit you spent an average a m o u n t of time.
But the third unit that c o m e s along is m u c h trickier. This o n e shows all the
right features for being a real m o n e y maker, and while y o u ' r e watching it, these
features grow even bigger, p r o m i s i n g to m a k e this unit at least three times as valuable as the average unit. W h a t to do? Should you let it grow even bigger or should
you free up the line for m o r e units? But then, all of a sudden its value-added features start to diminish. You freeze in panic, and not until its value has sunk b a c k to
twice the value of the average unit do you take it off the line. T h e problem is that
in the time you spent processing this unit you could have processed three average
units. W h a t w a s it that h a p p e n e d here? By trying to increase your profits from an
individual unit you put yourself in unfamiliar territory, w h i c h m a d e you panic,
increased the standard deviation of the o u t c o m e , and lowered the n u m b e r of units
produced, which in the end resulted in less overall profits.
But wait a minute, you say. W h a t about the big winners? D o e s n ' t the old
adage say that you should let your profits run? Yes, it does, and it is probably good
advice to listen to every now and then, but in trading it also has its price. T h e price
is that you lose track of what is average. T h e really big winners are usually few and
far between; the rest are just a b u n c h of look-alikes there to confuse you. By staying away from all of them, you are freeing both your m i n d and capital to milk that
big w i n n e r several times over in a sequence of average trades, while at the s a m e
time allowing yourself to step in and out of other m a r k e t s as well.
Translated into trading t e r m s , for a trading system to be both as robust and
as profitable as possible you should strive to m a k e each trade as similar to all other
trades as possible, even if it m e a n s that you have to cut your profits short every
now and then. By doing this, you are freeing up time and m o n e y that can be spent
on other average tradestrades with which you are familiar and k n o w how to handle without panicking, which in the end should prove itself m o r e profitable.
N o w w h a t exactly does this m e a n ? It m e a n s that to c o m e up with a reliable
system with a positive average trade and a standard deviation that is as low as p o s sible, and with as m a n y profitable trades as possible, it is of p a r a m o u n t importance
that the system work, on average, equally well on several different markets over
PART 2
72
System Concepts
several different time periods. This holds true even if you only are going to trade
it on o n e market, because you never k n o w w h e n the characteristics of this market
will change to resemble m o r e closely those of another market. Therefore, if and
w h e n this happens, you must have taken this into consideration beforehand by
m a k i n g sure that the system (at the least) will not go berserk in this new market
environment.
Hence, if the underlying assumption isn't market specific, always m a k e sure
that your system runs at least marginally profitably, if ever so slightly, in percentage terms, on as m a n y markets as possible. If you wish, this could be comparable
to m a k i n g sure that your Black Jack card playing skills stay independent from any
external factors, such as how m a n y other people are playing, h o w the deck is shuffled, w h o the dealer is, or the n a m e of the hotel.
For this system we use data covering the period January 1985 to October
1999, from 14 different markets. T h e s e are: coffee, copper, corn, cotton, C R B index, D-mark, Eurodollar, Japanese yen, crude oil, live cattle, natural gas, orange
j u i c e , T-bond, a n d the T-bill.
We know that we should look for as m a n y profitable trades as possible to
generate an as high as possible average profitable trade in percentage terms, but
with am as low as possible standard deviation. We can modify the code from Part
1 before we attach it to the b o t t o m of the system, so that we can export the right
data into a text file for further analysis in Excel. The TradeStation code for the
Black Jack I trading system follows:
Inputs: BarNo(O), SL(0), PT(0), MP(0);
Vars: Trigger(O), BSLevel(O), TotTr(O), ExpVar(O), Prof(0), TotProf(0),
TradeStrl ("");
Filters *****}
Trigger = Average(C, 200);
I ***** Retracement Entry *****}
If C > Trigger and MarketPosition = 0 and (L < XAverage(L, 6) or
L Crosses above XAverage(L, 6)) and C Crosses above XAverage(C, 6) and
H < XAverage(H, 6) Then Begin
Buy ("Buy Support") at C;
BSLevel = C;
End;
If C < Trigger and MarketPosition = 0 and (H > XAverage(H, 6) or
H Crosses below XAverage(H, 6)) and C Crosses below XAverage(C, 6) and
L > XAverage(L, 6) Then Begin
Sell ("Sell Resist.") at C;
BSLevel = C;
End;
CHAPTER 5
73
Data Mining
74
PART 2
System Concepts
CHAPTER 5
75
Data Mining
To calculate the ratio between the percentage profitable trades and its standard deviation:
=F147F15
w h e r e cell F14 denotes the percentage profitable trades a n d cell F15 denotes the
standard deviation.
S u m m e d up in a table for easier interpretation, the results resemble those in
Table 5.9, w h i c h shows the data for the time-based stop, which is triggered at a certain n u m b e r of days, no matter what. In this case, we are looking for a high average
profit and a high percentage of profitable trades. T h e higher the ratio between the
critical variable and its standard deviation, the m o r e robust the system.
F r o m Table 5.9 we can see that the ratio between the average profit and its
standard deviation is at its highest with a trade length of 14 days. A trade length
of ten to 11 days, however, also s e e m s to have a decent risk/reward relationship,
especially considering that the ratio between the percentage profitable trades and
its standard deviation also is slightly higher for these trade lengths than for the 14day alternative. If we were to set a m a x i m u m trade length of either 10 or 11 days,
however, the actual average trade length is slightly shorter w h e n the other stops are
added. Therefore, we will change the time-based stop slightly and turn it into a
very tight trailing stop that will be triggered if the trade lasts for 11 days or m o r e .
TABLE
5.9
Average profit
0.05
0.04
0.01
0.04
0.00
0.03
0.05
Standard deviation
0.10
0.13
0.16
0.18
0.21
0.26
0.25
Ratio
0.51
0.32
0.08
0.22
-0.01
0.13
0.21
52.99
51.64
52.30
53.30
53.12
52.91
52.82
Percent profitable
Standard deviation
4.32
4.08
3.91
3.70
4.28
4.37
4.23
Ratio
12.27
12.64
13.38
14.39
12.40
12.12
12.49
10
11
12
13
14
15
Average profit
0.08
0.20
0.17
0.10
0.11
0.14
0.15
Standard deviation
0.38
0.36
0.35
0.35
0.30
0.24
0.32
Ratio
0.21
0.56
0.50
0.29
0.36
0.58
0.45
Percent profitable
54.04
53.96
54.12
53.61
53.32
53.21
53.54
Standard deviation
3.89
4.79
4.78
5.01
5.96
5.15
5.05
Ratio
13.91
11.28
11.31
10.70
8.94
10.34
10.60
PART 2
76
System Concepts
If the trade runs on for too long, our profit target eventually stops it out instead.
T h e TradeStation code for the time-based trailing stop is :
If BarsSinceEntry > = BarNo Then Begin
ExitLong ("Long time") tomorrow at C Stop;
ExitShort ("Short time") tomorrow at C Stop;
End;
With a time-based trailing stop that kicks in after 11 days in place, it is time
to set a profit target. In the TradeStation code for the export function simply
change the line "ExpVar = B a r N o " to "ExpVar = P T " . R e m e m b e r that the profit
target is only there to catch the m o s t extreme trades, but because the entire idea
behind Black Jack is to keep all trades as uniform as possible, we d o n ' t want our
profits to run for too long either. In this case, we aim for the 5 to 1 0 % region. Table
5.10 shows what our results look like.
From Table 5.10 we can see that the ratio b e t w e e n the average profit and its
standard deviation is at its highest with a profit target of 9 . 5 % . This value also
seems to be surrounded by other fairly high values, which indicates that this is a
robust level, likely to produce good results in the future, even though the optimal
level might m o v e around slightly. Therefore, we decide that we will add a profit
target of 9 . 5 % to the system.
TABLE
5.10
5.5
6.5
7.5
Average profit
0.10
0.09
0.10
0.08
0.10
0.13
Standard deviation
0.48
0.45
0.45
0.49
0.47
0.46
0.23
0.17
0.21
0.27
55.10
54.41
54.21
54.14
Ratio
0.20
0.21
Percent profitable
55.91
55.41
Standard deviation
4.06
3.97
4.07
4.32
4.55
4.63
Ratio
13.77
13.97
13.54
12.59
11.92
11.69
8.5
9.5
10
10.5
Average profit
0.13
0.13
0.13
0.15
0.13
0.13
Standard deviation
0.43
0.43
0.45
0.43
0.41
0.42
Ratio
0.30
0.31
0.29
0.36
0.33
0.32
54.05
53.90
53.72
53.64
53.55
53.47
Percent profitable
Standard deviation
4.69
4.71
4.90
4.99
4.91
4.99
Ratio
11.52
11.44
10.96
10.75
10.91
10.72
CHAPTER 5
Data Mining
77
With a time-based trailing stop and a profit target in place, the s a m e m a n e u vers are repeated for the m i n i m u m profit stop a n d the stop loss. T h e m i n i m u m
profit stop we try to place somewhere between zero profits and halfway up to the
profit target, which m e a n s that we must look in the 0 to 5% region. Table 5.11
shows the result for these levels.
From Table 5.11 we can see that the higher the m i n i m u m accepted profit, the
lower the average trade, but also that the uncertainty, as m e a s u r e d by the ratio
between the average profit a n d its standard deviation, is increasing. To be sure, it
s e e m s as if we should go with a fairly low accepted m i n i m u m profit. In doing so
we also can expect a high percentage of profitable trades even though the insecurity about this n u m b e r decreases with a lower m i n i m u m accepted profit. For this
system, we decide to aim for a m i n i m u m accepted profit of 1%.
T h e stop loss, finally, we would like to keep as tight as possible, but at the
s a m e time m a k e sure that we give the trade s o m e initial slack. Let us see what we
can find in the 0.5 to 2.5 percent region. Table 5.12 shows our findings.
I n l o o k i n g a t Table 5.12, w e i m m e d i a t e l y can m a k e o n e v e r y i m p o r t a n t
o b s e r v a t i o n . T h e ratio b e t w e e n t h e a v e r a g e profit a n d its s t a n d a r d d e v i a t i o n
n o w is a b o v e 1 in m o s t i n s t a n c e s . ( R e m e m b e r , the h i g h e r t h e ratio b e t w e e n t h e
critical variable a n d its s t a n d a r d deviation, t h e m o r e r o b u s t the s y s t e m . )
TABLE
5.1 1
Summary minimum profit level statistics for Black Jack I trading system.
Percentage minimum target
0.5
1.5
2.5
Average profit
0.16
0.17
0.14
0.16
0.11
Standard deviation
0.23
0.26
0.25
0.25
0.33
Ratio
0.69
0.65
0.54
0.61
0.33
69.39
65.47
62.35
60.58
58.86
Percent profitable
Standard deviation
5.73
5.84
5.81
5.02
4.21
Ratio
12.10
11.20
10.73
12.07
13.98
3.5
4.5
Average profit
0.12
0.11
0.14
0.13
0.12
Standard deviation
0.35
0.40
0.41
0.43
0.40
Ratio
0.33
0.28
0.33
0.30
0.30
54.69
Percent profitable
57.21
56.43
55.52
55.17
Standard deviation
3.86
3.83
3.98
4.04
4.18
Ratio
14.83
14.72
13.93
13.66
13.08
PART 2
78
TABLE
System Concepts
5.12
0.75
1.00
1.25
Average profit
0.17
0.18
0.18
0.17
0.15
Standard deviation
0.14
0.14
0.16
0.16
0.15
Ratio
1.50
1.27
1.24
1.18
1.08
1.00
Percent profitable
33.40
38.93
43.57
46.88
49.25
Standard deviation
11.04
9.35
7.92
6.93
6.73
3.02
4.16
5.50
6.76
7.32
1.75
2.00
2.25
2.50
2.75
Ratio
Average profit
0.13
0.13
0.14
0.16
0.16
Standard deviation
0.12
0.15
0.15
0.17
0.16
Ratio
1.03
0.84
0.95
0.94
1.01
Percent profitable
51.37
53.35
55.24
56.79
57.97
Standard deviation
6.50
5.99
5.53
5.54
4.93
Ratio
7.90
8.90
9.99
10.25
11.77
With 6 8 % certainty, we can say that the average profit will be positive. For
instance, with the stop loss at 0 . 5 % , the average profit is 0 . 1 7 % and the standard
deviation 0.14%. This m e a n s that with 6 8 % certainty, we can say that the true
value for the average profit will lie somewhere in the interval 0.03 to 0 . 3 1 % . Table
5.12 also reveals that, after adding the stops, the uncertainty (as measured by the
standard deviation) about the o u t c o m e has decreased at the s a m e time as the average expected profit has increased somewhat for the tightest stops. T h e price for
this is a lower percentage of profitable trades, however. By the s a m e token, we can
see that the percentage of profitable trades s e e m s to increase somewhat the further
away we place the stop, but that this c o m e s at the price of a deteriorating profit
factor. A good c o m p r o m i s e between these two p h e n o m e n a , therefore, s e e m s to be
to place the stop in the m i d d l e of the interval, at the 1.5% level. That this is a compromise is emphasized by the fact that n o n e of the markets tested actually had the
1.5% level as its best alternative.
With all exit levels in place, it is n o w t i m e to look at what performance can
be expected from each of the individual markets. Table 5.13 shows the average
percentage profit for each market, together with its current dollar value.
As you can see, for most of our 15 markets, the average percentage profitable
trade is not big enough to generate a big enough dollar profit to be worthwhile
trading. A l t h o u g h Black Jack I w o r k s well on almost all markets, this does not
m e a n it will be tradable on all markets, because not every system produces big
CHAPTER 5
79
Data Mining
TABLE
5.13
Average profit
Dollar value
Percent profitable
Orange Juice
0.21
28.69
46.20
Copper
0.18
36.24
44.26
Live cattle
0.30
80.78
55.64
Japanese yen
0.01
13.97
48.50
Corn
0.13
13.48
48.17
T-bond
0.22
243.93
58.48
Eurodollar
0.04
82.52
60.13
Natural gas
0.37
119.40
37.13
-0.13
-88.68
49.38
0.28
99.89
40.97
-0.01
-7.73
52.02
Cotton
0.11
29.74
47.96
T-bill
0.02
51.70
56.71
Crude oil
0.33
76.55
43.93
All markets
0.15
49.25
S&P 500
0.18
579.14
52.86
D-mark
Coffee
CRB-index
e n o u g h dollar profits to overcome the costs. This does not m e a n that Black Jack I
is a b a d system. In fact, of all the markets tested, the only market that might be
worthwhile trading is T-bonds and even this market is a border case. Other m a r k e t s
that, while not ruining you, but at the s a m e t i m e only feed your b r o k e r a r e natural gas, coffee, live cattle, Eurodollar, and crude oil. This does not mean, however, that the m o d e l is not working for these markets, but simply that these markets,
at this particular point in time, are not trading at the appropriate price levels and
with a high enough point value to generate a profit after slippage and commission.
H e n c e , a good working m o d e l is not the s a m e as a profitable model.
The S & P 500 was not a m o n g the markets chosen for the testing process,
because I wanted to save this, perhaps the most popular of all markets, for some outof-sample testing. The bottom row in Table 5.13 shows the initial findings for how
our model would have fared on the S & P 500 futures contract. A n d as you can see, it
would have done fairly well, with an average percentage profit of 0.18%, equal to an
average dollar profit of $579, not counting slippage and commission, in today's market value. This is very interesting information, because the way TradeStation and
several other testing packages calculate this number, it would have come out to
approximately $387. Again, this is because all of these packages look at how many
dollars you could have made, not how m a n y dollars you can expect to make; in an
up-trending market, the historical value will almost always (providing a steady working model) be lower than the actual value for today's market.
PART 2
80
System Concepts
5.14
Performance summary for Black Jack traded on the S&P 500, January 1985-October 1999.
Total trades
280
Winners
148
52.86%
132
47.14%
Profit factor
1.25
Lrg winner
9.50%
30,991
Lrg loser
-2.23%
-7,275
Avg winner
1.69%
5,521
Avg loser
-1.52%
-4,958
C u m profit
55.38%
180,662
Avg profit
0.18%
581
St Dev
2.02%
6,594
Losers
Drawdown - 3 1 . 4 7 % - 1 0 2 , 6 6 2
CHAPTER 5
Data Mining
81
CHAPTER
PART 2
84
TABLE
System Concepts
6.1
Dollar value of half average weekly true range (AWTRO, 1% move, and their comparative volatility (AWTR/% move)
Market
Bean oil
Cacao
Canada dollar
Coffee
Copper
Corn
Cotton
CRB index
Crude oil
Dollar index
Eurodollar
Feeder cattle
Gold
Heating oil
Japanese yen
Lean hogs
Live cattle
Lumber
Municipal bonds
Natural gas
Nikkei
Oats
Orange juice
Pork bellies
S&P 500
Silver
Soy beans
Soy meal
Sugar
T-bills
T-bonds
T-notes
Unleaded gas
Wheat
10 years
5 years
1 year
1%
Comp. Vol.
203
231
345
1,343
452
187
502
825
703
866
204
473
339
776
1,425
413
345
714
840
206
200
369
1,512
490
208
499
828
708
781
173
573
310
763
1,617
478
391
756
884
1,628
1,723
149
428
1,045
5,387
641
477
347
209
171
1,046
676
836
316
272
278
447
1,453
492
218
570
1,063
859
825
139
526
393
941
1,825
780
385
650
745
1,542
1,645
135
476
1,311
6,390
616
574
406
325
162
1,030
659
979
321
98
87
680
359
199
100
267
1,020
229
992
2,347
398
294
257
1,206
186
272
251
1,087
322
874
55
134
248
3,264
261
241
147
77
2,374
1,115
1,084
268
128
2.78
3.20
0.66
4.05
2.47
2.18
2.13
1.04
3.75
0.83
0.06
1.32
1.34
3.66
1.51
4.19
1.42
2.59
0.69
4.79
1.88
2.45
3.55
5.29
1.96
2.36
2.38
2.76
4.22
0.07
0.92
0.61
3.65
2.51
148
409
982
4,767
614
444
299
213
192
1,037
680
818
280
But even many highly volatile markets can be difficult to trade if the dollar values of their moves are not high enough. For instance, say that you have a short-term
system with a profit factor as high as 2.2 that is expected to produce 5 5 % profitable
trades. In the best of worlds, you can expect the average winning trade to be half the
average true range of that market. So far, you have only traded it on T-bonds, which
is a very liquid and modestly volatile market for an average profit per trade of $294
(with $75 deducted for slippage and commission). N o w you would like to trade this
system on a m o r e volatile market, like orange juice. With a profit factor of 2.2 and
an average winning trade of $476 (see Table 6.1), the average losing trade is $216
($476 / 2.2). With 5 5 % profitable trades, a sequence of 20 trades will, on average,
produce a profit of $3,292 (11 X $476 - 9 x $216), which in turn breaks down to
an average profit of $165 per trade ($3,292 / 20). Deduct from that another $75 to
cover slippage and commission, and you are down to $90 per contract traded, or less
than one third of what you are making in the T-bonds. Considering that you only get
one or two chances like this per week, making only a little over a $100 a week simply is not worth sticking your neck out and running the risk of losing it all.
CHAPTER
From the previous chapters we have seen that short-term trading can be incredibly
rewarding, but also very risky, especially if the market you are trading simply does
not p r o d u c e the moves you seek. B e c a u s e not every market can produce a shortterm average profit big enough in dollar t e r m s , the only way to trade these markets
is to go with less frequent trading a n d longer trades that raise the value of the average trade to a level worth trading.
In the previous chapters we discussed how to classify trades and what might
constitute long t e r m and short term. It might be a good idea to always try to be as
short t e r m as you can w h e n it c o m e s to market time units (bars). W h e n y o u ' r e
designing a long-term system, measured in regular time units (days), you should
use weekly (or perhaps even monthly) data during the building and research process
so that you can work with as few market time units (bars) as possible. After an
optimal n u m b e r of time units for the system in question, the further away from the
signal you move, the less profitable and reliable your results will be, as can be seen
from Table 7 . 1 .
Table 7.1 shows the average profit per trade from a 20-day (four-week) breakout system, traded on the long side only on the S & P 500 stock index futures contract
over the period June 1983 to August 1999, and with all trades lasting for a certain
amount of days (weeks) no matter what. F r o m the top half of this table you can see
that, in this case, the longer the holding period, the higher the average profit. But
with a higher average profit comes a higher standard deviation of the individual outcomes, indicating that the uncertainty about the results also is increasing. This can
be measured by the ratio between the average profit and the standard deviation. As
long as the ratio is increasing as well, however, the average profit is growing faster
85
PART 2
86
TABLE
System Concepts
7.1
20
30
40
0.152
0.462
0.854
0.886
1.293
1.304
St. Dev.
2.033
2.822
3.368
3.842
4.913
4.982
Ratio
0.075
0.164
0.254
0.231
0.263
0.262
Profit/day
0.015
0.023
0.028
0.022
0.026
0.022
10
12
50
60
Weeks in trade
2
0.366
0.818
1.086
1.205
1.468
1.780
St. Dev.
2.136
2.651
3.433
3.559
4.571
4.746
Ratio
0.171
0.309
0.316
0.339
0.321
0.375
Profit/week
0.183
0.205
0.181
0.151
0.147
0.148
Profit/day
0.037
0.041
0.036
0.030
0.029
0.030
than the standard deviation, indicating a decreasing relative risk. In this case, the
ratio seems to level off after about 50 days, indicating that there is little to be gained
by staying any longer in the trade. This is confirmed by the average profit m a d e per
day, which starts to decrease after 30 days. Similar observations also can be made
from the bottom, weekly part of the table. What is even more important is that by
comparing the weekly data with the corresponding daily data, we can see that the
weekly data produce both m o r e profitable and less risky results, as measured by the
average profit and the standard deviation. That said, in the following long-term systems we work both with weekly and daily data.
MOVING AVERAGES
M o r e than one book or article has been written on the topic of moving averages,
m o s t of t h e m focusing on the basic crossover signal. T h e crossover signal is produced either by the price crossing o n e or several averages, or that of a faster moving average crossing a slower one. (A fast moving average is an average that is calculated with fewer data points, or a shorter lookback period, than a slow moving
average, and vice versa.) W i t h a basic system like this, most of us probably have
produced fantastic results on historical back-testing, only to discover that reality
looks less glamorous when the model is traded live or tested on previously unseen
data. To cure this, m a n y try to filter out the actual buy/sell signals, either by adding
additional requirements like only taking the trade after a retracement and/or on the
CHAPTER 7
87
88
PART 2
System Concepts
r e m e m b e r to treat each side as two different markets, traded with two different systems; w h e n the systems contradict each other, you can either choose to stay out or
trade in smaller positions.
Let's p u t together a m o d e l using the directional slope method, consisting of
two m o v i n g averages that will be the s a m e for both the long a n d the short side and
that will work equally as well on as m a n y markets as possible. A l s o , in accordance
with our finding that we will be better off using as few bars as possible when
examining the system, we will put it together using weekly data substituting a 200day moving average with a 40-bar moving average. At the end of the code we
attach our export function for the profit factor, percentage profitable trades, and
time-in-market, and tailor it so that it also exports the current moving average
combination. T h e TradeStation code for this system follows:
Input: EntryMA(lO), ExitMA(5);
Vars: EntryVal(O), ExitVal(O), PFactor(O), WTrades(O), TotBars(O), TradeStrl("");
EntryVal = Average(Close, EntryMA);
ExitVal = Average(Close, ExitMA);
Conditionl = EntryVal > EntryVal[1];
Condition2 = ExitVal > ExitVal[l];
If Conditionl = True and Condition2 = True Then
Buy at Close;
If Conditionl = False and Condition2 = False Then
Sell at Close;
If Condition2 = False Then
ExitLong at Close;
If Condition2 = True Then
ExitShort at Close;
If LastBarOnChart Then Begin
PFactor = GrossProfit / GrossLoss;
WTrades = NumWinTrades * 100 / TotalTrades;
TotBars = (TotalBarsLosTrades + TotalBarsWinTrades) * 100 / BarNumber;
TradeStrl = LeftStr(GetSymbolName, 2) + "," +
NumToStr(EntryMA, 0)+ "," + NumToStr(ExitMA, 0) + ",'* +
NumToStr(PFactor, 2) + "," + NumToStr(WTrades, 2) + "," +
NumToStr(TotBars, 0) + NewLine;
FileAppend('"D:\Temp\MaDirect.txt", TradeStrl);
End;
T h e m o d e l w a s tested on all moving average combinations on 16 different
markets over the period from January 1979 to October 1994. T h e rest of the data
CHAPTER 7
89
were saved for some out-of-sample testing. T h e 16 markets tested were: T-bonds,
live cattle, Japanese yen, corn, C a n a d a dollar, crude oil, dollar index, lumber,
orange j u i c e , S & P 500, copper, Eurodollar, C R B index, cotton, gold, and coffee.
No m o n e y w a s deducted for slippage and commission. T h e data w a s put together
using the ordinary point-based back-adjustment method.
With all the data exported into Excel, we build a matrix as a base for a surface chart. This lets us graphically examine our data and look for robust and stable
moving average combinations, which are likely to continue to hold up in the future.
Start by using the data-sort function to sort first by the Entry MA and then
by the Exit M A . Then type in the following formulae in two adjacent c o l u m n s , and
fill d o w n to the bottom of the spreadsheet.
To calculate the average profit factor for each moving average combination:
=IF(C17<>C18;AVERAGE(D2:D17);"")
where column C denotes the Exit MA and c o l u m n D the profit factor for each
moving average combination and market.
To calculate the ratio between the profit factor a n d its standard deviation:
=IF(G2<>"";G2/STDEV(D2:D17);"")
where column G denotes the previously calculated average profit factor.
=INDEX(B:B;2+((ROW()-2)*16))
where column B denotes the Entry M A . T h e value 16 stems from the fact that we
are testing on 16 markets.
=INDEX(C:C;2+((ROW()-2)*16)),
= INDEX(G:G;2+((ROW()-2)* 16))
=INDEX(H:H;2+((ROW()-2)* 16))
where column H denotes the ratio between the profit factor and its standard deviation.
W h e n this is done, in an adjacent column, leave the top cell blank and fill in
the values 0 to 11 in the following rows. Starting at the top row in the next colu m n , fill in the values 0 to 11 in the following c o l u m n s . Figure 7.1 shows what
this can look like.
Figure 7.1 shows a sample matrix created in a spreadsheet p r o g r a m after we
exported the necessary data from TradeStation and applied the suggested formulas. In cell Q2 fill in the following formula and c a r r y it out all the way to cell
AA2:
=INDEX($K:$K;2+(P1*1))
w h e r e column K denotes the Exit MA and cell PI denotes the value zero.
90
PART 2
FIGURE
System Concepts
7.1
CHAPTER 7
91
FIGURE
7.2
A n o t h e r m e t h o d is to calculate how often a specific moving average c o m b i nation happens to be a m o n g , for instance, the top 10 combinations for each market or a m o n g , for instance, the top 200 for all markets. Using our Entry MA as an
e x a m p l e , in Figure 7.4 we can see that all Entry M A s between 14 and 20 bars were
a m o n g the best 200 combinations at least 15 times each, with the 16-bar MA topping the crowd with a total of 27 occurrences. This strengthens our conclusion that
an Entry MA of 18 bars will be a robust and stable choice that is likely to hold up
in the future.
Figure 7.5 shows yet another e x a m p l e of this technique, but this time we
have sorted on the percent profitable trades c o l u m n and for how m a n y times we
could find any Exit M A s a m o n g the best 200 c o m b i n a t i o n s . As you can see, if
y o u ' r e looking to b o o s t the n u m b e r of profitable trades, you should go for an Exit
MA in the 6- to 10-bar region. T h e jewel of the crown is the 8-bar M A , with 27
occurrences.
92
PART 2
System Concepts
Exit MA
FIGURE
7.3
The ratio between the average profit factor and the standard deviation shows the robustness of the system.
Tables 7.2 and 7.3 show how the directional slope system, with an 18-bar
Entry MA and an 8-bar Exit M A , would have performed on the individual markets
on both the in-sample data and the out-of-sample data. For the in-sample period,
the average profit factor w a s 1.91. With the ratio between the profit factor and its
standard deviation equal to 3.13, the standard deviation c o m e s out to 0.61 (1.91 /
3.13), which m e a n s that we can be 6 8 % sure that the true average profit factor will
be no lower than 1.30 (1.91 - 0.61). D u r i n g the out-of-sample period, the average
profit factor was 2.09. With the ratio between the profit factor and its standard
deviation equal to 0 . 7 3 , the standard deviation c o m e s out to 2.86 (2.09 / 0.73),
w h i c h m e a n s that we no longer can be 6 8 % sure that the true average profit factor
will be above 1. Hence, the profit factor w a s slightly higher for the out-of-sample
data than for the in-sample data, but the price for this came in the form of a smaller ratio between the profit factor and its standard deviation, which m e a n s that the
system has b e c o m e less robust.
CHAPTER 7
93
FIGURE
7.4
Number of top 200 profit factor occurrences for different entry MAs.
FIGURE
7.5
PART 2
94
TABLE
System Concepts
7.2
Entry MA
Exit MA
P factor
% Winners
% In trade
Corn
18
2.06
36.99
Canada dollar
18
46.25
77.00
77.00
Crude oil
CRB index
18
54.35
77.00
18
8
8
1.29
2.73
1.02
33.33
72.00
Cotton
18
2.28
81.00
Dollar index
18
2.07
Eurodollar
18
8
8
45.71
42.86
2.94
48.00
76.00
Gold
18
1.85
42.11
76.00
Copper
18
8
8
1.70
77.00
Japanese yen
18
2.28
35.29
54.84
Coffee
18
2.59
41.03
77.00
Lumber
18
1.99
42.86
76.00
Live cattle
Orange juice
18
8
8
1.48
35.71
79.00
18
1.96
44.16
78.00
S&P 500
18
0.63
T-bonds
18
1.73
33.33
45.83
77.00
Average
1.91
42.67
77.19
Ratio
3.13
6.43
36.68
TABLE
76.00
78.00
81.00
7.3
Entry MA
Exit MA
P factor
% Winners
% In trade
Corn
18
12.16
69.23
75
Canada dollar
18
1.19
40
76
Crude oil
18
2.61
52.17
80
CRB index
18
18
40
2.5
0.79
71
80
Dollar index
Eurodollar
18
0.87
18
0.58
Gold
18
1.72
37.5
47.62
Copper
18
0.85
26.92
85
Japanese yen
18
4.37
66.67
76
Coffee
Lumber
18
0.92
25
83
18
1.36
52.38
76
Live cattle
18
1.13
74
Orange juice
18
0.38
45.45
24.14
S&P 500
T-bonds
18
8
8
0.72
40.91
41.67
82
Cotton
Average
Ratio
18
1.23
2.09
0.73
25.93
28.57
73
74
80
83
41.51
78
77.88
2.98
18.93
CHAPTER 7
95
Just because the system has b e c o m e less robust, however, does not have to
m e a n that it is no longer working as well. It could be that it is still just as good in
catching the right types of moves, but there simply have been no such moves to
catch. O n e way to find out is to look at the overall average profit factor and its
standard deviation ratio for all m a r k e t s and moving average combinations, for both
the in-sample period and the out-of-sample period. This is not shown, so you just
have to take my w o r d for it, but as it turns out the profit factor for the in-sample
period w a s 1.77, as c o m p a r e d to 1.73 for the out-of-sample period. N o t m u c h of a
difference, but what is interesting is that the ratio between the profit factor and the
standard deviation has decreased from 2.63 for the in-sample period, to a mere
1.07 for the out-of-sample period, which m e a n s that not only has the 18/8 combination b e c o m e less robust, but so has the entire logic for this trend-following
m e t h o d (and perhaps all trend-following methods).
Another interpretation is that during the out-of-sample period, most markets
simply have not been in strong enough trends, while others have been trending
extremely well. This results in a higher profit factor, but indeed also in a m u c h higher standard deviation. This can, for instance, be seen in Table 7.3, where corn and
Japanese yen have extremely high profit factorsespecially cornwhile almost all
of the others are losing money, as indicated by a profit factor below or very close to
1, which won't m a k e up for the slippage and commission on real trading.
T h u s , the system still seems to be able to catch the right types of moves, but
for m o s t markets, these moves simply have not b e e n strong enough. Even so, you
would have m a d e a profit during the out-of-sample period as well, as indicated by
an average profit factor above 2, and thanks to a couple of good moves in a few
markets. T h e ride would just have been a little choppier.
Notice also that Figure 7.3 indicates that the trends have not been strong
enough, not that they have disappeared all together. This information can be
derived from the fact that the percentage of profitable trades only decreased from
4 3 % for the in-sample period to 4 2 % for the out-of-sample period, and the 18/8
setting; and from 4 0 % to 3 9 % for the entire methodology (not shown). Again,
however, there is a higher standard deviation for the out-of-sample period, which
again confirms the fact that a few markets have m a d e up for all the others.
This also can be seen from Figures 7.6 a n d 7.7, which are derived the s a m e
way as Figures 7.2 and 7.3, except this time with data for the period October 1994
to October 1999. T h e main difference between Figure 7.2 a n d 7.6 is that during the
out-of-sample period, the profit factor has b e c o m e m o r e heterogeneous, with a few
markets m a k i n g bigger profits than previously and m a k i n g up for m a n y small losses and below previously expected average profits m a d e by other markets. This is
also confirmed by the differences between Figures 7.3 and 7.7.
O n e other interesting observation that can be m a d e from comparing the insample charts and the out-of-sample charts is how well a 12-bar Exit MA holds up
in both periods. Therefore, it can be interesting to look a little closer at the 18/12
PART 2
96
10
11
12
13
14
System Concepts
15
Exitcombinations
MA
The average profit factor for different MA
for the out-of-sample period.
FIGURE
7.6
combination as well. As it turns out, these findings are the s a m e as those for the
18/8 combination. That is, a few very profitable markets keep the overall average
profit factor very high, but with all the other markets showing very low or no profits at all, resulting in a very low stability (high standard deviation).
But this is not the most interesting observation that can be m a d e when studying all four charts. Yet another very interesting finding is the relative robustness
surrounding the area of the 6-bar Exit M A . Figures 7.2 and 7.3 show that this
entire area has a profit factor ranging from approximately 1.6 to 1.9, with a ratio
ranging from 2.0 to 3.0. Not top values by any m e a n s , but good enough, especially considering that these values do not change that m u c h in Figures 7.6 and 7.7,
w h e r e the s a m e values range from approximately 1.0 to 2.0, and from 1.5 to 2.5,
respectively. T h e s e values are perhaps a little lower than for the 18/8 and 18/12
combinations, but the relative robustness over time m a k e s this an interesting area
to consider.
CHAPTER 7
FIGURE
97
7.7
The ratio between the average profit factor and the standard deviation for the out-of-sample period.
As for the 18/8 and 18/12 combinations: Just because they have not worked
as well nor been as stable on the out-of-sample data does not m e a n that they d o n ' t
w o r k in the long run, but simply that they haven't worked that well on that m a n y
m a r k e t s recently. R e m e m b e r also that the sole p u r p o s e of m a n y trend-following
systems is to catch the few winners that will m a k e up for m a n y of the losers that
occur w h e n trends aren't strong enough to generate decent profits. This is exactly
the situation we have h a d during our out-of-sample period.
A group of aspiring young traders trained by Richard Dennis. Dennis named the group "turtles" after having
visited turtle farms in Singapore and having decided to grow traders as the farms grew turtles.
PART 2
98
System Concepts
CHAPTER 7
99
PART 2
100
FIGURE
7.8
System Concepts
CHAPTER 7
101
PART 2
102
System Concepts
CHAPTER 7
103
Table 7.4 shows that the original system (version l a ) indeed h a d the highest
profit factor, but that this also c o m e s at the expense of a higher standard deviation,
as c o m p a r e d to version l b . This is illustrated by the first ratio column, w h i c h
depicts the ratio between the profit factor a n d its standard deviation. T h e higher
the ratio, the m o r e h o m o g e n o u s the behavior between the m a r k e t s . For instance,
with a profit factor of 1.46 and a ratio of 2.74, D B S system version la cannot be
expected, with 6 8 % certainty, to p r o d u c e a profit factor above 1 (1.46 1.46 /
2.74 = 0.93). This also holds true for version lb (1.36 - 1.36 / 3.52 = 0.97), b u t
in choosing b e t w e e n the two, version lb c o m e s out on top because of its higher
stability. Interestingly enough, all version b systems have higher ratios than their
version A counterparts, except for the t i m e spent in the market. In addition, w h e n
it c o m e s to the two m o s t important readings, the profit factor and the percentage
profitable trades, all version 2b systems also show better results. T h a t is, in m o s t
instances, not only do the version b systems show results that are m o r e profitable,
they also s e e m to be m o r e robust when c o m p a r e d b e t w e e n different markets.
L e t us take a closer look at version lb in Tables 7.5 and 7.6, and see h o w it
performed on all the individual markets. For this we also use a variation of our
trade-by-trade export function, w h i c h we also developed in Part 1. To do so, we
also m u s t switch over to the R A D contract. T h e code for this version of the export
function follows:
M
TABLE
7.4
P Factor
Ratio
Trades
Ratio
VeMa
1.46
2.74
145
VeMb
1.36
3.52
140
Ver 2a (HV)
1.36
2.64
Ver 2b (HV)
1.38
Ver 2a (ATR)
Ver 2b (ATR)
% Prof.
Ratio %
In market
Ratio
7.39
37.24
5.64
79
28.29
7.89
40.90
8.16
80
33.65
100
7.10
39.21
5.72
88
27.67
2.65
116
7.48
40.02
6.54
76
15.95
1.35
2.71
107
6.78
39.24
5.73
90
42.50
1.36
2.92
119
7.49
39.36
.39
81
21.58
PART 2
104
System Concepts
TABLE
7.5
P Factor
Trades
% Prof.
% In market
Canada dollar
1.03
152
38.82
78
Coffee
1.47
155
39.35
79
Copper
0.90
158
39.87
80
Corn
1.72
144
42.36
81
Cotton
1.27
148
35.14
84
CRB index
0.65
114
30.70
78
Crude oil
1.56
117
47.01
82
Dollar index
1.60
95
44.21
83
Eurodollar
1.78
127
46.46
83
Gold
1.53
141
43.26
80
Japanese yen
2.05
144
50.00
78
Live cattle
0.83
157
35.03
79
Lumber
1.38
147
40.14
78
Orange juice
1.62
152
41.45
79
S&P 500
1.00
139
36.69
78
T-bonds
1.33
146
43.84
85
CHAPTER 7
TABLE
105
7.6
Avg. Profit
Market
(%)
Canada dollar
0.04
26
Coffee
1.51
541
Copper
($)
(%)
Avg. Loss
($)
(%)
1.61
1,092
-0.80
-545
13.46
4,830
-5.76
-2,065
-848
($)
-0.34
-67
5.91
1,178
-4.25
Corn
1.00
100
7.47
749
-3.48
-349
Cotton
0.72
194
8.76
,340
-3.81
-1,017
CRB index
-0.52
-532
2.74
2,793
-1.78
-1,814
Crude oil
2.38
545
10.74
2,463
-5.40
-1,239
Dollar index
0.67
663
3.13
3,100
-1.44
-1,427
Eurodollar
0.09
208
0.59
1,378
-0.29
-677
Gold
0.59
175
5.53
1,628
-2.98
-876
Japanese yen
1.02
1,225
4.30
5,188
-1.90
-2,294
Live cattle
0.01
3.89
1,057
-2.64
-716
Lumber
0.37
93
9.43
2,368
-5.09
-1,277
Orange juice
S&P 500
T-bonds
1.21
162
8.64
1,156
-4.43
-592
-0.33
-1,093
3.94
12,848
-2.78
-9,060
0.23
255
3.81
4,250
-2.24
-2,499
Let us also investigate how version lb would have performed over two different time periods and see if we can add to or confirm any of the conclusions we
m a d e about our directional slope system in the previous chapter. In this case, we
will look at the periods January 1980 to October 1989 (Table 7.7) and January
1990 to October 1999 (Table 7.8). Table 7.7 shows that, although this version of
the D B S system trades profitably in m o s t markets, the profit factor is somewhat
on the low side. N o t e also that the profit factor differs somewhat from our original findings, due to the different contracts used. Here I used the ratio-adjusted contract and calculated the profit factor with the help of the average weighted values
of the winners and losers. As shown in Table 7.8, for the last ten years, the results
look even less promising.
As w a s the case with the directional slope system, we can say that this version of the D B S system has not performed as well recently as in the past. This can
be seen, for instance, from the average profit factor for the two periods, which not
only is slightly lower for the later period, but also has a higher standard deviation
than in the earlier period. As for all other numbers, they too are not as good for the
later period. T h e n u m b e r of profitable trades, for example, has decreased ever so
slightly; but another indication that there are less profitable trades can be derived
from the time in market column and the n u m b e r of trades column. Usually, the
PART 2
106
System Concepts
P factor
Trades
% Winners
% In trade
Canada dollar
1.01
78
37.18
79
Coffee
1.66
76
39.47
79
Copper
0.71
80
37.5
82
Corn
1.65
71
42.25
84
Cotton
1.32
68
36.76
86
CRB index
0.84
25
28
74
Crude oil
2.31
40
55
84
Dollar index
1.04
28
35.71
82
Eurodollar
1.91
41
51.22
82
Gold
1.48
68
42.65
77
Japanese yen
2.44
71
56.34
78
Live cattle
0.97
70
40
77
Lumber
1.38
70
40
81
Orange juice
2.41
69
49.28
81
S&P 500
1.25
56
39.29
75
T-bonds
1.35
73
42.47
85
Average
1.48
61.50
42.07
80.38
Ratio
2.71
3.44
5.62
22.60
% Winners
% In trade
TABLE
7.8
P factor
Trades
Canada dollar
0.95
72
38.89
75
Coffee
1.33
76
39.47
78
Copper
1.11
74
41.89
76
Corn
1.9
68
45.59
76
Cotton
1.16
75
36
83
CRB index
0.57
83
33.73
78
Crude oil
1.24
74
43.24
80
Dollar index
2.37
58
51.72
80
Eurodollar
3.12
38
60.53
85
Gold
1.53
70
44.29
81
Japanese yen
1.83
69
43.48
77
Live cattle
0.62
81
32.1
80
Lumber
1.39
73
39.73
75
Orange juice
0.85
80
33.75
76
S&P 500
0.92
79
34.18
79
T-bonds
1.44
66
46.97
83
Average
1.40
71.00
41.60
78.88
Ratio
2.11
6.57
5.58
25.84
CHAPTER 7
107
higher the profit factor, the fewer the trades and, simultaneously, the m o r e time
spent in the market. It will be interesting to see if we can improve on these n u m bers in the u p c o m i n g sections.
C o m p a r e d to the directional slope system, the profit factor also is considerably lower, while the percentage of profitable trades is approximately the same,
albeit with a lower standard deviation. This is an interesting observation that suggests that whatever system you chose, there always is a price to pay, and you have
to c o m p r o m i s e on one performance measure in favor of another.
R o t h the D B S system and the directional slope system have in c o m m o n the
fact that they do not have any fixed stop levels. Although the directional slope system lacks a natural stop level completely, the D B S system at least has a d y n a m i c
level. Even in version l b , however, this level is running the risk of moving away
from the market, which m a k e s it difficult to trade this system with a fixed fractional m o n e y m a n a g e m e n t strategy.
This takes us back to the beginning of this section where we talked about the
turtles-, because what is even m o r e important for a turtle than w h e n or what to
trade, is h o w m u c h to trade. For a turtle it is vital to cut b a c k in size during times
of high volatility and drawdown to preserve as m u c h capital as possible in expectation of the next major move, which can c o m e in any market.
PART 2
108
FIGURE
7.9
System Concepts
CHAPTER 7
109
110
PART 2
FIGURE
7.10
System Concepts
CHAPTER 7
FIGURE
7.11
111
PART 2
112
System Concepts
W h e n it c o m e s to using the Bollinger bands in a trading system, another disadvantage is that you will take the volatility into consideration twice, as compared
to what happens in a basic breakout system. For instance, if you currently do not
have a position on and the market is in a relatively w i d e trading range, with relatively high historical volatility readings, it already is relatively difficult for an ordinary highest high/lowest low breakout system to enter the market, because of the
large distance between these entry levels. But to a Bollinger band-type system you
also have to add the distance to the upper a n d lower bands which, because of the
volatility, could be placed at a considerable distance away from the highest high and
lowest low. Also, as is the case with m a n y breakout-type systems, most Bollinger
bands systems only seem to take the volatility into consideration when entering the
market but not w h e n exiting. Instead the exit usually is governed only by a crossover of the mid-band, which most of the time is a standard moving average.
Nonetheless, here is an alternative long-term system, w h e r e we m a k e it even
harder than usual to enter. T h e TradeStation code follows:
Inputs: BandLen(60);
Vars: UpBand(O), LoBand(O);
UpBand = XAverage(High, BandLen) + 2* StdDev(High, BandLen);
LoBand = XAverage(Low, BandLen) - 2 * StdDev(Low, BandLen);
Buy tomorrow at UpBand Stop;
Sell tomorrow at LoBand Stop;
ExitLong tomorrow at XAverage(Low, BandLen) Stop;
ExitShort tomorrow at XAverage(High, BandLen) Stop;
As you can see from the code, for the upper band, we have substituted the
closing price with the high, and for the lower band, we have substituted the closing price with the low. We also have m a d e it a little m o r e difficult to exit by substituting the closing price with the low, for the long exit, and the high, for the short
exit. To c o m p e n s a t e s o m e w h a t for both the slower/delayed entries and exits, we
also substituted the standard moving average for an exponential one. All in all, we
hope that these slight changes to the original setup will w e e d out a few trades that
were b o u n d to go nowhere and only catch those signals that have a high enough
m o m e n t u m to follow through and develop into a profitable trade. T h e lookback
period is set to 60 days and has not been optimized in any way. To find an optimal,
robust setting you could use the same technique as we did for the directional slope
system, w h e r e we exported the different moving average combinations and then
put together a couple of so-called surface charts.
T h e m o d e l w a s tested on data from January 1980 to D e c e m b e r 1992. The
period January 1993 to October 1999 w a s saved for some out-of-sample testing,
after we added a few additional stops and s o m e sort of filter, in section three and
four, respectively. T h e 16 markets tested were D-mark, crude oil, lumber, copper,
CHAPTER 7
113
gold, dollar index, live cattle, T-bonds, cotton, Japanese yen, natural gas, wheat,
Nikkei, coffee, T-bills, and r o u g h rice. Because we used the ordinary point-based
back-adjusted contract, we added the export function for the profit factor, days in
trade, and percentage profitable trades to the code above, for further analysis in a
spreadsheet program. Table 7.9 shows the results. No m o n e y has been deducted for
slippage a n d commission.
As y o u can see from Table 7.9, this version of the Bollinger bands system
s e e m s to have several desirable features, such as a high profit factor in m o s t markets, a high percentage of profitable trades, and a fairly low percentage of the time
spent in the market. In fact, as Table 7.9 shows, all markets traded profitably, with
profit factors well above 1 in m a n y cases a n d with the average profit factor as high
as 3.82, attributable to the slight changes we m a d e to the original system. For a
long-term system, m o s t markets also h a d a very high percentage of profitable
trades, with an average of 5 1 . 7 4 % profitable trades per market.
TABLE
7.9
P factor
Trades
% Winners
% In trade
Deutsche mark
3.62
34
61.76
59
Crude oil
5.41
23
73.91
61
Lumber
1.21
46
32.61
53
Copper
2.29
37
40.54
52
Gold
1.67
43
41.86
55
Dollar index
3.92
17
64.71
54
Live cattle
1.32
34
38.24
44
T-bonds
1.94
33
45.45
52
Cotton
2.32
39
43.59
59
Japanese yen
3.01
40
60
62
Natural gas
10.28
66.67
82
Wheat
2.37
38
34.21
53
Rough rice
12.65
15
66.67
59
Timber
3.41
33
60.61
62
3.3
34
47.06
50
50
63
Coffee
Nikkei index
2.42
PART
TWO
In this part, we created a few basic trading systems to take with us to the u p c o m ing sections, w h e r e we will continue to develop and e x a m i n e t h e m further.
A l t h o u g h all the systems have been very basic, with as few rules as possible, we
have shown that it is possible to exploit different types of market behavior and create a trading system that is likely to continue to work well in the future and on several different m a r k e t s s o m e t i m e s even on markets the system has not been tested
on previously.
In fact, the whole key to m a k i n g a system robust is to keep it as simple as p o s sible, while at the s a m e time m a k i n g sure it works well on several different markets.
Notice once again that the key words here are "work well," not " b e profitable." For
a well-working system to be profitable it needs to be applied to a market that can
exhibit a high enough dollar value in relation to the moves the system is designed
to catch. This does not always have to be the case, but this does not m e a n that the
system is a b a d system.
Before we go on to Part 3 , 1 would like to leave you with a few questions and
a little food for thought. Is there a way of measuring curve fitting? Is it as easy as
saying that the better the result, the m o r e curve-fitted the system; or the m o r e rules,
the m o r e curve-fitted the system? For instance, say that you just have finished
building a system with thousands of rules, which will capture every historical daily
m o v e in the S & P 500 futures contract perfectly. No doubt this system is curve fitted, but w h a t if you reverse all the rules? In other words, for every rule you had, you
will add o n e rule, ending up with twice as many. W h a t will the historical results
from this system be? T h e y will be disastrous. So is this second system m o r e or less
curve fitted that the first one?
115
116
PART 2
System Concepts
PART
THREE
Getting Out
O n c e you have a basic idea about what you would like to achieve with your system
and which type of moves you would like it to catch, it is time to start experimenting
with different types of stops a n d exits. If you wish, you can look at any basic system, like those in the previous section, as a set of entry rules only. That is, the basic
system tells you w h e n it is time to enter into a long, short, or neutral position. Of
course, entering into a short position usually also m e a n s exiting a long position. But
in essence, a basic system is a set of entry rules, which we hope signals a high-probability trading opportunity, no m o r e no less. But as so m a n y successful traders have
said, "anyone can enter the market, but to be successful in the long run, the trick is
to consistently exit with profits that are bigger than the losses."
F r o m this it follows that m o s t of the time the exits are m u c h m o r e important
than the entries. Therefore, starting out with the entry is not always the best way to
go. Of course, you might already have c o m e up with a set of excellent entry techniques without giving the exits any second thoughts. In that case, it should "only" be
a question of examining or adding a set of exits to improve performance even further.
S o m e t i m e s , however, it is an even better idea to start out w i t h the stops and
exits, and work b a c k w a r d to c o m e up with a simple entry technique that matches
your exit criteria a n d the underlying assumptions for the trade. Notice, however,
that this does not by any m e a n s m e a n that the work you do looking into different
entries is a waste of time, because m a n y times it will turn out that there will be a
better entry technique than the one with w h i c h you started. B u t to k n o w about it you
n e e d to have e x a m i n e d and tested it on a previous occasion.
In Part 4, we continue the development process by adding some sort of filter
technique. A filter efficiently keeps you away from the markets as m u c h as possible,
117
PART 3
118
Getting Out
only letting you place a trade according to your original or modified triggers after
you have examined and constructed the exit techniques. By necessity (and whether
you like it or not), filters and entries always to s o m e extent try to forecast the market. Exits, on the other h a n d never try to forecast the market, but only tell you
whether this position, as it looks so far, keeps up with what could be expected and
that it doesn't run a m o k with your account. A good exit should also let you use your
entry and filter techniques as often as possible without letting such use affect the
bottom line. T h e normal order of w o r k then, is as follows:
Start out with a basic, stable, and robust set of entries, a n d let the entry for
one position (long, short, or neutral) also signal the exit for any other type of
position.
If necessary, change the entry technique and/or a d d a filter to sift out lowprobability trades.
CHAPTER
Efficient Trades
120
PART 3
Getting Out
Exit efficiency = (Highest price Exit price) / (Highest price Lowest price)
FIGURE
8.1
CHAPTER 8
Efficient Trades
121
already touched upon in Part 1: the start trade d r a w d o w n ( S T D ) , the end trade
drawdown ( E T D ) , the closed trade drawdown ( C T D ) , and the total equity drawd o w n ( T E D ) . A l m o s t every trade can be divided into three distinct parts. First,
there is the STD, leading down to the low. T h e n there is the actual m o n e y - m a k i n g
phase, leading up to the high. Finally, there is the E T D , leading d o w n to the exit
level and the final profit.
A l t h o u g h this last conclusion is very important, however, it is not the m a i n
reason why these efficiency calculations are good to look at but not to tinker with.
As you can see, all values are expressed as percentages or ratios of the distance
between the low and high values for the trade. B e c a u s e they are ratios, they work
well as comparison measures, b e t w e e n both different markets and different t i m e
frames. B u t if you would like to do something about them, like adding different
exit techniques or add-on entries, you m u s t look at all the price changes and relationships in percentages as well.
For instance, if you would like to add a stop loss to this system, you cannot
calculate that stop in dollar t e r m s , but have to do it in percentage t e r m s . As we discussed, this is because we want all our trades to be affected in the s a m e way,
whether the stop is applied to a m a r k e t that has been trending heavily or to several different m a r k e t s that trade at different levels and point values. With this also
c o m e s the necessity of using the R A D contract that is p u t together using percentage differences rather than point differences, on the day for the roll from one contract to the next.
DRAWDOWNS
A h , d r a w d o w n s ! There is plenty that can be said about this intriguing subject. But
what m a n y traders do not know, is that the drawdown is highly overrated as a syst e m testing decision variable. T r u e , the d r a w d o w n should be neither neglected
completely nor investigated less than thoroughly, but you m u s t know w h a t you are
doing and w h a t you are investigating. For o n e thing, the estimated largest drawdown holds valuable information about h o w large your account size m u s t be and
can give you an indication about whether y o u have the psychological profile to
trade the system in question. Unfortunately, however, the information that can be
derived from m o s t system-testing p a c k a g e s will not be enough, because the n u m ber is given in dollars without any relation to w h e r e and w h e n this b a d sequence
of trades struck you.
Aside from not placing the drawdown in relation to the market situation at
the time, another major error m o s t system designers m a k e when they are building
a n d evaluating systems is only to look at the overall total equity drawdown ( T E D ) .
This is calculated using b o t h the open equity and the already closed out equity on
your account. For instance, say that you, at a specific point in time, d o n ' t have any
positions and that your last trade was a $3,000 winner that also took your account
122
PART 3
Getting Out
to a n e w total equity high at, let's say, $9,000. But before you m a n a g e d to exit the
position, it gave back $1,000 of its open equity.
A c c o r d i n g to m o s t analysis packages, this m e a n s that even t h o u g h you managed to a d d $3,000 to your closed out equity, you n o w are $1,000 in the hole as
c o m p a r e d to your latest total equity high. Furthermore, if your next trade turns out
to be a loser that immediately had you stopped out with a $4,500 loss before, your
closed out equity n o w is $4,500, and your d r a w d o w n is $5,500. Then you have a
$5,000 w i n n e r which, before it took off, started out going the w r o n g way with an
additional $1,000, leaving you $6,500 in the hole. T h e n it gave back $1,500 of the
open profit, and your total equity drawdown would now be a $1,500. Figure 8.2
shows what this sequence of trades could have looked like.
However, if you look closely at these n u m b e r s , they consist of three different
types of drawdowns. At point 3, we are dealing with the end trade drawdown
( E T D ) that tells us how m u c h of the open profit we h a d to give back before we
were allowed to exit a specific trade. At point 4, we are looking at the closed trade
drawdown ( C T D ) that measures the distance between the entry and exit points
without taking into consideration w h a t is going on within the trade. At point 5, we
are dealing with the start trade drawdown (STD) that measures how m u c h the trade
went against us after the entry and before it started to go our way. A n d at point 7,
finally, we again have to do with the E T D .
FIGURE
8.2
CHAPTER 8
Efficient Trades
123
124
PART 3
FIGURE
Getting Out
8.3
The final profit In relation to the STD/MAE for the intraday Meander system.
market, from which, after this level has been tested a n d y o u ' v e entered the trade,
the m a r k e t usually m a k e s yet another correction before the final penetration and
follow-through takes us away (we h o p e ) in a major trending m o v e . Yet, other
s y s t e m s might completely lack any specific levels around which to place any
natural orders. In our directional slope system, for instance (which b a s e d its
entries on the slope of the m o v i n g average rather than the crossover), getting a
feel for the S T D is crucial, because this system, as it is constructed so far, operates not only completely without any actual levels for w h e n a trade gets triggered,
but also completely without any exit rules as we define t h e m . Figure 8.4 shows
that there is no connection b e t w e e n the level of the price or the m o v i n g average,
a n d the reason w h y the trade is triggered. (Note that in this section we work with
an 18-bar Entry MA a n d a 12-bar Exit M A . )
To start looking for the S T D / M A E and E T D / M F E levels that should work
well on several different markets and time periods, we must do all our research
with the R A D contract. To export the necessary data for the directional slope syst e m into a spreadsheet program, use the following TradeStation code:
Input: EntryMA(18), ExitMA(12);
Vars: EntryAvg(O), ExitAvg(O), LongEntry(O), ShortEntry(O), LongExit(O),
ShortExit(O), LongEntryDate(O), ShortEntryDate(O), LongExitDate(O),
CHAPTER 8
FIGURE
Efficient Trades
8.4
125
PART 3
126
Getting Out
CHAPTER 8
Efficient Trades
127
ExitShort at Close;
MP = MarketPosition;
TotTr = TotalTrades;
If MarketPosition = 1 Then Begin
If BarsSinceEntry = 1 Then Begin
LowestLow = LongEntry;
HighestHigh = LongEntry;
HighToLow = 0;
TradeStr2 = NumToStr(PosProf, 4);
MAE = 0;
MFE = 0;
MFEBar = BarNumber;
MAEfe = 0;
End;
PosProf = (Close LongEntry) / LongEntry;
TradeStr2 = TradeStr2 + '*," + NumToStr(PosProf, 4);
If Low < LowestLow Then Begin
LowestLow = Low;
MAE = (LowestLow LongEntry) / LongEntry;
End;
If High > HighestHigh Then Begin
HighestHigh = High;
MFE = (HighestHigh LongEntry) / LongEntry;
MFEBar = BarNumber;
HighToLow = Lowest(Low, (MFEBar MaxList(MFEBar[ 1 ], LongEntryBar)));
PrelMAEfe = (HighToLow - HighestHighfl]) / HighestHighfl];
If PrelMAEfe < MAEfe Then
MAEfe = PrelMAEfe;
End;
End;
If MarketPosition = 1 Then Begin
If BarsSinceEntry = 1 Then Begin
LowestLow = ShortEntry;
HighestHigh = ShortEntry;
LowToHigh = 0;
TradeStr2 = NumToStr(PosProf, 4);
PART 3
128
Getting Out
MAE = 0;
MFE = 0;
MFEBar = BarNumber;
MAEfe = 0;
End;
PosProf = (ShortEntry - Close) / ShortEntry;
TradeStr2 = TradeStr2 + "," + NumToStr(PosProf, 4);
If High > HighestHigh Then Begin
HighestHigh = High;
MAE = (ShortEntry - HighestHigh) / ShortEntry;
End;
If Low < LowestLow Then Begin
LowestLow = Low;
MFE = (ShortEntry - LowestLow) / ShortEntry;
MFEBar = BarNumber;
LowToHigh = Highest(High, (MFEBar MaxList(MFEBar[ 1 ], ShortEntryBar)));
PrelMAEfe = (LowestLow[l] LowToHigh) / LowestLow[l];
If PrelMAEfe < MAEfe Then
MAEfe = PrelMAEfe;
End;
End;
If TotTr > TotTrfl] Then Begin
I f M P [ l ] = 1 Then Begin
PriceForEntry = LongEntryfl];
PriceForExit = LongExit[l];
FTE = (PriceForExit - PriceForEntry) / PriceForEntry;
ETD = (PriceForExit - HighestHigh[ll) / Highesthigh[l];
DateForEntry = LongEntryDatefl];
DateForExit = LongExitDate[l];
BarsForTrade = LongExitBar[ 1 ] - LongEntryBar[l];
If MAEfe[l] > (PriceForExit - HighestHigh[l]) / HighestHigh[l]
Then
MAEfe = (PriceForExit - HighestHigh[l]) / HighestHighfl];
End;
I f M P [ l ] = -1 Then Begin
PriceForEntry = ShortEntry[1];
CHAPTER 8
Efficient Trades
129
PriceForExit = ShortExit[l];
FTE = (PriceForEntry - PriceForExit) / PriceForEntry;
ETD = (LowestLowfl] PriceForExit) / LowestLow [1];
DateForEntry = ShortEntryDatefl];
DateForExit = ShortExitDate[l];
BarsForTrade = ShortExitBarfl] - ShortEntryBar[l];
If MAEfe[l] > (LowestLow[l] - PriceForExit) / LowestLow[l] Then
MAEfe = (LowestLow[l] PriceForExit) / LowestLow[l];
End;
If FTE < MAE[1] Then
MAE = FTE Else MAE = MAE[1];
If FTE > MFE[1] Then
MFE = FTE Else MFE = MFE[1];
TradeStrl = LeftStr(GetSymbolName, 2) + "," + NumToStr(MP[l], 0) +
","
PART 3
130
Getting Out
T h e result is that TradeStation enters a n d exits each trade on the very same
open, leaving you with a b u n c h of zero-bar, zero-profit trades. T h e s e , by the way,
are all counted as winners in the performance summary. I do not k n o w about you,
but to me a w i n n e r is a trade that ends up with a profit; everything else is a loss.
O n e way to work around this is to rewrite the code to:
Buy at close;
If BarsSinceEntry > = 1 Then Begin
ExitLong ("Loss") tomorrow at EntryPrice * 0.98 stop;
ExitLong ("Profit") tomorrow at EntryPrice * 1.02 limit;
End;
B u t then TradeStation simply skips a bar before it starts to track the trade and
does not let you exit the trade until bar three (counting the b a r for the entry as bar
one), which w o n ' t c h a n g e even if you decide to enter at the open instead of the
close. A n d setting the BarsSinceEntry function equal to or greater than zero does
not work either.
Another example of the same flaw is when you, for instance, enter a trade intrabar on a breakout. You will not be able to exit on the close, or intrabar of that same
bar, no matter h o w m u c h the market moves against you, as suggested by the closing
price of that same bar. (That is why I have chosen to do all the research for the intraday version of the Meander system within Excel, rather than in TradeStation.)
To m e , this is the equivalent of Excel's purporting to calculate everything in
a spreadsheet correctly, without Microsoft's letting you k n o w that sometimes,
w h e n the formula get too complicated, it loses track a n d simply m a k e s up an
answer. After all, it is my (your) m o n e y we are dealing with here and we should all
expect things to work properly. Unfortunately, for that to happen we simply must
find a way around the problem. Hence, we end up with a large c h u n k of extra
spaghetti code, which obviously increases the risk for other types of errors and
logical blunders. E n o u g h said, let us work with what we have.
O n c e we are in the spreadsheet p r o g r a m it is easy to create a scatter chart like
Figures 8.3 a n d 8.5 that compare the S T D to the final profit. Although we might
be using the same techniques to derive the necessary data for the S T D as for the
M A E , it is important to understand that the two are not the same. N o r is either one
of t h e m the s a m e as R I N A S y s t e m s ' entry efficiency. T h e difference is that the
S T D should primarily be adjusted w i t h the entry technique, while the M A E should
primarily be adjusted with a specific exit technique, such as a stop loss. Together,
the M A E and S T D m a k e up the entry efficiency.
Notice also the word "primarily," because in a g o o d working system all parts
should and will intervene to form a w h o l e larger than the parts. M a n y times, it can
be difficult to distinguish between the two. T h e point is that you should at least be
aware of the differences and exactly what it is you are trying to achieve. It is still
your m o n e y we are talking about here.
CHAPTER 8
Efficient Trades
FIGURE
131
8.5
The final profit in relation to STD/MAE for the directional slope system.
Figure 8.5 shows the S T D / M A E for the directional slope system traded on
the Japanese yen. This chart shows that of all trades with an S T D / M A E of m o r e
than or equal to 4% only two did not end up as losers, while most of the trades with
a n S T D / M A E o f 2 % o r less e n d e d u p a s winners.
In the case of the M e a n d e r system, after you have m a d e sure that you have
optimized your exit techniques and taken every other step necessary, perhaps all
that m u s t be d o n e to the entry is to wait a couple of ticks before you enter, or at
least not enter immediately at the o p e n w h e n the volatility can be high. In the case
of the directional slope system, o n e solution could be to wait for a pullback and
then enter on a b r e a k through the price level that causes the Entry MA to change
its direction.
Just as the S T D is not the same as the M A E , the end trade drawdown ( E T D )
is not the s a m e as the m a x i m u m favorable excursion ( M F E ) , although we might be
using essentially the s a m e techniques to derive the necessary information. M F E is
the m a x i m u m open profit of the position. E T D is the difference between the M F E
a n d the exit point, and the amount you are giving back to the market before the syst e m signals the time to exit. T h e M F E and the final profit should therefore be m a x imized with the amount invested and the n u m b e r s of contracts traded. T h e ETD, on
the other hand, should be managed with different types of exit techniques and stops,
132
PART 3
Getting Out
such as a trailing stop, time-based stop, or profit target stop. The only way to completely avoid any E T D is to exit all trades with a limit order that is triggered at the
top of the equity curve. Figure 8.6 shows the relationship between the E T D and the
final profit for the simplified M e a n d e r system, while Figure 8.7 shows the relationship between the M F E and the final profit for the directional slope system.
From Figure 8.6, we can see that an E T D of m o r e than 0 . 5 % very often resulted in
a loss greater than 1%. This happens when the trade goes immediately against us,
and the S T D and E T D b e c o m e s the same. With a stop loss or trailing stop at an
appropriate level (to address E T D ) , or a m o r e conservative entry technique (to
address S T D ) most of these losses could have been reduced considerably.
Figure 8.7 illustrates the final profit in relation to the M F E for the directional
slope system traded on the Japanese yen. It shows that not until we get an M F E above
approximately 5% does the system manage to signal an exit before we have given away
all the open equity. Looking at Figures 8.6 and 8.7, it is not too difficult to see that it
is easier to handle the information from Figure 8.6. Sure, we realize that something
needs to be done somewhere around the 5% level for the directional slope system, but
what? To get a better feel for this, we must look at the E T D in relation to the MFE
instead of in relation to the final profit. This has been done in Figures 8.8 and 8.9.
Because this modified version of the M e a n d e r system operates with a
d y n a m i c profit target that triggers an exit with a limit order, the higher the M F E ,
the lower the E T D . Figure 8.8 shows that for all trades with an M F E above 0.5%,
FIGURE
8.6
CHAPTER 8
133
Efficient Trades
FIGURE
8.7
The final profit in relation to the MFE for the directional slope system.
FIGURE
8.8
134
PART 3
Getting Out
however, there are still several that have a larger E T D than M F E . With a profit protection or breakeven stop, m a n y of these losses can be avoided.
As is the case with so m a n y other long-term trend-following systems, the
directional slope system s e e m s to give away a substantial part of the profit before
it allows us to exit. For instance, Figure 8.9 shows that both trades with an M F E
immediately above 2 0 % did not allow us to exit until the market had taken back
about a third of our open profit. N o t e that in this case the E T D is denoted with
negative values.
T h e closed trade drawdown ( C T D ) is the drawdown you experience on your
account from one trade to another for all your losing trades. It also is important to
distinguish the C T D from the T E D , as the differences can be quite substantial,
especially for a longer-term trend-following system that is p r o n e to give back a
substantial part of the open profit for a trade before it allows you to exit. Because
m a n y times the C T D also is the s a m e as the STD, you m u s t c o m e to t e r m s with
the C T D by limiting the n u m b e r of trades with an overriding filter, which lets
through only those setups and long-term market situations that show the highest
likelihood of producing a w i n n i n g trade, given the entry trigger you use.
Especially for long-term trend-following systems, the C T D also can be a function
of the ETD, which m e a n s it also should be matched with an appropriate exit tech-
FIGURE
8.9
CHAPTER 8
135
Efficient Trades
nique, such as a trailing stop. To get a feel for the C T D , you can chart the final
profit, separated into w i n n i n g and losing trades, against both the S T D / M A E , and
against the M F E for all losing trades. Figure 8.10 shows that if a trade within the
directional slope system turned out to be a loser, only on a few occasions w a s the
final p r o f i t / C T D significantly different from the S T D / M A E . This suggests that
w h e n a trade goes bad, m o s t of the time it does so right off the bat. Figure 8.11
shows that for the w i n n i n g trades, the relationship between the final profit and
S T D / M A E isn't as clear-cut as for the losers, w h i c h indicates that to c o m e to grips
w i t h the C T D , it is important to analyze it separated from w i n n i n g trades, a n d not
clutter t h e analysis w i t h u n n e c e s s a r y information.
From Figures 8.10 and 8.11, we also can see that of all winning trades, only
six had an S T D of m o r e than 2 % , of which only three m a n a g e d to produce a profit of m o r e than 10%. At the other e n d of the spectrum there were 16 losing trades
with an S T D of m o r e than 2 % , which in m o s t instances also produced a losing trade
of m o r e than 2 % . In fact, if the trade turned out to be a loser, m o r e often than not,
it also m a n a g e d to be closed out very close t o , or at, the lowest low of the trade.
T h e s a m e p h e n o m e n o n also can be seen in Figures 8.12 a n d 8.13, w h i c h
show the C T D respectively, the final profit for the M e a n d e r system, in relation to
the S T D / M A E . As you can see from Figure 8.12, if the trade turned out to be a
loser, only on a few occasions w a s the final p r o f i t / C T D significantly different
FIGURE
8.10
The final profit for all losing trades in relation to STD/MAE for the directional slope system.
PART 3
136
FIGURE
Getting Out
8.11
The final profit for all winning trades In relation to STD/MAE for the directional slope system.
from the S T D / M A E . This suggests that w h e n a trade goes bad, m o s t of the time it
does so right off the bat. F r o m Figure 8.13 you again can see that the similarity
between the long-term directional slope system and the short-term M e a n d e r system is striking. T h e relationship between the winning trades and their S T D / M A E
aren't as clear-cut as for the losers, which confirms that to c o m e to grips with the
C T D it is important to analyze it separated from winning trades, with no unnecessary information.
F r o m Figures 8.12 and 8.13 we also can see that very few trades with an STD
of m o r e than 2% m a n a g e d to p r o d u c e a profit above 0 . 5 % , and only one came
close to 2 % . On the other hand, there are plenty of trades with an S T D of more
than 1% that also produced a final loss greater than 1%. A n d just as w a s the case
for the directional slope system, m a n y of these trades seem to have been closed out
at or very near their lowest open equity. T h e question is, what was the current market situation like to produce these bad trades, and could this have been dealt with
before entering the trade in the first place?
W h e n we are comparing the final profit for the trades within the directional
slope system with the M F E we can see that there are a few trades that seem not to
be stopped out until there has been an adverse move in the neighborhood of 5% or
more. Obviously, this is too m u c h to give back, which m a k e s it a good idea to
CHAPTER 8
Efficient Trades
FIGURE
137
8.12
FIGURE
8.13
The final profit for all winning trades in relation to STD/MAE for the Meander system.
PART 3
138
Getting Out
FIGURE
8.14
ER 8
Efficient Trades
FIGURE
139
8.15
140
PART 3
FIGURE
8.16
FIGURE
8.17
Getting Out
CHAPTER 8
Efficient Trades
141
That this is not always the case is noticeable in the standard deviation interval (the
upper and lower lines), which are likely to m o v e further apart from each other the
further away from the entry point we get; this does not happen in this chart.
Nonetheless, individually examining each point, with its standard deviation
interval, also can give us some clues to where and how to place our stops. For
instance, in the case of the directional slope system we can expect that 6 8 % of all
trades should produce an S T D / M A E somewhere between - 3 . 7 to 0 % , an M F E in
the interval -2 to 17%, and a final profit between - 5 . 5 and 11.5%. Trades that do
not match these criteria could then be assumed to be better or worse than acceptable. R e m e m b e r from Part 2 that a trade that is too good to be true is not necessarily a good thing. Different methods for handling these trades, as well as better ways
to depict the life of a trade, are dealt with in the next chapter, where we take a closer look at Sweeney's M A E and M F E . Although the old adage "your worst drawd o w n is still to c o m e " is likely to c o m e true sooner or later, it does not have to h a p pen first thing tomorrow, provided you have done your homework correctly.
CHAPTER
Sweeney's MAE/MFE
144
FIGURE
PART 3
9.1
MAE and MFE levels for two trades in the Japanese yen.
Getting Out
CHAPTER 9
Sweeney's MAE/MFE
145
the trade. The M F E does not take into consideration whether this happens early on in
the trade or just before exiting with or without a profit. Notice, for instance, that in
Figure 9 . 1 , both M A E s occurred after the M F E s , and for the short trade also in conjunction with the exit of the trade. If we look at the long trade and refer back to the
different drawdowns just discussed, the distance between the entry and the M A E level
would in fact make up the S T D and as such should preferably have been avoided completely with the help of some sort of a filter. But once in the trade anyway, the adverse
move following the M F E should have been limited by a trailing stop or a stop loss.
With the M A E and M F E techniques, we can examine our systems for high-probability exit techniques and even for situations when it could be a good idea to add to a
trade, or even fade (to trade against the trend) a previously given signal.
As a c o m p l e m e n t and a starting point to the M A E / M F E analysis we also take
a closer look at the entire lifespan and development of a trade. (A sort of trajectory analysis if you like.) This helps us examine our systems for additional trading
rules, depending on whether the trade stays within the boundaries set by the
M A E / M F E analysis. As an analogy, albeit with a little backwards reasoning, c o m pare the M A E / M F E values with the pop-up targets at a shooting range. In this
case, the M F E targets are the bad guys to be aimed at, while the M A E targets are
the "innocent p e o p l e " w h o should be avoided.
T h e trajectory analysis helps us determine if we should "freeze" the bullet
(the trade) mid-air if we mistakenly shoot at one of the good guys (or even take a
shot in the completely opposite direction), or if it could be a good idea to throw
away a couple of additional shots in the same direction w h e n we have o n e of the
bad guys in our sights. Additionally, with the trajectory analysis, each curve of the
open equity is a mirror image of the price development of the market, which
m a k e s it possible to compare each trade's ongoing price action with what actually
happened during similar situations in the past. If technical analysis is the study of
the price action from the past on the assumption that it will repeat itself in the
future, isn't this the ultimate, practical, and beneficial form by which this can be
done? To export the entire necessary data into a spreadsheet, we continue to use
the code from the previous chapter.
Let us apply this code to all markets, over the time period January 1980 to
October 1999, in our directional slope system from Part 2. T h e markets tested are
T-bonds, live cattle, Japanese yen, corn, Canada dollar, crude oil, dollar index,
lumber, orange j u i c e , S & P 500, copper, Eurodollar, C R B index, cotton, gold, and
coffee. If you have this workspace saved already, do not forget to change from the
ordinary point-based back-adjusted contract to the R A D contract. And, as before,
do not deduct any m o n e y for slippage and commission, because this will only
result in a suboptimal solution.
In this case, we start by looking at all trades (winners and losers, longs and
shorts) for all markets, and then divide our analysis into winners and losers, respectively. O n c e in your spreadsheet program, m a k e three copies of the spreadsheet. If
PART 3
146
Getting Out
you also would like to examine short and long trades separate from each other, it is
r e c o m m e n d e d that you m a k e separate copies for this as well. With the data from the
spreadsheet, we can create a chart similar to Figure 9.2, which shows the development for a set of trades.
Although just charting all trades on top of each other m a k e s little sense and
looks m o r e like the inside of a magpie's nest, already at this point we can distinguish a few differences between the winners and the losers. For o n e thing, it is fairly easy to see that the life span for several of the losers is fairly short, while the winners seem to live on for much longer. There also seem to be a bias (trend) to the
upside, the longer the trade lasts. To emphasize and m a k e it easier to see this tendency we can channel in the entire bouquet, as in Figure 9.3. Although we already
can see s o m e tendencies and form some basic guidelines, like "a winner should be
in positive territory, approximately by bar 1 8 " or "around bar 30, most trades
should show a profit between 10 to 3 0 % , " this is not enough to formulate any
systematic and mechanical rules that m o v e us away from "trading with the gut."
To be able to do this, we must simplify things. T h e first thing to do is calculate the average percentage m o v e for each bar, together with its standard deviation
boundaries. At the b o t t o m of the spreadsheet, type in the following formula and
fill t h e m out to the right for as long as you have any open trades:
FIGURE
9.2
The development for a set of trades for the directional slope system.
CHAPTER 9
147
Sweeney's MAE/MFE
FIGURE
9.3
The development for a set of trades with manually added trend lines.
=AVERAGE(H1:H1240)
w h e r e H denotes the column w h e r e we stored the percentage move for bar o n e .
= H 1 2 4 6 + S T D E V(H 1 :H 1240)
=H1246 - STDEV(H 1: H1240)
W h e n d o n e , y o u s h o u l d be able to p r o d u c e a chart like Figure 9.4, w h i c h
s h o w s the d e v e l o p m e n t of the average trade (the m i d d l e squiggly line) together
w i t h the p l u s (upper line) a n d m i n u s (lower line) standard deviation b o u n d a r i e s .
T h e s t a n d a r d deviation b o u n d a r i e s d e n o t e the area in w h i c h 6 8 % of all trades
can be expected to fall. To this y o u also could a d d a least square regression line
for t h e average trade. Instead of l o o k i n g at h u n d r e d s of lines that m a k e little
sense, we are n o w d o w n to four, m a k i n g for m u c h easier interpretation and rule
making.
T h e further away from the entry point we get, m o r e and the m o r e trades are
closed out. However, the fewer the trades, the less reliable our results. T h e vertical
dashed line m a r k s out the point w h e r e we have fewer than 20 open trades. In this
case, this h a p p e n s at b a r 4 8 . To this chart, I also have added the regression line
(middle straight line) for the average trade. T h e regression equation for this line is
148
PART 3
FIGURE
Getting Out
9.4
The development of the average trade (the middle squiggly line) together with the plus (upper line) and
minus (lower line) standard deviation boundaries.
CHAPTER 9
149
Sweeney's MAE/MFE
FIGURE
9.5
By the way, Figure 9.4 also supports our a s s u m p t i o n from the previous
chapter about the typical look of a trade, with the M A E occurring before the
M F E . W h a t this looks like for all of our 1,240 trades in the directional slope syst e m can be seen in Figure 9.6, w h i c h also gives us s o m e additional insight into
the system, like "a trade that quotes an M A E b e l o w 7 . 5 % (which is the lower 1
standard deviation b o u n d a r y for the M A E ) is t o o far away from the average trade
and therefore b o u n d to be a loser." T h e standard deviation interval is narrower for
the exit than for the point of the M F E because the exit for m a n y losers h a p p e n s
m u c h sooner after the entry than t h e t i m e it takes for m o s t w i n n e r s to p r o d u c e an
M F E reading in the first place. B e c a u s e of the short distance traveled from the
entry for m a n y of these trades, the dispersion of the o u t c o m e s has not yet had a
c h a n c e to b e c o m e that large. By n a r r o w i n g d o w n our analysis as m u c h as this, we
n o w can s u m m a r i z e the life of our trades using only three lines with only four
data points each.
T h a t there definitely is a difference b e t w e e n winners and losers can be seen
from Figures 9.7 a n d 9.8, w h i c h show the same thing as Figure 9.3, but this time
with the w i n n e r s and the losers separate from each other. T h e m o s t obvious thing
w h e n c o m p a r i n g these charts is h o w difficult it is for the losers to take off in any
direction, while the winners, on the other hand, clearly have a u p w a r d bias; there
150
PART 3
F I G U R E
Getting Out
9.6
The summarized life for the average trade in the directional slope system.
are plenty m o r e winners taking off to higher grounds than there are losers taking
the express elevator to the basement. In fact, very few of the losers really take off
in any direction, and those that m a n a g e to m o v e into positive territory quickly end
their lives with a swift m o v e in the w r o n g direction. As for the winners, we can see
that m o r e often than not, they quickly take off with a bold m o v e in the right direction. Too often, however, they give back way too m u c h of the open profit before
the system allows us to exit with s o m e of the profits. A n o t h e r compelling difference is the lengths of the trades. Although most w i n n e r s last well above 30 bars,
m o s t losers do not last half that long. In essence, a winning trade usually starts out
very well right off the bat and continues to develop favorably for quite some time,
while m o s t losers usually go nowhere fast.
The purpose of the M A E / M F E analysis is to find those points in the trade
where, with the highest likelihood based on previous experience, we can estimate the
outcome of the trade, if we just let it run without any stops or exits. To do this we
must perform the same type of analysis as we did in the previous chapter about different types of drawdowns. For the directional slope system this may resemble the
charts in Figures 9.9 and 9.10 which show the final profit from all trades in all 16
markets (1,240 trades in total) in relation to each trade's M A E and M F E readings,
respectively. Figure 9.9 shows that the least square regression line for this M A E
CHAPTER 9
Sweeney's MAE/MFE
FIGURE
9.7
FIGURE
9.8
151
152
PART 3
Getting Out
analysis hints that the larger the M A E , the larger the loser. T h e true relationship,
however, seems m o r e to resemble an exponential one, as suggested by the handdrawn, dotted trend line. That is, as long as the M A E stays above a certain level, the
final outcome of the trade is very likely to be profitable. T h e least square regression
line for the M F E analysis in Figure 9.10 hints that the larger the M F E , the larger the
winner. This also can be seen from the regression equation, which shows that the
final profit can be expected to reach approximately 5 7 % of the value of the MFE.
That is, the directional slope system regularly gives back as m u c h as 40 to 5 0 % of
the m a x i m u m open profit in the trade before it allows us to exit. Surely, there must
be a way to keep more of that open profit?
F r o m Figure 9.9 we can see that only a handful of trades with an M A E larger than 1 0 % m a n a g e d to end up as winners. By setting a stop loss at 10%, we
would have m a d e all these trades into 1 0 % losers. T h e exact point where the cumulative value of the losers will be greater than that of the w i n n e r s can be calculated
by subtracting the value of all stopped-out losing trades from the value of all winning trades. As you tighten the stop, this value eventually gets below zero, which
is w h e n the value of losing trades has gotten larger than the value of all winning
trades. H e n c e , you are no longer gaining anything by tightening the stop further.
To do this, type in the following formula at the b o t t o m of your spreadsheet:
FIGURE
9.9
The final profit in relation to MAE for 16 markets in the directional slope system.
CHAPTER 9
153
Sweeney's MAE/MFE
FIGURE
9.10
The final profit in relation to MFE for 16 markets in the directional slope system.
=SUMIF(G$1:G$1240;"< = -0.005";I$1:I$1240)/
COUNTIF(G$ 1 :G$ 1240;" < = - 0.005")
w h e r e column G denotes the value for the M A E , and column / denotes the value
of the final profit.
N o t e that this is the arithmetically calculated value. Just calculating the M A E
point where the losers are likely to b e c o m e larger than the winners is not enough (in
this case the point will happen with an M A E larger than or equal to 1.5%). The next
step is to calculate the difference between what would have happened had these
trades been stopped out and what would have happened had they not. Obviously, had
they been stopped out at the M A E level, the average profit for all those trades would
have equaled that level as well. Therefore, to calculate the difference between the
results at a specific M A E level, simply rewrite the above formula to:
=SUMIF(G$ 1 :G$ 1240;" < = - 0.005 ";I$ 1 :I$ 1240)/
COUNTIF(G$ 1 :G$ 1240;" < = - 0.005")+0.005
Using this method, you can put together a table resembling Table 9.1, which
shows the differences in the average profits from all trades corresponding to a certain
M A E , depending on whether or not you have assumed the trades to be stopped out.
154
PART 3
TABLE
Getting Out
9.1
MAE levels, original profits and differences in outcome for 16 markets in the directional slope system.
MAE
Original profit
Difference
-0.50%
0.84%
1.34 points
-1.00%
0.25%
1.25 points
-1.50%
-0.24%
1.26 points
-2.00%
-0.56%
1.44 points
-2.50%
-0.95%
1.55 points
-3.00%
-1.05%
1.95 points
-3.50%
-1.54%
1.96 points
-4.00%
-1.66%
2.34 points
-4.50%
-2.47%
2.03 points
-5.00%
-3.07%
1.93 points
-5.50%
-3.75%
1.75 points
-6.00%
-3.94%
2.06 points
-6.50%
-4.08%
2.42 points
-7.00%
^1.16%
2.84 points
-7.50%
-4.65%
2.85 points
-8.00%
-5.29%
2.71 points
-8.50%
-6.12%
2.38 points
-9.00%
-6.53%
2.47 points
-9.50%
-6.69%
2.81 points
-10.00%
-6.74%
3.26 points
With these values in place, we now can compare the original final profits for
all trades corresponding to a certain M A E level to the s a m e set of trades as if they
h a d been stopped out at that level. For instance, for all trades with an M A E of at
least 3% the arithmetically calculated average profit for all trades would have been
1.05%, but with the stop it obviously would have been 3.0%. Hence, we would
have done worse with a 3% stop loss than without. But, as can be seen from Table
9 . 1 , in this case, no matter where you place the stop you are worse off than had
you not used a stop at all. An interesting observation is that generally the larger the
M A E , the larger the percentage point difference a m o n g the results from using the
stop w h e n c o m p a r e d to not using the stop.
Such is the nature of this g a m e . By m a k i n g sure that you know exactly how
m u c h you are expected to lose in a worst-case scenario you decrease the standard
deviation of outcomes for the system and increase your feeling of certainty and
well-being for that particular trade. T h e price you pay for this is the higher likelih o o d for a lower accumulated result over a longer sequence of trades.
As Table 9.2 shows you, this holds true at the other end of the spectrum as
well. That is, by taking profits w h e n a trade has reached a certain level we once
CHAPTER 9
155
Sweeney's MAE/MFE
TABLE
9.2
MFE levels, original profits, and differences for 16 markets In the directional slope system.
MFE
Original profit
Difference
0.05
8.08%
3.08 points
0.10
12.93%
2.93 points
0.15
18.72%
3.72 points
23.98%
3.98 points
0.25
30.93%
5.93 points
0.30
36.45%
6.45 points
0.35
43.62%
8.62 points
0.40
50.34%
10.34 points
0.45
60.44%
15.44 points
0.50
63.98%
13.98 points
0.55
71.44%
16.44 points
0.60
77.94%
17.94 points
0.65
80.47%
15.47 points
0.70
86.19%
16.19 points
0.75
86.19%
11.19 points
0.80
89.53%
9.53 points
0.85
97.00%
12.00 points
0.90
97.00%
7.00 points
0.95
97.00%
2.00 points
1.00
102.05%
2.05 points
0.20
PART 3
156
Getting Out
BEYOND MAE/MFE
W i t h a stop loss and a profit target in place, we n o w turn our attention to the trailing stop. We would like to find the m a x i m u m adverse excursion ( M A E ) from the
latest favorable excursion (FE) within e a c h trade. N o t e that this does not have to
be the m a x i m u m favorable excursion point, w h i c h is likely to be the very last
favorable excursion, leading into the end trade drawdown, but rather any of the
previous m a x i m u m favorable excursions preceding the largest retracement in the
opposite direction that did or did not result in an exit. We call this point M A E f e .
T h e difficulty w i t h t h e M A E f e is that we do not k n o w w h e r e the m a r k e t
w a s trading before the M A E f e (at least n o t in this analysis). Therefore to c o m e
u p w i t h s o m e meaningful results w e m u s t p r o c e e d differently f r o m the way w e
w o r k the profit target a n d the stop loss analysis. In this c a s e , we c o m p a r e the
M A E f e w i t h the average c o r r e s p o n d i n g M F E for all trades a n d then calculate the
theoretical result as if the M A E f e h a d b e e n the end trade d r a w d o w n . T h e basic
Excel formulae are t h e s a m e as for the stop loss a n d the profit target. T h e results
can be seen in Table 9 . 3 .
TABLE
9.3
MAEfe levels, average MFE levels, and theoretical profits for 16 markets In the directional slope system.
MAEfe
Avg. MFE
Profits
-2.50%
9.78%
7.04%
-3.00%
10.28%
6.98%
-3.50%
10.85%
6.97%
-4.00%
11.39%
6.94%
^.50%
12.02%
6.98%
-5.00%
12.66%
7.03%
-5.50%
13.34%
7.10%
-6.00%
13.71%
6.89%
-6.50%
14.31%
6.88%
-7.00%
14.86%
6.82%
-7.50%
15.33%
6.68%
-8.00%
16.02%
6.74%
-8.50%
16.96%
7.02%
-9.00%
17.24%
6.69%
-9.50%
18.06%
6.84%
-10.00%
19.24%
7.32%
-10.50%
20.14%
7.53%
-11.00%
20.92%
7.62%
-11.50%
21.51%
7.54%
-12.00%
22.08%
7.43%
CHAPTER 9
Sweeney's MAE/MFE
157
158
PART 3
TABLE
Getting Out
9.4
Bars in trade, open profits, ETD, and differences for 16 markets in the directional slope system.
Bars in Trade
Open profit
ETD
Difference
0.17%
-5.74%
- 5 . 5 8 points
1.16%
-7.20%
- 6 . 0 4 points
2.43%
-7.78%
- 5 . 3 4 points
3.75%
-7.94%
- 4 . 1 8 points
10
5.07%
-8.11%
- 3 . 0 4 points
12
6.31%
-8.22%
- 1 . 9 1 points
14
8.59%
-8.24%
0.35 points
16
10.36%
-8.20%
2.16 points
18
11.98%
-7.90%
4.08 points
20
13.25%
-7.96%
5.29 points
22
14.42%
-8.06%
6.35 points
24
16.66%
-8.20%
8.46 points
26
19.37%
-8.59%
10.79 points
28
22.67%
-8.91%
13.76 points
30
23.16%
-8.66%
14.50 points
32
22.90%
-9.04%
13.86 points
34
24.83%
-9.28%
15.55 points
36
26.66%
-9.55%
17.10 points
38
27.78%
-8.60%
19.18 points
40
25.74%
-8.11%
17.63 points
at some future date. As we can see, there is no such thing as a free lunch at the
markets. Cutting all trades short lowers the total result over a longer string of
trades. W h a t is gained in increased certainty regarding the individual outcome and
lower standard deviation, is lost in a lower expected final profit.
Finally, the time-based stop also could be implemented into the trailing stop
technique. O n e way of doing this is to m a k e use of the findings from a chart
resembling Figure 9.4. For instance, if the current trade is doing better than what
could be expected, as suggested by the least square regression line, then the regression line from the basic system with no stops added could work as a trailing stop
level. For a trade that currently is not doing as well as the average trade, but has
not yet been stopped out for any other reasons, we could use the regular trailing
stop. Alternatively, a combination of several techniques could be used that, for
instance, stops out all trades that retrace m o r e than what is allowed by the trailing
stop, but only if the retracement also m e a n s that the trade has moved below the
regression line, as suggested by the original unadjusted trade. If you also are using
a stop loss, or a time-based stop, as we do at bar 14, then you m u s t think about giving these stops ample leeway as well. If you do not, the trailing stop will probably
CHAPTER 9
159
Sweeney's MAE/MFE
TABLE
9.5
Bars in trade, final profit open profits, and differences for 16 markets in the directional slope system.
Bars in Trade
Final profit
Open profit
Difference
12
8.84%
6.31%
- 2 . 5 3 points
14
11.35%
8.59%
- 2 . 7 6 points
16
12.69%
0.36%
- 2 . 3 3 points
18
14.30%
11.98%
- 2 . 3 2 points
20
15.94%
13.25%
- 2 . 6 9 points
22
17.67%
14.42%
- 3 . 2 5 points
24
19.94%
16.66%
- 3 . 2 8 points
26
22.73%
19.37%
- 3 . 3 5 points
28
24.70%
22.67%
- 2 . 0 3 points
30
25.18%
23.16%
- 2 . 0 2 points
32
27.69%
22.90%
- 4 . 7 9 points
34
28.63%
24.83%
- 3 . 7 9 points
36
31.08%
26.66%
- 4 . 4 3 points
38
27.97%
26.66%
- 1 . 3 1 points
40
31.96%
25.74%
- 6 . 2 2 points
42
33.96%
28.90%
- 5 . 0 6 points
44
35.84%
31.37%
- 4 . 4 7 points
46
37.50%
34.26%
- 3 . 2 4 points
48
42.98%
38.81%
- 4 . 1 8 points
50
44.33%
42.00%
- 2 . 3 3 points
have you stopped out too soon during the initial stage of the trade, w h e n it is the
most vulnerable.
Let us c o m p a r e the results for the original directional slope system with
s o m e of the findings we have m a d e in this section. T h e rules for the modified syst e m a n d the corresponding TradeStation code are:
Exit with a small loss/breakeven if the market moves into (stays in) negative
territory at or after bar 14.
Exit with a trailing stop, after bar 14, if the market moves the w r o n g way by
4% or m o r e and ends up below the regression line for the original average
trade.
160
PART 3
Getting Out
CHAPTER 9
Sweeney's MAE/MFE
161
TABLE
9.6
96
Profit factor
1.60
Lrg winner
1.49%
286.05
Avg winner
12.67%
2,429.91
Avg profit
St Dev
Winners
C u m profit
37
38.54%
59
61.46%
71.36%
13,692.20
Losers
Lrg loser
-16.84%
-3,231.18
10.32%
1,980.46
Avg loser
-4.05%
-776.54
128.72%
24,698.15
Drawdown - 4 3 . 0 2 %
-8,254.46
PART 3
162
TABLE
Getting Out
9.7
113
Profit factor
2.01
Avg profit
1.76%
337.90
St Dev
9.96%
1,944.14
Winners
Lrg winner
Avg winner
C u m profit
46
40.71%
60.00%
11,512.50
8.62%
1,653.17
363.64%
69,772.90
67
59.29%
Lrg loser
-4.69%
-899.89
Avg loser
-2.95%
-565.11
Drawdown - 4 0 . 8 8 %
-7,843.57
Losers
formed into today's market value. T h e largest winner would have been 6 0 %
(thanks to the profit target), or $11,513 in today's market value. T h e largest loser
would have been 4 . 7 % (thanks to the stop loss), or $900 in today's market value.
From Table 9.8 we can see that all markets but one had a profit factor above
1 in the original system. A high profit factor, however, does not necessarily mean
that the market in question is worth trading. For this conclusion, we m u s t also look
at the value of the average trade, in today's market, and deduct a proper amount for
slippage and c o m m i s s i o n . A rule of t h u m b could be that the remaining value of the
average trade should be at least two times the estimated slippage a n d commission,
TABLE
9.8
P. factor
Avg. trade
2 St. dev.
Drawdown
Corn
2.43
285.7
62,254.95
-3,604.93
S&P 500
1.01
31.63
37,680.83
-136,839.38
Orange juice
1.58
218.63
3,126.66
-6,671.28
Live cattle
1.34
149.33
3,285.72
-8,007.16
Lumber
2.20
816.09
7,019.19
-14,383.49
Coffee
2.00
1,443.41
19,797.92
-22,991.64
Japanese yen
3.88
3,462.79
19,158.31
-11,891.25
Copper
1.60
286.05
4,859.82
-8,254.46
Gold
1.51
243.21
4,174.29
-9,413.32
Eurodollar
1.74
239.40
3,375.29
-5,953.72
Dollar index
2.22
1,004.14
7,502.97
-7,436.68
Cotton
2.47
681.00
5,227.15
-4,309.28
CRB index
0.70
-390.33
7,135.96
-38,390.04
Crude oil
2.46
584.00
5,540.84
-6,996.26
Canada dollar
1.59
194.31
2,617.40
-^,331.60
T-bonds
1.34
521.24
10,826.72
-37,845.11
CHAPTER 9
Sweeney's MAE/MFE
TABLE
163
9.9
P. factor
Avg. trade
2 St. dev.
Drawdown
Corn
2.62
266.72
2,036.38
-2,384.17
S&P 500
0.67
-1,947.59
26,215.82
-177,550.12
Orange juice
-3,544.32
2.04
234.21
2,346.97
Live cattle
1.23
93.94
2,707.90
-6,913.48
Lumber
2.38
758.44
6,289.95
-11,438.38
Coffee
2.08
917.67
10,271.95
-15,742.83
Japanese yen
2.72
2,000.98
11,427.63
-8,938.80
Copper
2.01
337.90
3,822.28
-7,843.57
Gold
1.54
248.07
3,882.21
-10,208.43
Eurodollar
1.74
238.78
3,373.71
-6,416.68
Dollar index
2.00
829.42
7,282.08
-8,200.28
Cotton
2.02
462.77
4,669.08
-6,965.14
CRB index
0.78
-258.75
5,991.32
-33,982.87
Crude oil
4.21
1,363.21
7,898.06
-5,875.78
Canada dollar
1.36
116.00
2,204.25
-5,551.04
T-bonds
1.28
399.42
9,802.15
-28,461.80
164
TABLE
PART 3
Getting Out
2 St. dev.
Drawdown
Better
3
9.10
P. factor
Avg. trade
7.92%
-6.66%
-9.69%
-33.86%
-33.35%
-6257.25%
-30.43%
29.75%
Orange juice
29.11%
7.13%
-24.94%
-46.87%
Live cattle
S&P 500
-8.70%
-37.09%
-17.59%
-13.66%
Lumber
8.59%
-7.06%
-10.39%
-20.48%
Coffee
4.03%
-36.42%
-48.12%
-31.53%
-29.99%
-42.21%
-40.35%
-24.83%
25.58%
18.13%
-21.35%
-4.98%
1.68%
2.00%
-7.00%
8.45%
3
2
Japanese yen
Copper
Gold
Eurodollar
0.47%
-0.26%
-0.05%
7.78%
Dollar index
-10.11%
-17.40%
-2.94%
10.27%
Cotton
-18.19%
-32.05%
-10.68%
61.63%
CRB index
11.48%
-33.71%
-16.04%
-11.48%
Crude oil
71.19%
133.43%
42.54%
-16.02%
-14.68%
-40.30%
-15.78%
28.15%
-4.11%
-23.37%
-9.46%
-24.79%
15
10
Canada dollar
T-bonds
Better
Eurodollar, crude oil and T-bonds) also show a positive relationship when it comes
to how m u c h the average trade has changed in relation to the standard deviation. The
drawdown, finally, has decreased for eight (corn, orange juice, lumber, coffee,
Japanese yen, copper, crude oil, T-bonds) out of the 12 worth trading. That is, with
the modified system the cost of doing business has decreased, while at the same time
we can feel more sure about the outcome and sleep better thanks to a lower expected drawdown. T h e drawback is that the value of the average trade has decreased; but
because of all the benefits, we still should be able to make more money over any
given period of time. This is thanks to the fact that a m o r e stable system allows us to
trade more aggressively with more contracts, in accordance with a fixed fractional
money management strategy.
Finally, please r e m e m b e r that this is a sample system only and that we used
all the exit techniques previously discussed. This might not be the most optimal
solution, and it might be better, excluding one or several of the exits. In this case
(and all the following), I added all the exits directly on top of the results from the
original system. Because the statistical traits for the system will change with every
change we m a k e , this is not necessarily the best way to do it. Instead, a better way
could be to examine only one exit technique at a time and then rerun the system
before each new implementation. Or, set up the modified system as we have done
CHAPTER 9
Sweeney's MAE/MFE
165
CHAPTER
10
PART 3
168
Getting Out
in the first place. T h e n we want the market to move against us by a certain amount
within a limited t i m e frame, w h i c h are two other very specific requests.
F u r t h e r m o r e , to take all the other exits a n d risk levels into consideration, we might
even add another criterion or two that might stipulate that the m a r k e t is allowed or
not allowed to behave in a certain fashion. A little too m a n y rules, ifs, ands, and
buts for my comfort.
CHAPTER 10
169
FIGURE
10.1
Tthe average open profit for all trades in relation to the number of bars In trade.
TABLE
10.1
MAE levels, original profits, and differences in outcome for 16 markets in the DBS system.
MAE
Original profit
Difference
-0.50%
-1.00%
-0.92%
- 0 . 4 2 points
- 0 . 3 5 points
-1.50%
-2.00%
-2.50%
-3.00%
-3.50%
^1.00%
-4.50%
-5.00%
-5.50%
-6.00%
-6.50%
-7.00%
-7.50%
-8.00%
-8.50%
-9.00%
-9.50%
-10.00%
-1.35%
-1.98%
-2.64%
-3.43%
^.20%
^.67%
-5.29%
-5.89%
-6.58%
-7.27%
-7.76%
-8.46%
-9.00%
-9.65%
-10.08%
-10.39%
-11.08%
-11.71%
-12.56%
-0.48
-0.64
-0.93
-1.20
-1.17
-1.29
-1.39
points
points
points
points
points
points
points
-1.58
-1.77
-1.76
-1.96
-2.00
points.
points
points
points
points
- 2 . 1 5 points
- 2 . 0 8 points
-1.89
-2.08
-2.21
-2.56
points
points
points
points
170
PART 3
TABLE
Getting Out
10.2
MAEfe levels, average MFE levels, and theoretical profits for 16 markets in the DBS system.
MAEfe
Avg. MFE
Profits
-2.50%
6.68%
4.02%
-3.00%
7.08%
3.87%
-3.50%
7.51%
3.75%
-4.00%
8.02%
3.70%
-4.50%
8.53%
3.65%
-5.00%
8.98%
3.54%
-5.50%
9.44%
3.42%
-6.00%
9.75%
3.17%
-6.50%
10.07%
2.91%
-7.00%
10.49%
2.75%
-7.50%
10.84%
2.52%
-8.00%
11.01%
2.13%
-8.50%
11.59%
2.11%
-9.00%
11.83%
1.76%
-9.50%
12.11%
1.46%
-10.00%
12.49%
1.24%
-10.50%
12.49%
0.68%
-11.00%
13.13%
0.69%
-11.50%
13.53%
0.47%
-12.00%
14.29%
0.58%
CHAPTER 10
TABLE
171
10.3
Bars in trade, open profits, ETD, and differences for 16 markets in the DBS system.
Bars in trade
Final profit
Open profit
Difference
0.12%
-5.31%
- 5 . 1 9 points
0.26%
-5.33%
- 5 . 0 7 points
0.38%
-5.33%
- 4 . 9 4 points
0.65%
-5.36%
- 4 . 7 1 points
10
0.97%
-5.32%
- 4 . 3 5 points
12
1.34%
-5.30%
- 3 . 9 7 points
14
1.72%
-5.31%
- 3 . 5 9 points
16
2.14%
-5.28%
- 3 . 1 3 points
18
2.69%
-5.30%
- 2 . 6 1 points
20
3.25%
-5.31%
- 2 . 0 7 points
22
3.75%
-5.27%
- 1 . 5 2 points
24
4.21%
-5.28%
- 1 . 0 8 points
26
4.61%
-5.36%
- 0 . 7 5 points
28
5.15%
-5.38%
- 0 . 2 3 points
30
5.54%
-5.48%
0.06 points
32
6.13%
-5.52%
0.61 points
34
6.48%
-5.58%
0.90 points
36
7.02%
-5.59%
1.44 points
38
7.50%
-5.67%
1.83 points
40
7.92%
-5.61%
2.31 points
loss and profit target in the directional slope system, the " b e s t " result s e e m s to be
around the 35 to 4 0 % area. Because this s e e m s to be a little too close to the entry,
we will instead choose to go with the second "best" level at around 7 0 % . That is,
as soon we reach an open profit of 7 0 % or m o r e , we exit with a limit order. T h e
p u r p o s e of this is to streamline all trades as m u c h as possible and keep the standard deviation as low as possible. By keeping the standard deviation down, we are
decreasing the overall risk of the system and should be able to trade it m o r e
aggressively with m o r e contracts within a fixed fractional m o n e y m a n a g e m e n t
strategy. Therefore, what we lose with the profit target stop, we h o p e to regain
from m o r e aggressive trading.
A n o t h e r way to achieve parts of the s a m e effect is to apply a time-based stop.
Just as w a s the case for the profit target, Table 10.5 shows that the D B S system
s e e m s to have two different trade lengths at which this would be the least opportune m o m e n t . T h e first o n e c o m e s after about 50 bars and the second after about
100 bars, which, by the way, again indicates that there is some sort of s y m m e t r y
in h o w the markets behave. U s i n g the s a m e reasoning as for the profit target, a n d
not to place the stop too close to the entry point, we place it at bar 100. R e m e m b e r ,
PART 3
172
TABLE
Getting Out
10.4
MFE levels, original profits, and differences for 16 markets in the DBS system.
WIFE
Original profit
Difference
5.00%
6.14%
1.14 points
10.00%
11.61%
1.61" points
15.00%
16.27%
1.27 points
20.00%
22.86%
2.86 points
25.00%
28.20%
3.20 points
30.00%
35.08%
5.08 points
35.00%
44.54%
9.54 points
40.00%
48.30%
8.30 points
45.00%
51.77%
6.77 points
50.00%
53.96%
3.96 points
55.00%
55.96%
0.96 points
60.00%
61.49%
1.49 points
65.00%
70.85%
5.85 points
70.00%
78.62%
8.62 points
75.00%
81.24%
6.24 points
80.00%
81.24%
1.24 points
85.00%
95.07%
10.07 points
90.00%
95.07%
5.07 points
95.00%
95.07%
0.07 points
100.00%
150.62%
50.62 points
Exit with a small loss/breakeven if the m a r k e t moves into (stays in) negative
territory at or after bar 30.
Exit with a trailing stop, after bar 30, if the m a r k e t moves the w r o n g way by
4% or m o r e and ends up below the regression line for the original average
trade.
Exit with a profit if the trade lasts for m o r e than 100 bars.
W h e n you are done exporting and calculating in Excel, you can put together a
set of tables like Tables 10.6 and 10.7 for all of the individual markets, and Tables
10.8 and 10.9 with a composite of the most important measurements. In Table 10.10,
finally we summarize the differences for each market. Tabic 10.6 shows that with the
CHAPTER 10
TABLE
173
10.5
Bars in trade, final profit, open profits, and differences for 16 markets in the DBS system.
Bars in trade
Final profit
Open profit
Difference
30
5.56%
5.54%
- 0 . 0 2 points
35
6.70%
6.74%
0.03 points
40
7.97%
7.92%
- 0 . 0 5 points
45
9.62%
9.73%
0.10 points
50
10.74%
11.32%
0.58 points
55
11.72%
12.12%
0.41 points
60
12.43%
11.38%
- 1 . 0 5 points
65
12.56%
11.84%
- 0 . 7 3 points
70
12.91%
12.36%
- 0 . 5 5 points
75
13.91%
13.42%
- 0 . 4 9 points
80
14.43%
14.12%
- 0 . 3 1 points
85
16.95%
17.56%
0.61 points
90
16.66%
17.29%
0.63 points
95
18.52%
19.12%
0.60 points
100
18.35%
21.25%
2.90 points
105
22.76%
23.05%
0.29 points
110
27.06%
28.14%
1.07 points
115
28.67%
26.91%
- 1 . 7 5 points
120
24.36%
21.29%
- 3 . 0 7 points
125
24.36%
22.70%
- 1 . 6 6 points
original system, Japanese yen had a profit factor of 2.00. The largest winner would
have been 2 1 . 5 % , or $25,263 at today's market value. T h e largest loser would have
been 5 . 7 1 % , or - $ 6 , 7 0 9 at today's market value. Table 10.7 shows that with the
modified system, Japanese yen h a d a profit factor of 2 . 2 1 , calculated on the average
percentage winner and loser, and then transformed into today's market value. T h e
largest winner would have been 17.6%, or $20,668 at today's market value. T h e
largest loser would have been 4.20%, or $4,935 at today's market value.
TABLE
10.6
140
Profit factor
2.00
Winners
Lrg winner
65
46.43%
21.50%
25,262.50
Avg profit
1.00%
1,173.83
Avg winner
4.31%
5,060.09
St Dev
4.41%
5,178.98
C u m profit
254.60%
299,155.00
75
53.57%
Lrg loser
-5.71%
-6,709.25
Avg loser
-1.87%
-2,194.27
Drawdown - 1 2 . 0 4 %
-14,147.00
Losers
PART 3
174
TABLE
Getting Out
10.7
143
66
46.15%
Profit factor
2.21
Winners
Lrg winner
17.59%
20,668
Avg profit
1.05%
1,236
Avg winner
4.17%
4,898
St Dev
4.13%
4,848
Cum profit
298.86%
351,159
Losers
77
53.85%
Lrg loser
-4.20%
-4,935
Avg loser
-1.62%
-1,902
Drawdown - 1 1 . 6 6 %
-13,701
TABLE
10.8
P. factor
Avg. trade
2 St. dev.
Drawdown
Corn
1.51
113.34
1,549.46
-2,865.10
S&P 500
0.80
-1,220.96
29,455.57
-166,159.78
Orange juice
1.50
173.24
2,808.58
-9,319.17
Live cattle
1.06
26.23
2,388.86
-9,217.80
Lumber
1.07
55.70
5,022.72
-16,904.45
Coffee
1.44
509.15
11,095.92
-16,446.50
Japanese yen
2.00
1,173.83
10,357.98
-14,147.00
Copper
0.91
-46.29
2,705.02
-12,075.74
Gold
1.34
174.87
3,470.76
-9,157.20
Eurodollar
1.61
226.78
3,057.64
-8,576.59
Dollar index
2.04
737.82
5,972.58
-9,281.08
Cotton
1.27
178.81
5,137.79
-14,027.04
CRB index
0.59
-517.88
5,032.53
-56,549.59
Crude oil
1.84
569.80
5,974.32
-10,282.72
Canada dollar
1.09
28.86
1,931.03
-7,990.00
T-bonds
1.11
161.90
8,898.80
-30,230.08
CHAPTER 10
175
the point value of the market, a rule of t h u m b is that the value of the average trade,
net after expected costs, should be two times the expected costs. For instance, if
you expect slippage a n d c o m m i s s i o n s to be $ 7 5 , the gross value of the average
trade should be $ 2 2 5 . U s i n g this rule of t h u m b , this version of the D B S system
holds five markets that are worth trading both with the original system and w i t h
the modified version.
Table 10.9 shows that after we have added the stops, the changes in the syst e m are not that large in the profit factor and average trade. However, w h e n looking at the standard deviation of the trades and the drawdown, we can see that the
improvements for the portfolio as a whole are quite dramatic.
On a separate note, it is w o r t h m e n t i o n i n g that j u s t b e c a u s e a m a r k e t s e e m s
not to be profitable in itself, it still could be w o r t h trading in a portfolio of m a r kets, with a p r o p e r m o n e y m a n a g e m e n t strategy: it m i g h t be uncorrelated e n o u g h
with all or s o m e of the other m a r k e t s to p e r f o r m satisfactorily w h e n the other
m a r k e t s are p e r f o r m i n g badly, thus, k e e p i n g the equity level u p , as well as
smoother, for the future w h e n the other m a r k e t s start to p e r f o r m better. W h e n
tested on historical c o m m o d i t y futures data, such t e n d e n c i e s can m a n y t i m e s be
found in such m a r k e t s as short-term interest rates, lumber, live cattle, a n d p r e cious metals.
TABLE
10.9
P. factor
Avg. trade
2 St. dev.
Drawdown
Corn
1.38
82.76
1,431.65
-3,203.35
S&P 500
0.83
-886.14
26,848.42
-167,873.90
Orange juice
1.49
141.62
2,442.96
-8,684.48
Live cattle
1.02
7.54
2,289.34
-10,738.53
Lumber
1.13
74.29
3,581.20
-12,035.95
Coffee
1.01
10.65
4,635.90
-23,150.08
Japanese yen
2.21
1,236.13
9,696.50
-13,700.98
Copper
0.94
-25.61
2,249.53
-10,131.14
Gold
1.45
194.71
2,964.58
-8,556.81
Eurodollar
1.69
248.93
3,018.58
-8,578.04
Dollar index
2.10
702.19
5,733.17
-7,862.49
Cotton
1.24
131.13
3,843.48
-10,841.46
CRB index
0.60
-502.97
5,123.84
-56,819.25
Crude oil
2.23
544.72
4,662.18
-7,504.91
Canada dollar
1.12
40.08
1,938.18
-7,202.11
T- bonds
1.24
332.91
8,688.05
-25,087.24
176
TABLE
PART 3
Getting Out
Better
10.10
P. factor
Corn
Avg. trade
2 St. dev.
Drawdown
-8.31%
-26.98%
-7.60%
11.81%
4.47%
-27.42%
-8.85%
1.03%
Orange juice
-0.04%
-18.25%
-13.02%
-6.81%
Live cattle
-4.29%
-71.23%
-4.17%
16.50%
5.79%
33.38%
-28.70%
-28.80%
-29.65%
-97.91%
-58.22%
40.76%
10.41%
5.31%
-6.39%
-3.15%
Copper
3.46%
-44.68%
-16.84%
-16.10%
Gold
7.61%
11.34%
-14.58%
-6.56%
Eurodollar
5.14%
9.77%
-1.28%
0.02%
Dollar index
2.81%
-4.83%
-4.01%
-15.28%
-2.33%
-26.67%
-25.19%
-22.71%
0.90%
-2.88%
1.81%
0.48%
21.16%
-4.40%
-21.96%
-27.01%
3.34%
38.90%
0.37%
-9.86%
11.90%
105.63%
-2.37%
-17.01%
14
10
S&P 500
Lumber
Coffee
Japanese yen
Cotton
CRB index
Crude oil
Canada dollar
T-bonds
Better
11
CHAPTER 10
177
178
PART 3
rluURc
Getting Out
10.2
The average profit for all open trades in relation to the number of bars in trade.
Therefore, it is very important to examine the system for any natural stop loss
levels based on percentage data. Table 10.11 shows that all trades with an M A E
equal to or greater than 5.5% would have ended with an average profit of 1.90%.
Obviously, had we decided to put a stop in at this level, the average profit would
have been 5 . 5 % , which would have resulted in an overall decrease of performance
of 3.60%) points. For all trades with an M A E of 2 % , the overall decrease in performance would have been 0 . 9 9 % points for these trades. It also seems that the 2%
M A E forms s o m e sort of local m i n i m i u m , with higher values on each side of it. The
5 . 5 % M A E level, on the other hand, seems to form a local m a x i m i u m , with lower
values on each side of it. T h e natural choice, and definitely one that should be
investigated further, would then be to place the stop at 2 % . However, in accordance
with our previous discussion about everything in trading being a trade-off between
good and bad, wanted a n d unwanted features, we decide to go with the 5 . 5 % stop,
simply because this seems to be the most obvious place for w h e r e not place a stop,
hoping that what we might lose in a few individual trades on a one-contract basis
we will win b a c k with the proper m o n e y management. Furthermore, the most obvious solution doesn't necessarily have to be the best one in the long run; what we
lose on the swings, we might m a k e up on the merry-go-round.
Table 10.12 s h o w s t h a t the larger t h e M A E f e , the larger the e x p e c t e d profit, a s s u m i n g that the M A E f e c o r r e s p o n d s to the E T D , w h i c h is t h e last retrace-
CHAPTER 10
TABLE
179
10.11
MAE levels, original profits, and differences in outcome for 16 markets in the SDB system.
MAE
Original profit
Difference
-0.50%
-1.00%
1.50 points
-1.00%
-0.52%
1.52 points
-1.50%
-0.23%
1.27 points
-2.00%
-1.01%
0.99 points
1.33 points
-2.50%
-1.17%
-3.00%
-1.52%
1.48 points
-3.50%
-1.89%
1.61 points
-4.00%
-2.40%
1.60 points
-4.50%
-2.45%
2.05 points
-5.00%
-2.24%
2.77 points
-5.50%
-1.90%
3.60 points
-6.00%
-3.38%
2.62 points
-6.50%
-2.64%
3.86 points
-7.00%
-4.16%
2.84 points
-7.50%
-4.73%
2.77 points
-8.00%
-4.15%
3.85 points
-8.50%
-3.53%
4.97 points
-9.00%
-8.02%
0.98 points
-9.50%
-7.65%
1.85 points
-12.57%
- 2 . 5 7 points
-10.00%
PART 3
180
TABLE
Getting Out
10.12
MAEfe levels, average MFE levels, and theoretical profits for 16 markets in the SDB system.
MAEfe
Avg. MFE
Profits
-2.50%
9.96%
7.21%
-3.00%
10.47%
7.15%
-3.50%
11.11%
7.22%
-4.00%
11.79%
7.32%
-4.50%
12.68%
7.61%
-5.00%
13.44%
7.77%
-5.50%
14.07%
7.80%
-6.00%
14.65%
7.77%
-6.50%
15.52%
8.01%
-7.00%
16.42%
8.27%
-7.50%
17.35%
8.55%
-8.00%
18.65%
9.16%
-8.50%
20.06%
9.85%
-9.00%
20.81%
9.94%
-9.50%
21.50%
9.96%
-10.00%
22.86%
10.58%
-10.50%
23.15%
10.22%
-11.00%
24.39%
10.71%
-11.50%
26.12%
11.62%
-12.00%
27.05%
11.80%
substantial part of the o p e n profit before it signals time to exit. T h i s can be seen
from Table 10.14 which, for instance, shows that all trades with an M F E of 6 0 %
or m o r e , are likely to p r o d u c e only an average profit of 4 5 . 6 3 % . For the S D B system, we seem to be better off no matter w h e r e we place a profit target. There seems
to be no local m a x i m a or m i n i m a on w h i c h to base our reasoning (backwards or
otherwise), so just for the heck of it we place it at 7 5 % , which should result in a
performance increase of about 25.58 percentage points. ( R e m e m b e r that these systems are for demonstration p u r p o s e s only.)
A l s o , notice the differences between this system and the not too different
D B S system in the previous chapter. With the S D B system, we seemingly do
worse using a stop loss and a trailing stop, but do better with a profit targetthe
exact opposite of what we found for the D B S system, although we are dealing with
two trend-following strategies, which, one would think, would act pretty m u c h the
same. W h e n you put together your own systems, y o u must think about all these
subtleties and m a k e sure that they w o r k the way y o u want t h e m to and in a way
that m a k e sense to you. N o b o d y else can m a k e these decisions for you. I am merely pointing t h e m out and using t h e m as examples for you to learn from.
CHAPTER 10
TABLE
181
10.13
Bars in trade, open profits, ETD, and differences for 16 markets in the SDB system.
Bars in trade
Open profit
ETD
Difference
12
1.56%
-6.91%
- 5 . 3 5 points
14
2.01%
-6.92%
4.91 points
16
2.42%
-6.97%
- 4 . 5 5 points
18
2.64%
-7.02%
- 4 . 3 8 points
20
3.23%
-7.10%
- 3 . 8 7 points
22
3.81%
-7.21%
- 3 . 4 1 points
24
4.29%
-7.28%
- 2 . 9 8 points
26
4.49%
-7.44%
- 2 . 9 5 points
28
4.89%
-7.47%
- 2 . 5 9 points
30
5.26%
-7.53%
- 2 . 2 7 points
32
5.72%
-7.60%
- 1 . 8 8 points
34
6.30%
-7.61%
- 1 . 3 0 points
36
6.88%
-7.60%
- 0 . 7 2 points
38
7.24%
-7.63%
- 0 . 4 0 points
40
7.74%
-7.63%
0.11 points
42
7.86%
-7.62%
0.24 points
44
8.25%
-7.69%
0.55 points
46
8.83%
-7.76%
1.07 points
48
9.13%
-7.83%
1.30 points
50
9.68%
-7.70%
1.98 points
Exit with a small loss/breakeven if the market moves into (stays in) negative
territory at or after bar 4 0 .
PART 3
182
TABLE
Getting Out
10.14
MFE levels, original profits, and differences for 16 markets in the SDB system.
MFE
Original profit
Difference
5.00%
7.34%
2.34 points
10.00%
12.03%
2.03 points
15.00%
16.16%
1.16 points
20.00%
20.02%
0.02 points
25.00%
24.88%
- 0 . 1 2 points
30.00%
32.25%
2.25 points
35.00%
34.60%
- 0 . 4 0 points
40.00%
37.65%
- 2 . 3 5 points
45.00%
41.65%
- 3 . 3 5 points
50.00%
42.97%
- 7 . 0 3 points
55.00%
45.63%
- 9 . 3 7 points
60.00%
45.63%
- 1 4 . 3 7 points
65.00%
47.10%
- 1 7 . 9 0 points
70.00%
47.52%
- 2 2 . 4 8 points
75.00%
49.42%
- 2 5 . 5 8 points
80.00%
49.42%
- 3 0 . 5 8 points
85.00%
45.69%
- 3 9 . 3 1 points
90.00%
45.69%
- 4 4 . 3 1 points
95.00%
49.41%
- 4 5 . 5 9 points
100.00%
49.41%
- 5 0 . 5 9 points
Exit with a trailing stop, after bar 40, if the market moves the w r o n g way by
5 . 5 % or m o r e and ends up below the regression line for the original average
trade.
Exit with a profit if the trade lasts for m o r e than 105 bars.
Tables 10.16 and 10.17 show the hypothetical results for wheat traded with
and without the exits. Without the exits, wheat had a profit factor of 1.66 and an
average profit p e r trade of 1.27%, equal to $277 in today's marketplace. With the
exits, wheat had a profit factor of 1.85 and an average profit of 1.48%, equal to
$307 in today's marketplace. Tables 10.16 and 10.17 also show that the added exits
have decreased both the drawdown and the standard deviation, which is good
news. For the modified system, the largest winner would have been 3 2 . 1 3 % , or
$6,665 at today's market value. T h e largest loser would have been 5 . 5 0 % (thanks
to the stop loss), or $1,141 at today's market value.
T h a t the S D B system is very robust can be seen from Table 10.18, which
shows that no market ended up with a profit factor below 1 or an average trade less
CHAPTER 10
TABLE
183
10.15
Final profit
Open profit
55
10.92%
10.93%
0.02 points
60
11.90%
11.51%
- 0 . 3 9 points
Difference
65
12.36%
12.62%
0.26 points
70
13.00%
13.44%
0.43 points
75
13.87%
14.49%
0.62 points
80
14.21%
14.85%
0.64 points
85
15.35%
16.12%
0.77 points
90
16.50%
17.57%
1.07 points
95
17.71%
18.76%
1.04 points
100
18.10%
19.75%
1.65 points
105
18.71%
20.05%
1.34 points
110
20.41%
21.93%
1.52 points
115
20.37%
21.34%
0.97 points
120
22.78%
23.00%
0.22 points
125
23.09%
24.46%
1.37 points
130
23.81%
24.69%
0.88 points
135
23.47%
23.71%
0.24 points
140
23.43%
23.16%
- 0 . 2 7 points
145
27.17%
28.02%
0.85 points
150
27.17%
28.99%
1.82 points
than three times the expected costs of $75 p e r trade. S o m e markets, like rough rice
a n d natural gas, even showed amazingly g o o d results with profit factors well
above 10.
Table 10.19 shows that with the exits added, all markets still have a profit
factor above 1, but unfortunately the increased security about each trade's individual o u t c o m e also results in a lower average trade for m o s t markets. However,
because of no disaster markets, the overall result confirms the stability of the S D B
TABLE
10.16
Profit factor
1.6
Avg profit
1.27%
276.5
St Dev
7.73%
1,678.7
Winners
Lrg winner
Avg winner
C u m profit
15
39.47%
31.11%
6,762.54
Lrg loser
8.09%
1,759.29
Avg loser
46.50%
10,107.94
Drawdown
Losers
23
60.53%
-7.59%
-1,649.88
-3.18%
-690.40
-25.76%
-5,599.58
PART 3
184
TABLE
Getting Out
10.17
Total trades
Profit factor
1.8
Lrg winner
Avg winner
Avg profit
1.48%
307.3
St Dev
7.52%
1,559.5
C u m profit
16
41.03%
23
58.97%
32.13%
6,665.05
Losers
Lrg loser
-5.50%
-1,140.92
7.84%
1,626.46
Avg loser
-2.94%
-610.23
61.39%
12,734.93
Drawdown - 2 3 . 0 6 %
-4,784.24
system, even after we have "polluted" it with all the exits. Interestingly enough,
the markets that did get a higher average trade a n d profit factor were markets that
usually do well in almost any trend-following system. These markets were Tb o n d s , Nikkei index, Japanese yen, and wheat; dollar index and D m a r k only managed to increase their average trades, and crude oil and cotton their profit factors.
F r o m Table 10.20 we can see that a total of six markets m a n a g e d to increase
their performance in at least three categories, but also that as m a n y as seven only
m a n a g e d to increase one category or less. T h e one market that did not improve its
performance at all w a s natural gas, but even so, it was highly profitable, both with
TABLE
10.18
P. factor
Avg. trade
2 St. dev.
Drawdown
Crude oil
3.08
987.94
5,524.19
-4,275.06
T-bonds
1.23
378.11
10,932.67
-28,771.85
T-bills
2.65
917.62
6,513.73
-5,750.25
Rough rice
10.07
1,678.34
6,042.87
-2,181.27
Nikkei index
2.16
2,847.55
20,787.00
-6,747.19
Natural gas
17.11
2,200.72
4,964.46
-546.27
1.45
228.30
3,596.36
-7,212.76
-6,816.53
Live cattle
Lumber
1.49
333.37
5,089.97
Coffee
2.95
639.42
3,918.96
-3,958.94
Japanese yen
2.29
1,675.54
14,463.96
-11,781.00
Copper
1.89
535.64
5,825.51
-6,583.29
Gold
1.85
662.89
5,732.22
-7,241.86
Dollar index
2.51
1,444.03
7,693.95
-4,357.46
D mark (Euro)
3.11
1,818.71
9,699.02
-8,303.75
Cotton
2.35
755.11
5,557.00
-4,430.03
Wheat
1.66
276.58
3,357.54
-5,599.58
CHAPTER 10
185
and without the exits. Of all 16 markets tested, we m a n a g e d to decrease the standard deviation for 13 and the drawdown for 8. Unfortunately, we did not m a n a g e
to increase the profit factor and the average trade for as m a n y as we wanted.
In conclusion, for the S D B system, we could c o m e to the same conclusion as
we did for the D B S system. That is, although the average trade did not improve as
m u c h as we would have liked, we can see that the exits are still doing their j o b
w h e n it c o m e s to streamlining the trades, which is indicated by the fact that we
m a n a g e d to lower the drawdown for eight markets and the standard deviation for
13 markets. This should m a k e it possible to trade it m o r e aggressively with p r o p er m o n e y m a n a g e m e n t ; to possibly increase performance, optimize the lookback
a n d breakout period, and/or continue to experiment with different types of stops
a n d exit levels.
TABLE
10.19
P. factor
Avg. trade
Crude oil
3.44
747.03
4,182.98
-1,803.36
T-bonds
1.29
440.87
10,925.97
-19,886.70
T-bills
2.15
676.68
6,451.11
-5,626.32
Rough rice
1.26
125.77
3,042.76
-5,176.72
Nikkei index
4.09
6,118.78
24,009.93
-4,904.47
Natural gas
6.98
1,557.54
6,441.10
-1,041.45
Live cattle
1.09
48.38
3,018.49
-8,610.89
Lumber
1.42
267.40
4,768.68
-5,572.99
Coffee
1.25
87.68
2,458.44
-4,157.51
Japanese yen
2.41
1,711.84
12,882.49
-10,575.98
Copper
1.15
96.01
4,049.64
-6,919.10
Gold
1.27
248.28
5,376.98
-8,558.86
Dollar index
2.43
1,447.94
8,019.24
^1,357.46
D mark (Euro)
2.96
1,829.22
9,472.23
-12,074.73
Cotton
2.72
670.49
4,529.95
-3,890.78
Wheat
1.85
307.38
3,119.04
-4,784.24
2 St. dev.
Drawdown
186
PART 3
Getting Out
Drawdown
Better
P. factor
Avg. trade
2 St. dev.
Crude oil
11.49%
-24.39%
-24.28%
-57.82%
4.68%
16.60%
-0.06%
-30.88%
T-bills
-18.76%
-26.26%
-0.96%
-2.16%
Rough rice
-87.45%
-92.51%
-49.65%
137.33%
Nikkei index
89.12%
114.88%
15.50%
-27.31%
Natural gas
-59.20%
-29.23%
29.74%
90.65%
Live cattle
-24.96%
-78.81%
-16.07%
19.38%
-4.77%
-19.79%
6.31%
-18.24%
-57.55%
-86.29%
-37.27%
5.02%
4.95%
2.17%
-10.93%
-10.23%
Copper
-39.40%
-82.08%
-30.48%
5.10%
Gold
-31.25%
-62.55%
-6.20%
18.19%
Dollar index
-3.24%
0.27%
4.23%
0.00%
T-bonds
Lumber
Coffee
Japanese yen
D mark (Euro)
-4.80%
0.58%
-2.34%
45.41%
Cotton
15.70%
-11.21%
-18.48%
-12.17%
Wheat
11.57%
11.14%
-7.10%
-14.56%
Better
13
CHAPTER
11
PART 3
188
FIGURE
Getting Out
11.1
CHAPTER 11
FIGURE
189
11.2
be platykurtic. To calculate the kurtosis of a variable you can use the kurt function
in Excel. In the case of the daily distributions of returns for the S & P 500 index,
kurtosis equals 56. A positive value m e a n s that the distribution is leptokurtic; a
negative value m e a n s that it is platykurtic. W h e n building a trading system we
would prefer for the distribution of returns to be platykurtic, so that we m a k e sure
that the system does not stand or fall with any large out Iyer trades. This is a twoedged sword, however, in that a positive value for the kurtosis also might indicate
that we are doing a g o o d j o b of keeping all our trades as similar as possible to the
average trade. If that is the case, the kurtosis should increase with the n u m b e r of
trades from w h i c h we can draw any statistical conclusions, while the dispersion of
these trades stays the same. That is, we are not changing the levels at which we
take our profits a n d losses.
W h a t probably cannot be seen from Figure 11.3 is that it also is slightly
skewed to the left (a negative skew) with a m e a n smaller than the m e d i a n (the middle value, if all values are sorted from the smallest to the largest). T h e tail to the
left of the b o d y stretches out further than the tail to the right. To calculate the
degree of skew of the distribution y o u can use the skew function in Excel. In this
case, the skew equals - 2 . 0 1 , with the average return p e r day equal to 0 . 0 2 9 6 % and
the m e d i a n equal to 0 . 0 3 1 1 % . W h e n building a trading system we would prefer for
190
PART 3
FIGURE
Getting Out
11.3
A random variable skewed to the left (a negative skew) with a mean smaller than the median.
the returns to be positively skewed (to the right) with the tail to the right stretching out further from the b o d y than the tail to the left, so that we m a k e sure that
w e ' r e cutting our losses short and letting our profits run.
A n o t h e r way to m a k e sure that a system is not too dependent on any out-lyers
is to exclude t h e m w h e n calculating the average return. You can do this in Excel
with the t r i m m e a n function, which excludes a certain percentage of observations
from each end of the distribution. Ideally, w h e n building a trading system we
would prefer for the t r i m m e a n to remain above zero, so that we m a k e sure that the
bulk of our trades are behaving as they should. If the t r i m m e a n is larger than the
average return, it m e a n s that historically the positive out-lyers have been smaller
than the negative out-lyers. If the t r i m m e a n is smaller than the average return, it
m e a n s that historically the positive out-lyers have been larger than the negative
out-lyers. In this case, whatever you think is best depends on what you expect and
how you would like the system to perform in the future. After a few bad trades, it
could be comforting to k n o w that the positive out-lyers historically have a tendency to be larger than the negative ones; but on the other hand, having to rely on a
set of not-yet-seen out-Iyer trades to find your way out of a drawdown, seems to
be awfully close to gambling with your life and the need to rely on Lady Luck.
If we d o n ' t k n o w for sure whether the distribution is normal, we cannot use
our n o r m a l distribution m e a s u r e m e n t s that, for instance, say that 6 8 . 2 7 % percent
of all observations will be within 1 standard deviation of the m e a n . Instead we
CHAPTER 11
191
have to use Chebychef's theorem, which says that for a k greater than or equal to
one (k 2= 1), at least (1 - 1 / k 2 ) will lie within k standard deviations of their
m e a n value. Note that this method cannot give an exact value.
For instance, if we have a n o r m a l distribution, we k n o w that 9 5 . 4 6 % of all
observations will lie within 2 standard deviations, but if we d o n ' t k n o w what the
distribution looks like we can only say that at least 7 5 % (1 1 / 2 2 ) will lie within 2 standard deviations. F u r t h e r m o r e , without k n o w i n g the exact distribution, we
cannot say if they will be equally distributed around the mean. We have to estimate
this from our kurtosis and skew measurements. Similarly, to encapsulate at least
50, 6 7 , and 9 0 % of all observations, the standard deviations m u s t be 1.41, 1.74,
and 3.16, respectively.
Let us take a closer look at how we can rebuild and better the exit techniques
for our short-term systems using this newly found knowledge.
A
192
PART 3
Getting Out
TABLE
11.1
Performance summary for the modified version of Gold Digger II, January 1995-October 1999.
Total trades
80
Profit factor
1.18
Lrg winner
Avg winner
1.65
5,559
C u m profit
9.18
30,983
Avg profit
0.13%
453
StDev
2.22%
7,483
Winners
53.75%
8.54
28,823
Losers
Lrg loser
Avg loser
Drawdown
46.25%
-4.33
-14,614
-1.62
-5,480
-17.47
-58,961
TER 11
TABLE
193
11.2
0.13
Median
0.21
Kurtosis
2.49
Skew
0.83
Trimmean (20%)
0.04
for the kurtosis, w h i c h suggests that so far the s y s t e m is leptokurtic and, hence,
does not p r o d u c e stable returns. However, with the p r o p e r set of exit techniques
we should be able to lower the kurtosis into negative territory while k e e p i n g a
positive skew.
T h e trick then is to see if we can improve on the results somewhat, while also
m a k i n g the distribution of the outcomes less leptokurtic and perhaps slightly m o r e
skewed to the right. T h a t this should be possible is suggested by the 2 0 % trimm e a n , w h i c h is smaller than the m e a n , indicating that, historically, the positive outlyers have been larger than the negative ones. F r o m Figure 11.4, we also can see
FIGURE
11.4
194
PART 3
Getting Out
that the distribution of returns indicates that the right-hand tail is stretching out
further than the left-hand side. This is generally good and an indication that we are
letting the profits run. T h e positive kurtosis, however, suggests that the results also
are a little too toppy, which indicates instability.
Let us say that we would like to cut all trades that go against us with more than
two standard deviations. Because we know that the returns from this version of Gold
Digger are not normally distributed, we cannot simply cut off all trades that go
against us by a certain value, as suggested by the regular standard deviation formula. Instead, we have to use Chebychev's theorem that says that the two standard deviation boundaries will hold for at least 7 5 % of all observations. But because we do
not know the exact distribution, we also do not know how many of the remaining
2 5 % will be located in the right-hand tail or the left-hand tail, respectively. This we
can only estimate with the help of the other measures. T h e reasoning, then, is that
because of the positive skew, a larger quantity of the 2 5 % remaining trades should
be located to the left of the mean. For argument's sake then we could say that 20 percentage points should be located in the right tail with the remaining 5 percentage
points in the left tail.
An alternative m e t h o d could be to look for a different a m o u n t of trades that
the standard deviation boundaries should encapsulate. For instance, if we would
like to encapsulate 6 8 % of all trades, we should leave out about 1 6 % of all trades
on each side. Just for argument's sake, let us say that a m o n g these we should cut
four times as many losers as winners, which in this case would mean approximately 21 losers (80 X 0.33 X 0.80) and 5 winners (80 X 0.33 X 0.20). Doing so
in the Gold Digger system would result in a stop loss at about 1.0% and a profit
target at about 3 . 8 % . Let us see w h e r e this takes us, by adding these stops to the
code. (It also might be a good idea to add a m i n i m u m profit objective, but because
the average profit from the original system is somewhat low, we will, instead, aim
for half the distance between the stop loss and the profit target. This will be at an
open profit of 1.4%, which will be triggered if the market first closes with a larger profit but then moves down below this level again.) T h e additional TradeStation
c o d e follows:
If MarketPosition = 1 Then Begin
ExitLong ("Long profit") tomorrow at 1.038 * EntryPrice limit;
ExitLong ("Long loss") tomorrow at 0.99 * EntryPrice stop;
If Close > 1.014 * EntryPrice Then
ExitLong ("Long prot") tomorrow at 1.014 * EntryPrice stop;
End;
If MarketPosition = -1 Then Begin
ExitShort ("Short profit") tomorrow at 0.962 * EntryPrice limit;
ExitShort ("Short loss") tomorrow at 1.01 * EntryPrice stop;
195
TABLE
11.3
Performance summary for the second modified version of Gold Digger II, January 1995-October 1999.
Total trades
Profit factor
Avg profit
StDev
0.07%
2.21%
106
1.08
229
7,446
Winners
Lrg winner
Avg winner
Cum profit
39
5.14%
2.51%
4.72%
36.79%
17,348
8,462
15,930
67
-8.30%
Avg loser
-1.35%
Drawdown -12.01%
Losers
Lrg loser
63.21%
-28,013
-4,564
-40,534
196
PART 3
TABLE
Getting Out
11.4
0.07
Median
-1.00
Kurtosis
1.14
Skew
0.15
Trimmean
0.00
reason for this is the test period, w h i c h is m o r e than twice as long and consequently leaves a lot m o r e r o o m for b a d things to happen.
A positive value for the kurtosis, as c o m p a r e d to Table 11.4, is a positive
because it m e a n s that m o s t o u t c o m e s now are centered around the m e a n . That is,
the system is doing a good j o b doing the s a m e thing over and over again. It is just
not profitable enough. A n o t h e r negative reflection is that the skew is now negative,
indicating that the system is doing a good j o b catching those situations when the
market is poised to take off in a swift m o v e o n l y thing, these moves s e e m to be
in the w r o n g direction. This also is the conclusion to be m a d e from studying the
distribution of returns chart in Figure 11.6.
FIGURE
11.5
The distribution of returns for the second modified version of Gold Digger II system.
CHAPTER 11
TABLE
197
11.5
Performance summary for the second modified version of Gold Digger II, January 1985-December 1994.
Total trades
270
Winners
Profit factor
1.38
Lrg winner
Avg winner
Cum profit
Avg profit
0.25%
859
St Dev
2.00%
6,745
11
42.96%
7.62
25,718
Losers
Lrg loser
2.16
7,283
Avg loser
87.86
296,528
Drawdown
15
57.04%
-12.61
^42,559
-1.18
-3,981
-15.11
-50,996
L o o k i n g at the distribution of trades, we can m a k e two interesting observations. First, most losers are stopped out by the stop loss, and only on occasion does
a trade end up as a loser otherwise. Second, very few trades are stopped out by the
profit limit. T h e big discrepancy in n u m b e r of trades, when looking at trades
stopped out with a loss and trades stopped out at the m a x i m u m profit, indicates
that the m o m e n t u m , w h e n the trade was taken, simply w a s n ' t working in favor of
the trade. We will try to do something about that later. For simplicity's sake, from
n o w on I simply refer to this system as the Gold Digger.
TABLE
11.6
Descriptive statistics for Gold Digger II, January 1985-December 1994 (second modified version).
Mean
Median
Kurtosis
Skew
Trimmean
0.25
-1.00
6.00
-.019
0.06
198
PART 3
Getting Out
FIGURE 11.6
The distribution of returns for the second modified version of Gold Digger II, between January 1985-December 1994.
CHAPTER 11
199
DifTVS = 0;
DiffVS = DiffVS + Square(VS[DiffArr] - AvgVS);
IfDiffArr = 19 Then
StdVS = SquareRoot(DiffVS / 20);
End;
End;
VSLow = C Data2 * (1 + (AvgVS - StdVS * VSStd));
VSMid = C Data2 * (1 + AvgVS);
VSHigh = C Data2 * (1 + (AvgVS + StdVS * VSStd));
If MarketPosition = 0 Then Begin
Buy ("Go long") tomorrow at VSLow limit;
Sell ("Go short") tomorrow at VSHigh limit;
End;
If BarsSinceEntry >= 5 Then Begin
ExitLong ("Long time") at close;
ExitShort ("Short time") at close;
End;
Tables 11.7 and 11.8 and Figure 11.7 show the results for this version of the
Meander, w h e n tested on data for the period January 1995 to October 1999, and
with the trade-by-trade export function from Part 1 attached to the code.
F r o m Table 11.7 we see that this is not a b a d start at all, c o m p a r e d to Gold
Digger at the s a m e stage. A high profit factor is c o m p l e m e n t e d by a high average
trade. T h e standard deviation is somewhat high, but a slightly higher ratio between
the average profit a n d the standard deviation shows that the Meander, at this stage,
m a n a g e s to produce a higher risk-adjusted return than Gold Digger. T h e drawd o w n is a little too high, but could probably be worked on with a well-working stop
loss and some type of filtering technique (to be added later). A n o t h e r positive factor is the positive value for the skew, in Table 11.8, which m e a n s that the Meander,
too lets its profits r u n while cutting the losses short. T h e very high positive value
for the kurtosis is, however, a negative factor at this point, indicating that the individual outcomes are a little too centered around the mean.
TABLE
11.7
Performance summary for the modified version of Meander, January 1995-October 1999.
Total trades
55
Profit factor
1.90
Winners
Lrg winner
29
52.73%
26
47.27%
13.93%
47,014
Lrg loser
-4.65%
-15,694
Avg loser
-1.59%
-5,365
Drawdown - 1 5 . 3 3 %
-51,739
Avg profit
0.67%
2,270
Avg winner
2.70%
9,116
St Dev
3.13%
10,569
Cum profit
41.02%
138,443
Losers
200
PART 3
TABLE
Getting Out
11.8
0.67
Median
0.10
Kurtosis
5.55
Skew
1.78
Trimmean
0.37
FIGURE
11.7
CHAPTER 11
201
mately 12 trades in both on the left-hand tail and on the right-hand tail. This m e a n s
that we place a stop loss (using the same type of code and principles as for G o l d
Digger) at about 1.8% and a profit target at about 3.2%. Furthermore, using the
profit for the average trade as a guide we also add a m i n i m u m profit level at
0.64%. Tables 11.9 and 11.10, and Figure 11.8 show the results of using these
stops and exits in accordance with the following TradeStation code:
If MarketPosition = 1 Then Begin
ExitLong ("Long profit") tomorrow at 1.032 * EntryPrice limit;
ExitLong ("Long loss") tomorrow at 0.982 * EntryPrice stop;
If Close > 1.0064 * EntryPrice Then
ExitLong ("Long prot") tomorrow at 1.0064 * EntryPrice stop;
End;
If MarketPosition = -1 Then Begin
ExitShort ("Short profit") tomorrow at 0.968 * EntryPrice limit;
ExitShort ("Short loss") tomorrow at 1.018 * EntryPrice stop;
If Close < 0.9936 * EntryPrice Then
ExitShort ("Short prot.") tomorrow at 0.9936 * EntryPrice stop;
End;
A r e we good, or what? As can be seen from Table 11.9, although the average
trade and profit factor declined somewhat, we still m a n a g e d to lower the standard
deviation to 2 . 1 9 % and the drawdown to 1 0 . 8 1 % . T h e n u m b e r of profitable trades
also increased dramatically to 6 5 . 7 5 % . T h e good news continues with a negative
kurtosis. A negative kurtosis m e a n s that we have spread out (or perhaps "plateaued
o u t " is a better expression) the individual outcomes a little m o r e , which could be
interpreted as our target area has grown and, therefore, should be easier to hit.
With the skew in negative territory, however, we are no longer cutting our losses
as short as we probably should. From Figure 11.8, we see that we have transformed
the distribution of returns to resemble Gold Digger. Although this system is even
m o r e distinct, with three very different and clear-cut scenarios that have crystallized: o n e highly profitable, o n e modestly profitable, and one with a negative
return, and with only a few trades scattered around. Either the trade b e c o m e s a
1.8% loser, or a 0.64 or 3.2% winner.
TABLE
11.9
Performance summary for the second modified version of Meander, January 1995-October 1999.
Total trades
73
Profit factor
1.78
Winners
Lrg winner
Avg profit
0.52%
1,764
Avg winner
St Dev
2.19%
7,388
Cum profit
48
65.75%
25
34.25%
4.88%
16,470
Losers
Lrg loser
-5.74%
-19,373
1.81%
6,113
Avg loser
-1.95%
-6,587
43.78%
147,758
Drawdown - 1 0 . 8 1 %
-36,484
202
PART 3
TABLE
Getting Out
11.10
Mean
Median
0.64
Kurtosis
-0.56
Skew
-0.03
Trimmean
0.49
T h e interesting thing is that these different scenarios are so distinctly separate from each other that we almost can start calculating the likelihood for a certain scenario to happen. For instance, from Figure 11.8, we can see that there are
a total of 21 out of 73 trades (or 28.8 %) that ended up with a profit of 3.2% or
m o r e , 2 8 . 8 % that ended up with a profit of 0.64%, 3 2 . 9 % that ended up as 1.8%
losers or worse, and only 9 . 5 % that ended up s o m e w h e r e in between. That is, we
k n o w that on close to every third trade, or at least every fourth trade, we should
end up with a 3 . 2 % winner, on average. With the average trade being a 0 . 5 2 % winner, we also can calculate the expected average return for all the trades that fall
outside of the three major scenarios, which will c o m e out to approximately
FIGURE
11.8
CHAPTER 11
203
0 . 0 4 8 % (or approximately $161 in today's market value). N o t , too bad for what is
falling through the net.
Before we move on with the next system, let us see h o w this strategy would
have performed on data covering the period January 1985 to D e c e m b e r 1994, as
shown in Table 11.11. C o m p a r e d to the optimization period, we did not do quite
as well, b u t even so, we definitely did well enough, with an average profit of
0.52% and a standard deviation of 3 . 0 3 % . Nonetheless, although the out-of-sample data did not completely stand up against those for the optimization period, they
did c o m e in remarkably close. This indicates that the system is very robust and
therefore very likely to hold up in the future as well.
T h e good n e w s also continues w h e n we look at Table 11.12 which once again
shows that the skew has moved into positive territory, indicating that we are once
m o r e letting our profits r u n while cutting the losses short. T h e high value for the
kurtosis, as c o m p a r e d to Table 11.12, also is positive in that it indicates that the
system is doing a very good j o b in producing a very similar set of trades. T h e m e a n
and m e d i a n values for the out-of-sample data are exactly the s a m e as for the insample data, which indicates that the system is working basically the s a m e over
different time periods.
T h i s can also be seen from Figure 11.9, which shows the distribution of
returns. W h e n tested on out-of-sample data, the m i n i m u m profit trades n o w m a k e
up the majority of all trades, while not quite as m a n y trades m a n a g e to be closed
out with a limit order at the profit target level. It is obvious the market has changed
its behavior somewhat, but because the basic characteristics are still there, the
results look very robust and promising. That there are plenty m o r e 1.8% losers
than there are 3.2% winners does not matter as long as the winners are worth so
m u c h m o r e in dollar t e r m s .
W h a t do the M e a n d e r and Gold D i g g e r experiences teach us? It is very p o s sible to c o m e up with a profitable trading system that is likely to w o r k equally as
well on both the optimization period a n d the out-of-sample data, as long as we do
not aim for the stars. A l s o , that if something s e e m s to be too g o o d to be true during optimization, it likely is. But even with such a m o d e s t system as Gold Digger,
we still can work wonders after we improve it by adding a filter that helps us w e e d
out the m o s t obvious losers. A n d there is plenty of h o p e for the M e a n d e r as well.
TABLE
11.11
Performance summary for the second modified version of Meander, January 1985-December 1994.
Total trades
121
Profit factor
1.71
Winners
Lrg winner
Avg profit
0.52%
1,745
Avg winner
St Dev
3.03%
10,232
Cum profit
78
64.46%
43
35.54%
21.92%
73,980
Lrg loser
-11.21%
-37,834
1.93%
6,507
Avg loser
-2.04%
-6,894
69.28%
233,820
Drawdown - 1 3 . 2 8 %
-44,820
Losers
204
PART 3
TABLE
Getting Out
11.12
0.52
0.64
Median
Kurtosis
21.27
Skew
2.62
Trimmean
0.33
FIGURE
11.9
The distribution of returns for the second modified version of Meander between January 1985-December 1994.
CHAPTER 11
205
time c o m e up with a new and unique sequence of trades. For this version of the
Black Jack system, we use the s a m e 16 markets as we did for the Standard
Deviation Breakout ( S D B ) system, covering the time period January 1980 to
D e c e m b e r 1992. To m i m i c approximate general market conditions that keep the
market in a trading range approximately 6 0 % of the time, and in an u p - or downtrend approximately 2 0 % of the time in each direction, we set the r a n d o m n u m b e r
generator to signal a long or short position approximately every fifth day, if w e ' r e
not in a position already.
Basically, there are two slightly different ways to go about building a system
like this. You could examine for one type of exit at a time, starting out with the
time-based stop, which later could be removed. (With all trades entered randomly
there invariably will be situations w h e n we need s o m e type of exit to take us out
of the market no matter what the underlying market conditions look like at the
time.) Or you could examine all exits in pairs, starting out with the time-based stop
and the stop loss. This is what we do in this example. To do this, we must know
the value of the average trade for each market and each stop loss/trade length c o m bination, for every time we run that particular combination on that particular m a r ket. R e m e m b e r , thanks to the fact that each trade will be taken randomly, we can
run the s a m e test on the s a m e market as m a n y times as we wish and always c o m e
up with a new and different result.
It is a g o o d idea to start out with the stop loss/trade length combination
because if it happens that we enter exactly w h e n the market takes off in one direction and we happen to be right, the m a x i m u m trade length shows us for how m a n y
bars (days, hours, etc.) the market r e m e m b e r s a certain event or whatever external
factor that triggered the move. This is the amount of time we would like to stay
with the trade, no more, no less. W h e n the market starts to discount other factors
as m o r e important, we want to exit and wait for the next move that might c o m e our
way, because at the point of exit, the reason for our entry is no longer there. T h e
stop loss is obviously necessary to tell us when we are most likely to be wrong,
whatever the reason for entering in the first place.
Because we want this to be a short-term system, we restrict our search to the
area between two to ten days. I chose to go with two days instead of o n e day
because of the s a m e TradeStation b u g I already have described and will rant further about below. As for the stop loss, we k n o w from experience that we probably
are best off looking in the 0.5 to 2% region, so this is what we will d o .
T h e quickest way to do the search is to declare both the trade length and the
stop loss as inputs, run t h e m through the optimization procedure and, for each run
through the data, export the necessary information into a spreadsheet program for
further analysis. Do not bother using the optimization report in TradeStation,
because it is tailored to run on point-based back-adjusted contracts only. In the
optimization dialog boxes we tell TradeStation to r u n through every combination
of our input variables, from two to ten, in steps of one, for the m a x i m u m trade
206
PART 3
Getting Out
CHAPTER 11
207
PART 3
208
Getting Out
End;
End;
If CurrentBar = 1 Then Begin
FName = "D:\Temp\BJS.csv";
End;
If TotTr > TotTr[l] Then Begin
I f M P [ l ] = I T h e n Begin
FTE - (ExitPrice(l) - EntryPrice(l)) / EntryPrice(l);
ETD = (ExitPrice(l) - HighestHigh[l]) / Highesthigh[l];
End;
I f M P [ l ] = -1 Then Begin
FTE = (EntryPrice(l) - ExitPrice(l)) / EntryPrice(l);
ETD = (LowestLc-wfl] - ExitPrice(l)) / LowestLowfl];
End;
If FTE < MAE[1] Then
MAE = FTE Else MAE = MAE[1];
If FTE > MFE[1] Then
MFE = FTE Else MFE = MFE[1];
SumFTE = SumFTE + FTE;
SumETD = SumETD + ETD;
SumMFE = SumMFE + MFE;
SumMAE = SumMAE + MAE;
End;
If LastBarOnChart Then Begin
FTE = SumFTE / TotalTrades;
ETD = SumETD / TotalTrades;
MFE = SumMFE / TotalTrades;
MAE = SumMAE/TotalTrades;
TradeStrl = LeftStr(GetSymbolName, 2) + "," + NumToStr(MAE, 4)+
V + NumToStr(MFE, 4) + "," + NumToStr(FTE, 4) + "," +
NumToStr(ETD, 4) + "," + NumToStr(TradeLength, 2) + "," +
NumToStr(StopLoss, 2) + "," + NumToStr(TrailingStop, 2) + "," +
NumToStr(ProfitTarget, 2) + NewLine;
FileAppend(FName, TradeStrl);
End;
This code exports the M A E , M F E , a n d C T D values, together with the average profit, and the value of the input parameters for that particular run, each time
CHAPTER 11
209
the p r o g r a m loops through the market. For our p u r p o s e s , we only need the average
profit and the value for the inputs to keep track of all combinations. T h e others are
there for other, but similar, analysis techniques, such as w h e n exporting each individual trade or examining one exit technique at a time. O n c e we are done testing,
we substitute for the r a n d o m trade generator a high probability entry technique,
k n o w i n g that we n o w should have a system that lets us trade marginally profitably
or at least does not force us into too large disasters, no matter w h a t the underlying
market conditions look like.
T h e code above also illustrates another TradeStation feature. As you can see,
for the stop loss we use the criteria If BarsSinceEntry 3= 1. This really should not
be necessary, but without this line TradeStation sometimes exits the long on the
first o p e n following the entry, whether the trade is (or might have been) a w i n n e r
or loser.
Because of this extra piece of code, we encounter another problem, which I
already ranted about. That is, on the day you wait for this condition to c o m e true
(the first whole day in the trade, if you entered at the close the day before) the syst e m does not recognize that y o u have a trade going. O n e way to work around this
is to declare your o w n entry price variables, but that causes you a multitude of
other p r o b l e m s further d o w n in the code, like in the export function and on, and
on, a n d o n . . . .
Okay, we m u s t move on. After you have exported all the necessary data for
the trade length and the stop loss into your spreadsheet program, you can use the
s a m e charting technique as we did in Part 2, w h e n we examined different moving
average length combinations. A surface chart is an excellent way to get a feel for
how the output variable reacts to two different input variables a n d how the inputs
are interacting with each other. T h e first chart, Figure 11.10, shows the average
percentage profit as a function of the stop loss in percent and the trade length in
days. For instance, with a stop loss of 1.3% and a trade length of eight days, the
average profit c o m e s out to somewhere between 0.1 and 0%. T h e trick is to try
to find a squared area that is as large as possible, with a value for the profitable
trade that is as high as possible. In Figure 11.10 there are two areas that look particularly promising. T h e first one is around the 0 . 7 % stop loss a n d the other one
around the 1.1 to 1.2% stop loss. T h e area surrounding the eight-day trade length
and the 1.1% stop loss looks very interesting.
Figure 11.11 shows the standard deviation of the returns. In this chart we
would like to find an area that is as large as possible, but has a value that is as low
as possible. In this case we can see that, generally, the longer the trade length and
the w i d e r the stop loss, the higher the standard deviation. Obviously, we also need
the standard deviation that we choose to coincide with an area of positive returns
in Figure 11.10. T h e two charts in combination tell us that if we have two similar
alternatives to choose from w h e n it c o m e s to the average profit, we should select
the one with the narrowest stop and shortest trade length.
210
PART 3
FIGURE
11.10
The percentage return from random entries as a function of the trade length and stop loss level.
FIGURE
11.11
The standard deviation of the percentage returns as a function of the trade length and stop loss level.
Getting Out
CHAPTER 11
211
Figure 11.12 shows the kurtosis for each stop loss/trade length combination.
H e r e we also would like to find an area as large as possible with a value as low as
possible and preferably also in negative territory. In this case too, we can see that,
generally, the longer the trade length and the w i d e r the stop loss, the higher the
kurtosis. Finally, Figure 11.13 shows the skew, w h i c h should be as high as possible. In this case, it o n c e again seems that the streak around the 1.2% stop loss looks
m o s t promising. In this case, it b e c o m e s difficult to keep it negative. It also s e e m s
that the kurtosis generally behaves the opposite way from the standard deviation.
My rule-of-thumb is to give a higher consideration to the standard deviation and
give the kurtosis the absolute lowest consideration.
To find the individual stop loss or trade length that is likely to be the most
robust input parameter, no matter what h a p p e n s with all the other input c o m b i n a tions, we also can look at separate kurtosis and skew tables for each input. Tables
11.13 and 11.14 show w h a t these measures look like for each trade length applied
to all the different stop loss values, a n d each stop loss value applied to every trade
length, respectively. F r o m Table 11.13 we can see that the skew increases with the
trade length, which m e a n s that the longer the trade, the better off we seem to be.
A similar relationship does not to exist for the kurtosis. W h e n it c o m e s to the stop
loss both the kurtosis and the skew p e a k around the 1.2% level. This is good w h e n
it c o m e s to the skew, but bad from a kurtosis point of view.
F r o m Figures 11.10 through 11.13 and Tables 11.13 and 11.14 it seems as
t h o u g h a stop loss/trade length combination of 1.1 to 1.2% and seven to eight days
FIGURE
11.12
The kurtosis of the returns as a function of the trade length and stop loss level.
PART 3
212
FIGURE
Getting Out
11.13
The skew of the returns as a function of the trade length and stop loss level.
TABLE
11.13
Kurtosis
Skew
2.0000
3.5569
-0.7034
3.0000
3.8781
-0.7326
4.0000
4.8803
-0.3035
5.0000
4.3825
-0.3015
6.0000
3.1974
0.6934
7.0000
7.0289
1.0748
8.0000
2.6979
1.0727
9.0000
4.4220
0.7154
10.0000
3.8914
1.2584
CHAPTER 11
213
TABLE
11.14
Kurtosis
Skew
0.5000
4.0508
1.0517
0.6000
3.8028
1.1058
0.7000
2.7710
0.9926
0.8000
3.7190
1.1055
0.9000
5.0752
1.0647
1.0000
7.9998
2.0985
1.1000
10.0930
0.3240
1.2000
11.6853
2.4169
1.3000
4.2248
1.0409
1.4000
3.1491
0.8757
1.5000
2.1659
0.9603
1.6000
9.7810
2.0154
1.7000
2.9646
0.5511
1.8000
4.1007
-0.4604
1.9000
8.6028
1.2669
2.0000
4.8537
0.4595
Figure 11.14 shows the average return as a function of the profit target and the
stop loss. As you can see, the profit target was tested for all values between 1 and
4% in increments of 0.2%. T h e profit target/stop loss tests were m a d e the same way
as the stop loss/trade length tests, but this time for a total of over 400,000 unique
yearly trade sequences, which took forever and a day. From Figure 11.14 y o u can
see that generally, the m o r e distant the profit target and the wider the stop loss, the
better the results. B u t there also are two smaller areas around the 1% stop loss that
could be worth looking into: o n e with a profit target of about 2 . 8 % , and the other
with a profit target around 3.4%. The average return seems to benefit from keeping
the distance between the stop and the profit target as w i d e as possible. To reach
these returns, however, we m u s t take on proportionally m u c h more risk that if we
choose to keep the profit target down to around 2 . 8 % . For instance, to increase the
return for the profit target by 2 1 % , from 2.8 to 3.4%, we must increase the risk by
6 0 % , from 1 to 1.6%>, which is not such a desirable trade-off.
With several alternatives like this, y o u m u s t sit d o w n and figure out which
one will give you the m o s t b a n g for the buck. That is, which combination will give
y o u the highest average profit and at the s a m e time keep the profit potential open
for large positive out Iyer trades, while also keeping the lid on the losses? O n e
advantage of the riskier combination, with the 3 . 4 % profit target and 1.6% stop
loss, is that it is surrounded by several other high-value areas, which m e a n s that it
probably will continue to produce good results even if the true best values happen
214
PART 3
FIGURE
Getting Out
11.14
The percentage return from random entries as a function of the profit target and stop loss levels.
to move away from w h e r e we think they are. But, as noted, there is a price to everything in the market and only you can m a k e the choices most suitable for you.
To m a k e a choice like this, it also could be a good idea to look at the standard deviation chart which, in this case, shows that the standard deviation also
increases the w i d e r the stop loss and the m o r e distant the profit target (chart not
shown). Other charts and tables, such as those for kurtosis and skew also indicate
that we probably would be better off with a stop loss s o m e w h e r e in the 0.9 to 1.1%
region, which also confirms our findings from the stop loss/trend length examination. Let us go with a stop loss of 1.1% and a profit target of 2 . 8 % .
To c o m e up with a trailing stop or m i n i m u m profit level we will r u n it against
the time-based stop, testing all values between 0.2 and 1% in increments of 0 . 1 % .
This results in m o r e than 125,000 unique yearly trade sequences. Parts of the result
from this r u n can be seen in Figure 11.15, which shows the average profit in relation to different m i n i m u m profit levels and time-based stops. W h e n testing for the
CHAPTER 11
215
m i n i m u m profit level, the criterion is that the market m u s t have closed above a certain open profit and then moved below this level on a later bar for a trade to be
closed out. A m i n i m u m profit of 0 . 6 % produces fairly robust results, no matter
what the m a x i m u m trade length h a p p e n s to be. However, a m a x i m u m trade length
of seven to nine days seems to be the most robust t i m e window. This confirms
what we already suspected when we analyzed Figure 1 1 . 1 0 .
W h e n it c o m e s to the m i n i m u m profit level, you might also say that the market m u s t close with a low above the desired level for all long trades or the high
below the desired level for all short trades. This generally gives the system slightly m o r e slack and results in fewer trades getting closed out at the m i n i m u m profit level, slightly m o r e trades getting closed out at the m a x i m u m profit target, and
a bunch of trades s o m e w h e r e in between because of the time-based stop. There
also will be a b u n c h of trades closed out with a loss, because they never m a n a g e d
to fulfill the m o r e stringent criterion for the profit protection stop to kick in.
FIGURE
11.15
The percentage returns from random entries as a function of the trade length and minimum profit level.
216
PART 3
Getting Out
As you can see from Figure 11.15, it s e e m s that our best alternative is a mini m u m profit level of 0.6% together with a trade length between seven to nine days.
This confirms our previous findings about an eight-day m a x i m u m trading horizon.
T h u s , the final system has the following exit rules:
Exit with a profit if the market closes with a 0.6% open profit and then moves
below this level.
T h e summarized results from adding these exits to the system, together with
the export function for the R A D contract, can be seen in Table 11.15. As you can
see, the average final profit is only one hundredth of a percent. It isn't m u c h , but at
least it's there. Of course, an expected return this small is not tradable, but the point
is that just by using a set of logical exits and stop techniques, we managed to produce a slightly positive average return. We h o p e to boost the results by applying this
set of exits to one or several high-probability entry techniques. Another interesting
observation is that the M F E value is a great deal larger than the absolute value for
the M A E level. All in all, this indicates that the stops a n d exits indeed manage to
create a positive bias out of nothing. (Please r e m e m b e r that we are still placing all
trades randomly and with no concern for the underlying trend.)
Figure 11.16 shows w h a t the average trade could look like, assuming that the
sequence of events is as outlined. T h a t this does not necessarily have to be so can
be seen both from the relatively low standard deviation interval for the close and
the fact that the standard deviation intervals for the M A E a n d M F E seem to be
approximately the same. ( R e m e m b e r that it is reasonable to a s s u m e the standard
deviation should increase the further away we get from the entry.) Whatever the
case, please note h o w narrow the standard deviation interval is; that m e a n s that,
aside from the actual outcome, the exits are doing a very good j o b in streamlining
the trades.
T h e next step in building a system using the Black Jack technique is obviously to attach it to a high-probability entry technique. Let us see h o w these exits
would have fared with the short-term entry techniques already discussed. Table
TABLE
11.15
MFE
Final profit
-1.0841
1.3200
0.0140
0.3192
0.3652
0.1203
CHAPTER 11
F I G U R E
217
11.16
The summarized life for the average random trade, using the Black Jack exits.
11.16 shows the results for the Gold D i g g e r entry technique, traded on the S & P
500, for the period January 1995 to October 1999. T h i s table can be c o m p a r e d
directly to Table 11.3, but before you do that, also r e m e m b e r that w h e n we put
together the Black Jack exits we didn't even look at the S & P 500. If this system
w o r k s on the S & P 500 as well, it m e a n s that we are exploiting a type of market
discrepancy that is the s a m e for all markets, and therefore, is likely to be profitable
on a w i d e variety of m a r k e t s as long as the point values are high enough.
A n d what do you know! This set of exits worked even better than the originals. First, we have a m u c h higher average trade, although it is still slightly on the
low side. This is c o m p e n s a t e d for by a lower standard deviation, which m e a n s that
the risk-adjusted return n o w is m u c h higher. T h e cumulative profit also is m u c h
T A B LE
11.16
141
Profit factor
1.26
Lrg winner
Avg winner
Avg profit
0.17%
569
St Dev
1.88%
6,348
Winners
Cum profit
78
55.32%
5.14%
17,348
Lrg loser
1.49%
5,031
Avg loser
23.68%
79,920
Drawdown
Losers
63
44.68%
-8.30%
-28,013
-1.47%
-4,955
-15.66%
-52,853
PART 3
218
Getting Out
higher, as is the percentage of winning trades. On the negative side, we see that the
drawdown is slightly higher as well.
W h e n we built the Gold D i g g e r system, we used the period January 1985 to
D e c e m b e r 1994 for s o m e out-of-sample testing, which naturally put the lid on the
results w h e n c o m p a r e d to the optimization period. T h e out-of-sample period was,
furthermore, m u c h larger in size, w h i c h m e a n t that it should hold m o r e unfavorable m a r k e t conditions. Therefore, it is likely that a comparison with that period
will c o m e closer to the truth regarding what the Gold Digger/Black Jack combination really is worth. C o m p a r e Tables 11.17 a n d 11.5.
The truth is that if you have built a system exactly right, any market condition that does not exactly parallel the conditions under which you built the system
will be unfavorable. Because if you have built a system exactly right, you will have
squeezed out every o u n c e of information the market holds and the system will
therefore have a positive bias, but behave as if the individual results were dropping
in randomly. T h e reason for this is, as long as the system does not behave in this
r a n d o m fashion, the outcome is predictable, and if something is predictable there
is m o r e information to squeeze out. If the conditions have changed from one time
to another that m e a n s that there is m o r e and newer information to squeeze out, and
the system will now perform on a suboptimal leveleven if it temporarily might
produce better-than-expected results.
T h e above reasoning also puts a twist to another interesting question. Is there
such a thing as a system that (seemingly) could be doing too well? For instance,
say that you have put together a system that is expected to p r o d u c e an average
profit of 1%. B u t after you have traded the system for a while you realize that the
average profit, in fact, has b e e n closer to 2 % . W h a t to do? T h e answer is, examine
the system closely a n d try to find out w h a t is causing these excess returns and
adjust the system to take these causes into consideration. Because the truth is that
w h e n the system is not w o r k i n g as intended, you do not know what you are doing;
what might cause excess returns might also be the reason why you have to sell
your h o u s e tomorrow.
Tested over the period January 1985 to December 1994, the Gold Digger/
Black Jack combination has a lower profit factor and average trade than the Gold
Digger system alone. W h e n it comes to the percentage profitable trades and standard
deviation, on the other hand, Gold Digger/Black Jack excels. It also is interesting to
TABLE
11.17
292
Winners
Profit factor
1.20
Lrg winner
Avg winner
Avg profit
0.12%
407
St Dev
1.74%
5,864
Cum profit
159
54.45%
7.62%
25,718
1.31%
4,412
35.80%
120,825
Losers
Lrg loser
Avg loser
133
45.55%
-12.61%
-42,559
-1.30%
-4,381
Drawdown - 1 5 . 8 8 %
-53,595
CHAPTER 11
219
note that the results for the out-of-sample period no longer differ that m u c h from
those of the in-sample period, which m e a n s that, although the profit potential is
somewhat low, at least the results are very robust over time.
For the M e a n d e r / B l a c k Jack combination, the results are a little m o r e inconclusive. Table 11.18 shows h o w this system would have performed during the
optimization period, and is directly comparable to Tabic 11.9. As you can see, this
system has a slightly lower profit factor and average profit per trade. T h e percentage of profitable trades also is lower. On the positive side, however, there is a quite
dramatic decrease of m a x i m u m drawdown, from an already low 1 0 . 8 % to a very
low 7 . 8 % .
W h e n it is tested on the out-of-sample period, two sad things happen with the
M e a n d e r / B l a c k Jack combination. T h e m o s t obvious thing, w h e n we c o m p a r e
Tables 11.19 and 1 1 . 1 1 , is that it continues to be outperformed by the original
M e a n d e r system. W h a t is even worse is that the results for the out-of-sample period are no longer similar to those from the in-sample period. As you can see, the
average profit n o w has decreased to 0 . 2 2 % , while the profit factor is down to 1.32.
T h e drawdown also has increased to 15.8%. O n e positive thing is the slightly lower
standard deviation, as c o m p a r e d to the original system, but because the ratio
between the average profit and the standard deviation still c o m e s out m u c h lower,
this does not help m u c h .
T h e B l a c k J a c k exits are not as g o o d together with the M e a n d e r system as
those developed specifically for this system. T h e question we then m u s t ask ourselves is if we should stick to the original exits because we k n o w they work well
with this particular system, or switch to the Black Jack exits, because they should
work well, on average, with any type of entry technique?
To answer this question, we m u s t go back and look at the differences between
the two sets of exits. In doing so, we can see that there are three major differences.
First, the profit target is m u c h further away from the entry in the original set of
exits. Second, the original set of exits also operates without a time-based stop. This
m e a n s that we are letting the profits r u n " m o r e fluently," so to speak, with the original set of exits, m a k i n g the m o s t of w h a t s e e m s to be a very strong entry technique. Finally, the stop loss is also further away from the entry in the original set
of exits, w h i c h m e a n s that we are putting m o r e trust into the entry signal. This confirms the reasoning behind points n u m b e r one and two, because the better the
TABLE
11.18
79
Profit factor
1.67
Winners
Lrg winner
Avg profit
0.39%
1,321
Avg winner
St Dev
1.90%
6,379
Cum profit
44
55.70%
35
44.30%
4.88%
16,470
Lrg loser
-5.74%
-19,373
1.75%
5,902
Avg loser
-1.32%
-4,440
34.24%
115,560
Drawdown
-7.76%
-26,190
Losers
PART 3
220
TABLE
Getting Out
11.19
136
Profit factor
1.32
Lrg winner
Avg winner
Avg profit
0.22%
731
St Dev
2.76%
9,299
Winners
Cum profit
52.21%
47.79%
21.92%
73,980
Lrg loser
-11.21%
-37.834
1.72%
5,793
Avg loser
-1.42%
-4,799
25.64%
86,535
Drawdown - 1 5 . 7 9 %
-53,291
Losers
TA B L E
11.20
87
Profit factor
2.16
Avg profit
St Dev
0.50%
1.59%
1,695
5,352
Winners
Lrg winner
Avg winner
C u m profit
59
67.82%
28
32.18%
3.09%
10,429
Lrg loser
-2.90%
-9,788
1.38%
4,654
Avg loser
-1.35%
-4,541
-4.01%
-13,534
53.00%
178,875
Losers
Drawdown
CHAPTER 11
TABLE
221
11.21
202
48.02%
10
51.98%
Profit factor
0.89
Lrg winner
4.12%
13,905
Lrg loser
-6.29%
-21,229
-0.08%
-257
Avg winner
1.24%
4,199
Avg loser
-1.30%
-4,373
1.54%
5,197
Cum profit - 1 6 . 3 5 %
-55,181
Drawdown - 2 6 . 0 5 %
-87,919
Avg profit
St Dev
Winners
Losers
nation. But with the help of hindsight, we n o w k n o w that we in fact should have
thrown away the Gold Digger/Black Jack combination and started to trade the
Black Jack/Black Jack combination.
So what does this teach u s ? It teaches us that it is p a r a m o u n t to m a k e sure
that the system works, on average, equally as well over several time periods and
markets, and that the input parameters we are using are robust e n o u g h to be trusted. F r o m j u s t looking at the results for the period leading up to D e c e m b e r 1994,
we h a d no way of c o m i n g to that conclusion. It also tells us that even a market/syst e m combination that we trust completely will go through dry spells and that we
never should place all our eggs in o n e basket (more about that in Part 5).
B e c a u s e a s already pointed o u t w h e t h e r a system works better or worse than
expected, in both cases you are taking a w a l k on the wild side, and exactly the
s a m e environment that s e e m s to be so friendly this very m o m e n t will eat you alive
in five m i n u t e s if you haven't m a d e sure that you have other alternative routes of
action w h e n danger strikes.
PART
THREE
224
PART 3
Getting Out
PART
FOUR
High-probability Filters
To continue to trust your trading strategy after a long d r y spell, especially if at the
same time, the market is breaking out to record highs or lows, is very difficult a n d
probably the first reason why so m a n y of us fail as traders. If only there was a way
to tell w h e n to take the signal, w h e n not to take the signal or, heaven forbid, perhaps
even w h e n to fade the signal. Basically, there are two ways of filtering out high-probability trading opportunities and the question y o u should ask yourself is, "Is it better to trade with the long-term trend a n d can the short-term volatility help to determ i n e the outcome of the t r a d e ? " This is an important question that all traders should
ask themselves, and the only way to find out is to do the necessary research.
225
CHAPTER
12
Filtering
PART 4
228
High-probability Filters
makes a trend and how this knowledge might add a m o r e theoretical, or even philosophical, aspect to the way you might perceive your role as a market participant and
what it is you are trying to achieve.)
Alternatively, you could simply only trade in the s a m e direction as a longt e r m moving average. In a series of articles for Futures m a g a z i n e , " S k i m m i n g the
T r e n d " a n d "Fading Away," (February 1999), a n d "In the Pudding," (March 1999),
and in the April 2 0 0 0 issue of Active Trader Magazine, I concluded that trading
only in the direction of a 200-day moving average does, indeed, increase results
significantly. This holds true even if you enter the markets randomly, as long as
you take trades only in the direction of the underlying trend and stick to the same
exit strategy for all trades.
Table 12.1 shows the result of entering 16 different markets randomly in any
direction over the time period January 1980 to October 1999, as compared to
entering randomly but only in the s a m e direction as a 200-day moving average.
Each market w a s traded 12 times, creating a total of close to 3,500 unique yearly
trading sequences per strategy. In both strategies, I stayed in each trade for five
days, c o m e rain or c o m e shine. T h e 16 markets traded were D mark, crude oil,
lumber, copper, gold, dollar index, live cattle, T-bonds, cotton, Japanese yen, natural gas, wheat, Nikkei index, coffee, T-bills, and rough rice.
Without the trend filter, only seven markets had an average profit factor
above one, b u t for none of t h e m can we say with 6 8 % certainty that the true profit factor is above 1. For instance, with an average profit factor of 1 and a standard
deviation of 0.19, we cannot say with 6 8 % certainty that the true profit factor for
rough rice is above 1. For all markets combined, the true profit factor is with 6 8 %
certainty likely to be found somewhere within the interval 0.88 to 1.12.
With the trend filter, however, all markets but one (natural gas) h a d an average profit factor above 1 and for a total of nine we also can say that we can be 6 8 %
sure the true profit factor will be above 1. For all markets combined, the average
profit factor c o m e s out to 1.16, with a standard deviation of 0.13. This m e a n s that
we can be 6 8 % sure that the true profit factor for all market will lie somewhere in
the interval 1.03 to 1.29. (Similar observations that support the findings regarding
the profit factor also can be m a d e for the percentage of profitable trades.) Thus,
with a simple test like this we prove the benefits of always trading with the longt e r m trend, even w h e n we enter randomly and with such a simple exit technique as
always exiting after five days. Imagine what we could do if we were to optimize a
trend-monitoring strategy with a set of well-researched entry and exit techniques.
CHAPTER 12
Filtering
TABLE
229
12.1
Market
Profit
factor
St
Dev
profitable
Profit
factor
St
Dev
profitable
St
Dev
D-mark
0.98
0.07
52.45
1.90
1.21
0.11
56.08
2.24
Crude oil
0.94
0.16
50.10
2.01
1.15
0.15
56.21
1.83
Lumber
0.98
0.11
50.68
1.79
1.23
0.09
53.56
1.64
Copper
0.97
0.06
50.11
1.59
1.25
0.10
51.43
1.96
Gold
1.04
0.18
50.98
1.82
1.11
0.13
52.23
1.52
Dollar index
1.02
0.09
50.26
2.63
1.18
0.13
52.65
2.23
Live cattle
1.04
0.09
50.43
1.96
1.06
0.11
52.42
1.76
T-bonds
1.04
0.11
50.14
2.21
1.22
0.09
54.81
1.75
Cotton
0.97
0.11
50.09
1.76
1.22
0.11
54.05
1.94
Japanese yen
0.99
0.11
52.24
1.88
1.22
0.08
56.56
1.52
Natural gas
1.03
0.12
49.76
3.46
0.99
0.11
49.26
1.86
Wheat
1.03
0.10
51.15
1.64
1.11
0.11
53.03
1.57
Nikkei index
0.97
0.15
50.60
3.51
1.09
0.11
54.26
1.99
Coffee
1.00
0.13
49.87
2.40
1.06
0.09
51.60
1.65
T-bills
1.01
0.14
51.53
1.95
1.20
0.16
55.32
1.78
Rough rice
1.00
0.19
50.19
2.62
1.26
0.13
55.26
2.25
All markets
1.00
0.12
50.66
2.32
1.16
0.13
53.67
2.65
230
PART 4
FIGURE
12.1
The S&P 500 futures contract charted together with a 200-day moving average and the OBV indicator.
High-probability Filters
CHAPTER 12
Filtering
231
the down side has increased, while there has been a diminishing volume on the up
side, m a k i n g it increasingly harder to trade any rallies successfully. Also, there is
nothing keeping you from having several different strategies, based on several different trend filters. It is important to stay consistent with your beliefs and trust w h a t
your research has shown you for that particular system.
If you like to take a m o r e fundamental approach, you instead could calculate
a ratio between the market of your interest and the short-term interest rate, such as
that of the T-bill. T h e reasoning behind this indicator is that w h e n the price for Tbills is increasing faster than the price for " y o u r market," m a n y m a r k e t participants
prefer the safe haven of interest rates instead of taking the c h a n c e of investing in
a market that they d e e m to have a very low profit potential. This could present a
good opportunity to go short, especially if " y o u r m a r k e t " starts to decline as well.
If the opposite holds true, however, and your m a r k e t is increasing faster in price
than the T-bills, m o r e a n d m o r e investors n o w prefer to b u y the market instead of
staying in interest rates. This could present a good opportunity to go long. Again,
the m e t h o d is the s a m e as for the basic moving average filter. With the help of a
long-term moving average we can decide whether or not the m o n e y is flowing into
or out of the market in w h i c h we are interested.
Finally, I use another method that sort of turns the entire reasoning around.
With the three m e t h o d s above, we strive to trade in the direction of the underlying
trend, but because m a n y short-term systems try to enter with limit orders, there
might be plenty of contradicting signalsshort-term entry signals saying " b u y "
and long-term trend filters saying "sell." To work around this, you might formulate
a rule that says, "as long as the trend is not down, I can go long, and as long as the
trend is not up, I can go short." O n e way of doing this is to use a basic highest
high/lowest low breakout indicator, which says that as soon as we m a k e a new high
(low) the long-term trend is up (down) and, as long as the short-term limit order,
sell (buy) signal does not collide with a new high (low), we can take the trade.
In this chapter we test a few versions and different lengths of these trend filters,
together with all our short-term systems, on a portfolio of different markets to see if
there is anything to be gained from adding filters to the systems as they function so far.
For the basic price filter, the O B V filter, and the T-bill ratio filter we test if
it is better to go with the slope or the crossover of their respective moving averages. This counts for a total of six different filter techniques. For each m o v i n g
average filter, 10 different lengths of the moving average will be tested, ranging
from 50 to 250 days, in steps of 20 days. For the breakout filter, the lookback period will vary from 20 to 120 days, in steps of 10 days. E a c h trade is entered randomly, but only in the s a m e direction as the underlying trend, as indicated by the
filter, and each market is traded 10 times for G o d knows h o w m a n y trades and
unique yearly trading sequencescertainly enough to let us c o m e up with some
meaningful conclusions anyway. T h e exit strategy for all m a r k e t s and filters is the
generic exits a n d stops combination we derived in Part 3. T h e 16 markets tested
PART 4
232
High-probability Filters
over the period January 1980 to October 1992 are D mark, crude oil, lumber, c o p per, gold, dollar index, live cattle, T-bonds, cotton, Japanese yen, natural gas,
wheat, Nikkei index, coffee, S & P 500, and r o u g h rice.
In TradeStation, the code for taking a short position with any of these filters,
together with a simple export function that exports the value of the average trade
for each t i m e the system runs through the market, looks something like this:
Inputs: Counter(O), SystemSwitch(O), OBVLen(O), MALen(O), RaLen(O),
BOLen(O);
Vars: TotTr(O), MP(0), FTE(O), Firstlnput(O), TradeStrl("");
If (SystemSwitch =3 and OBV < Average(OBV, OBVLen)) Or
(SystemSwitch =4 and Average(OBV, OBVLen) < Average(OBV, OBVLen)[l]) Or
(SystemSwitch =5 and Close < Average(Close, MALen)) Or
(SystemSwitch =6 and Average(Close, MALen) < Average(Close, MALen)[l]) Or
(SystemSwitch =7 and Ratio < Average(Ratio, RaLen)) Or
(SystemSwitch =8 and Average(Ratio, RaLen) < Average(Ratio, RaLen)[l]) Or
(SystemSwitch =9 and Close < Highest(Close, BOLen)) Then
Sell at Close;
If TotTr > TotTrfl] Then Begin
If MP[1] =1 Then
FTE =(ExitPrice(l) - EntryPrice(l)) / EntryPrice(l);
I f M P [ l ] = - 1 Then
FTE =(EntryPrice(l) - ExitPrice(l)) / EntryPrice(l);
SumFTE = SumFTE + FTE;
End;
If LastBarOnChart Then Begin
If SystemSwitch =3 or SystemSwitch =4 Then
Firstlnput = OBVLen;
If SystemSwitch =5 or SystemSwitch =6 Then
Firstlnput = MALen;
If SystemSwitch =7 or SystemSwitch =8 Then
Firstlnput = RaLen;
If SystemSwitch =9 Then
Firstlnput = BOLen;
FTE = SumFTE / TotalTrades;
TradeStrl =LeftStr(GetSymbolName, 2) + "," + NumToStr(FTE, 4) +
"," + NumToStr(FirstInput, 2) + NewLine;
FileAppend("D:\Temp\LT-Filter.csv", TradeStrl);
End;
CHAPTER 12
Filtering
233
With this code you can set up a w o r k g r o u p containing all the markets you
would like to test, and run the system optimizer on all markets at once. While the
c o m p u t e r is chewing away, go do something else for a change, because this can
take a while. By the way, be careful w h e n you are exporting data from
TradeStation while using the optimizer. For some reason, w h e n the optimization is
done, the p r o g r a m once again runs through and exports the results for the "best"
input variable combination, not o n c e , but twice, and sometimes even three times!
Weed out these extra runs from your spreadsheets manually before you do any further analysis.
W h e n it c o m e s to volatility, in any market, higher volatility also m e a n s higher risk because of the greater likelihood that the market can move against you.
Obviously then, from a safety point of view, the lower the volatility the better. T h e
problem is that especially for shorter-term trading, high volatility also m e a n s a
higher profit potential. T h e trick is to find those short-term situations w h e n the
volatility is high enough to m a k e it worthwhile to trade but not so high that only a
fool would enter the market. But because there is m o r e than one way to measure
volatility, how do you k n o w w h i c h m e t h o d will give the most accurate reading?
T h e truth is, nobody knows, and your guess is as g o o d as m i n e . Probably the
m o s t c o m m o n way is to calculate the standard deviation of the closes, w h i c h is
basically what you do if you are an options trader and, therefore, work with different option pricing formulas, such as Black and Scholes or Black-76. However,
over the last couple of years there s e e m s to be at least one m e t h o d that has
emerged as the m o s t popular a m o n g technical analysts. This is the true range or
average true range method that states that w h e n the true range of today's price
action is below the average true range for a specified lookback period (sometimes
multiplied by a chosen factor) the most recent volatility is lower than expected, and
hence, the market is about to calm down a n d b e c o m e less risky to trade, no matter the direction of the potential trade. T h e true range is defined as the distance
between today's high (low), and today's low (high) or yesterday's close, whichever p r o d u c e s the largest distance.
To test if there is any validity to this c o m m o n l y used technique, I set out to
test this technique over several different lookback periods, ranging from 10 to 40
days, in steps of three days, using the same markets a n d set up as for the long-term
filters. T h e rule w a s not to take a trade in any direction if the most recent volatility (true range) was higher than the average volatility (average true range) over the
lookback period.
T h e m a i n disadvantage, however, with both the standard deviation method
and the average true range method is that none takes the direction of the volatility
into consideration. For instance, in a strongly up-trending market that only climbs
higher and higher, it is obvious that most, if not all, of the volatility is to the up
side. This, in turn, is of course very good if you are long in the market but not so
good if you are short. Therefore, it also could be a good idea to try to use some
234
PART 4
High-probability Filters
CHAPTER 12
Filtering
235
TABLE
12.2
Average
St Dev
Ratio
Kurtosis
Skew
50
0.1201
0.2071
0.5799
6.2312
2.0777
70
0.1186
0.2116
0.5606
6.1378
1.3598
90
0.0821
0.1400
0.5863
4.5955
0.2875
110
0.1252
0.1766
0.7088
8.2450
1.3125
130
0.1131
0.1722
0.6568
4.6584
0.8590
150
0.1058
0.1718
0.6157
4.5265
0.1703
170
0.1139
0.1715
0.6641
10.4910
-0.9180
190
0.0818
0.1578
0.5181
4.6071
-0.5006
210
0.1001
0.1525
0.6563
18.6751
-2.9483
230
0.1023
0.1538
0.6654
8.3662
0.6040
250
0.1202
0.2020
0.5950
13.4122
0.2106
TABLE
12.3
Average
St Dev
Ratio
Kurtosis
Skew
20
0.0460
0.1478
0.3112
5.3691
0.3835
30
0.0408
0.1385
0.2946
3.7634
1.2145
40
0.0309
0.1267
0.2437
6.0328
-0.7399
50
0.0456
0.1475
0.3088
4.5719
0.7597
60
0.0511
0.1461
0.3499
7.2699
1.7590
70
0.0401
0.1578
0.2543
5.0591
-0.1657
80
0.0317
0.1196
0.2649
7.2570
1.5680
90
0.0318
0.1486
0.2141
5.0252
-1.1230
100
0.0293
0.1438
0.2034
10.8615
-1.7311
110
0.0474
0.1597
0.2966
5.2053
-0.4098
120
0.0419
0.1318
0.3182
4.0369
0.5033
PART 4
236
TABLE
High-probability Filters
12.4
Length
Average
St Dev
Ratio
Kurtosis
Skew
DMI
34
0.1287
0.1860
0.6920
4.9766
1.8047
True range
37
0.0467
0.1807
0.2583
6.1131
-0.1240
RSI
28
0.1128
0.2165
0.5210
4.0422
0.1418
OBV-cross
70
0.1019
0.1686
0.6045
3.6123
1.0086
OBV-slope
70
0.1026
0.1767
0.5805
5.9592
1.4997
MA-cross
130
0.1131
0.1722
0.6568
4.6584
0.8590
MA-slope
70
0.1261
0.1679
0.7510
6.9234
1.7958
Ratio cross
70
0.1117
0.1984
0.5629
4.3042
1.6645
Ratio slope
90
0.0776
0.2137
0.3633
9.8603
-0.9665
Breakout
60
0.0511
0.1461
0.3499
7.2699
1.7590
T h o s e that did not work at all w e r e the true range method, the T-bill ratio slope
indicator, and the breakout method.
A few things worth mentioning from this test can c o m e in h a n d y for your
own testing: the O B V and ratio indicators probably would have d o n e better had
they been tested with shorter lookback periods. T h e not-so-tantalizing results for
the breakout filter probably are because of the b a c k w a r d s reasoning you m u s t use
for a filter like this, in combination w i t h the r a n d o m entries, which, as things are
right now, allow for a lot of trades with the market in no trend at all, or in consolidation m o d e . T h e s a m e holds true for the true range method, when c o m p a r e d to
the results for the D M I and R S I indicators. Finally, it is interesting to note that the
m o v i n g average crossover m e t h o d does not s e e m to work quite as well as the slope
m e t h o d of half the length. This confirms our findings from Part 2, w h e r e we put
together our weekly directional slope system.
CHAPTER 12
TABLE
Filtering
237
12.5
30
16
55.33%
14
46.67%
Profit factor
1.32
Lrg winner
2.80%
9,450
Lrg loser
-2.07%
-6,986
Avg winner
1.37%
4,613
Avg loser
-1.19%
-4,002
C u m profit
5.06%
17,078
Drawdown
-4.16%
-14,040
Avg profit
0.18%
593
St Dev
1.51%
5,093
Winners
Losers
TABLE
12.6
Profit factor
5.91
Winners
77.78%
22.22%
Lrg winner
2.80%
9,450
Lrg loser
-1.10%
-3,713
1.86%
6,268
Avg loser
-1.10%
-3,713
11.21%
37,834
Drawdown
-1.10%
-3,713
Avg profit
1.20%
4,050
Avg winner
St Dev
1.65%
5,584
C u m profit
Losers
238
PART 4
TABLE
High-probability Filters
12.7
367
Winners
Profit factor
1.30
Lrg winner
Avg winner
Avg profit
0.17%
569
St Dev
1.52%
5,135
TABLE
Cum profit
193
52.59%
174
47.41%
5.03%
16,976
Lrg loser
-4.48%
-15,120
1.38%
4,642
Avg loser
-1.17%
-3,949
77.58%
261,833
Drawdown
-7.94%
-26,798
101
53.72%
Losers
87
46.28%
5.14%
17,348
Lrg loser
-8.30%
-28,013
1.62%
5,464
Avg loser
-1.44%
-4,862
41.68%
140,670
Drawdown - 1 2 . 1 1 %
-40,871
Losers
12.8
188
Profit factor
1.30
Lrg winner
Avg winner
Avg profit
0.20%
685
St Dev
1.88%
6,329
Winners
Cum profit
TABLE
12.9
454
Winners
Profit factor
1.26
Lrg winner
Avg winner
Avg profit
0.15%
513
St Dev
1.68%
5,654
Cum profit
242
53.30%
7.62%
25,718
Losers
Lrg loser
1.36%
4,595
Avg loser
86.55%
292,106
212
46.70%
-12.61%
-42,559
-1.23%
-4,147
Drawdown - 1 8 . 2 9 %
-61,729
CHAPTER 12
239
Filtering
TABLE
12.10
236
Winners
Profit factor
1.23
Lrg winner
Avg winner
Avg profit
0.15%
520
St Dev
1.81%
6,095
C u m profit
120
50.85%
5.14%
17,348
Losers
Lrg loser
116
49.15%
-8.30%
-28,013
1.60%
5,401
Avg loser
-1.34%
-4,529
38.37%
129,499
Drawdown
-13.48%
-45,495
TABLE
12.11
60
Profit factor
0.89
Lrg winner
--0.07%
-250
Avg winner
1.68%
5,685
Cum profit
Avg profit
St Dev
TABLE
Winners
32
55.33%
2.80%
9,450
Losers
Lrg loser
1.09%
3,672
Avg loser
-4.13%
-13,939
Drawdown
28
46.67%
-8.05%
-27,169
-1.40%
-4,732
-13.19%
-44,516
12.12
29
Profit factor
3.36
21
72.41%
27.59%
Lrg winner
4.21%
14,209
Lrg loser
-1.64%
-5,535
1.52%
5,127
Avg loser
-1.19%
-3,999
24.56%
82,890
Drawdown
-3.41%
-11,509
Winners
Avg profit
0.77%
2,609
Avg winner
St Dev
1.63%
5,498
C u m profit
Losers
PART 4
240
High-probability Filters
TABLE
12.13
202
Winners
117
57.92%
Losers
85
42.08%
-10,429
1.38
Lrg winner
4.12%
13,905
Lrg loser
-3.09%
Avg profit
0.19%
641
Avg winner
1.20%
4,038
Avg loser
-1.20%
-4,036
St Dev
1.43%
4,838
43.35%
146,981
-10.88%
-36,720
Profit factor
TABLE
C u m profit
Drawdown
12.14
92
60
65.22%
32
34.78%
Profit factor
2.00
Lrg winner
4.04%
13,635
Lrg loser
-2.90%
-9.788
1.41%
4,775
Avg loser
-1.33%
-4,478
50.02%
168,818
Drawdown
-5.03%
-16,976
Winners
Avg profit
0.46%
1,556
Avg winner
St Dev
1.63%
5,485
Cum profit
Losers
CHAPTER
13
242
PART 4
High-probability Filters
second indicator, which for our purposes is also the original entry strategyor this
is the theory m a n y system vendors seem to adhere to, because as the A D X indicator is their first choice when it c o m e s to measuring the strength of the trend. The
A D X test also was d o n e as a two-variable test, w h e r e we tested different lengths for
the lookback period together with several different trigger levels. For the lookback
period we varied the length from 10 to 20 days, in steps of 1 day. T h e trigger level
we varied from 15 to 35, in steps of 2. T h e added trading rule was not to take the
trade if the A D X reading for the day if the breakout was below the required trigger
level. Both system/filter combinations also m a k e use of the stops a n d exits for each
respective system we developed in Part 3.
A n o t h e r important difference between the long-term a n d short-term testing
procedures is that for the long-term systems we cannot look at the final profit for
the trade, because this would w e e d out far too m a n y trades and m a k e the results
less meaningful. To do that would also contradict the reason we added the filter to
the system in the first place, which was to find the m o s t opportune m o m e n t to
enter in a trend that w a s already defined. Therefore, the best way is to try to minimize the STD, described in detail in Part 3, in relation to the final profit of the
trade. However, j u s t e x a m i n e the S T D w o u l d n ' t m a k e m u c h sense either, because
we still would like the trade to go on for as long as possible within the confines of
the original system. In essence, this m e a n s that we m u s t examine the entry efficiency of the trade.
In Part 3 we concluded that, for a long-term system, it is reasonable to
a s s u m e that the S T D will be the s a m e as the m a x i m u m adverse excursion (MAE)
and therefore can be derived the s a m e way, although the interpretations and treatm e n t s of the two are not the s a m e . T h e M A E should primarily be dealt with by
adjusting the stops, w h i c h we did in Part 3, w h e r e we also took care of all the other
types of drawdowns and excursions. T h e STD, on the other hand, should primarily be dealt with by filtering out the m o s t opportune trading situations, which is
what we are about to do now.
A l t h o u g h we might be using the s a m e techniques to derive the necessary data
for the S T D as for the M A E , it is important to understand that the two are not the
s a m e . N o r does either o n e of t h e m equal R I N A S y s t e m s ' entry efficiency. The difference is that the S T D should primarily be adjusted with the entry technique,
although the M A E should primarily be adjusted with a specific exit technique,
such as a stop loss. Together, the M A E and S T D m a k e up the entry efficiency.
T h e m a r k e t s used for testing were D mark, crude oil, lumber, copper, gold,
dollar index, live cattle, T-bonds, cotton, Japanese yen, natural gas, wheat, Nikkei
index, coffee, T-bills, and r o u g h rice. T h e time period covered was January 1980,
to October 1992.
Figure 13.1 shows that the D y n a m i c Breakout System ( D B S system) produced the highest entry efficiency in combination with the average true range filter with a seven-day lookback period and a multiplier of 0.5. B e c a u s e this is not a
CHAPTER 13
FIGURE
243
13.1
The entry efficiency for the DBS system in relation to the true range multiplier and its lookback period.
244
PART 4
FIGURE
High-probability Filters
13.2
The standard deviation of the entry efficiency for the DBS system and the true range filter.
this way, we avoid any of the areas of lower efficiency around, for instance, a trigger level of 21 and a lookback period of 11 days, if it happens that the true best
combination might shift slightly in the future
This is confirmed by Figure 13.4, w h i c h depicts the standard deviation of the
efficiency. In Figure 13.4, it seems that, as far as the standard deviation goes, we
should go with a trigger level of 25 and a lookback period of 11 days, without
increasing the standard deviation too m u c h ; because this seems to be possible
without running the risk of lowering the efficiency, this is our preferred choice.
Table 13.1 summarizes all the preferred choices for our three long-term syst e m s and filters. T h e time period covered is from January 1980, for all systems, to
October 1999 for the D B S and directional slope systems, and to October 1992 for
the standard deviation breakout system. T h e trade-by-trade export function from
Part 1 is used to export the results into an Excel spreadsheet for further evaluation
and comparison with earlier, pre-filter results.
CHAPTER 13
245
FIGURE
13.3
The entry efficiency for the DBS system in relation to the ADX trigger level and its lookback period.
TABLE
13.1
LB period
Trigger
LB period
Multiplier
Dynamic Breakout
11
25
1.5
14
21
17
0.9
Directional Slope
11
25
11
1.7
PART 4
246
F I G U R E
High-probability Filters
1 3 . 4
The standard deviation of the entry efficiency for the DBS system and the ADX filter.
CHAPTER 13
247
TABLE
13.2
Performance measurements for all markets for the DBS/true range combination.
After filter (modified system with exits and filter)
Market
P. factor
Avg. trade
2 St. dev.
Drawdown
Corn
1.31
69.73
1,425.07
-3,556.69
S&P 500
0.94
-289.83
27,234.52
-144,606.61
Orange juice
1.35
104.50
2,407.67
-9,192.10
Live cattle
0.98
-6.81
2,293.99
-12,059.97
Lumber
1.20
114.27
3,630.98
-11,792.83
Coffee
1.19
153.91
5,558.24
-19,517.05
Japanese yen
2.13
1,207.82
9,862.45
-13,700.98
Copper
0.87
-52.83
2,224.48
-11,294.01
Gold
1.23
107.37
2,799.42
-9,348.00
Eurodollar
1.77
263.05
3,001.01
-7,073.90
Dollar index
2.23
776.99
6,054.09
-7,816.56
Cotton
1.32
165.24
3,923.99
-10,654.24
CRB index
0.59
-505.79
4,982.93
-54,603.45
Crude oil
2.22
555.04
4,772.65
-7,144.46
Canada dollar
1.20
62.68
2,055.76
-7,899.86
T-bonds
1.18
258.24
8,695.56
-24,953.48
PART 4
248
TABLE
High-probability Filters
13.3
Market
P. factor
Avg. trade
2 St. dev.
Drawdown
Corn
-5.02%
-15.74%
12.99%
-67.29%
-0.46%
1.44%
11.03%
S&P 500
-13.86%
-10.02%
-26.22%
-1.44%
5.85%
-3.47%
-190.30%
0.20%
12.31%
0
3
Orange juice
Live cattle
Lumber
6.61%
53.80%
1.39%
-2.02%
Coffee
17.98%
1344.93%
19.90%
-15.69%
Japanese yen
-3.59%
-2.29%
1.71%
0.00%
0
2
-6.72%
106.33%
-1.11%
11.48%
-15.00%
-44.85%
-5.57%
9.25%
Eurodollar
4.77%
5.67%
-0.58%
-17.53%
Dollar index
6.45%
10.65%
5.60%
-0.58%
Cotton
5.82%
26.01%
2.09%
-1.73%
CRB index
-1.00%
0.56%
-2.75%
-3.90%
Crude oil
-0.47%
1.90%
2.37%
-4.80%
6.67%
56.39%
6.07%
9.69%
-4.43%
7
-22.43%
0.09%
-0.53%
Copper
Gold
Canada dollar
T-bonds
Better
TABLE
13.4
P. factor
Avg. trade
2 St. dev.
Drawdown
Corn
1.26
58.29
1,396.50
-3,355.61
S&P 500
0.86
-732.10
27,240.46
-170,608.33
Orange juice
1.42
127.51
2,562.59
-10,495.37
Live cattle
0.99
-4.31
2,293.65
-11,805.89
Lumber
1.12
68.83
3,572.99
-13,732.89
Coffee
1.10
79.02
4,792.56
-19,299.50
Japanese yen
2.14
1,205.34
9,841.21
-16,746.74
Copper
0.87
-54.77
2,166.07
-11,078.56
Gold
1.58
237.19
2,916.27
-6,728.37
Eurodollar
1.68
238.06
2,992.40
-8,849.74
Dollar index
1.71
525.55
5,854.09
-10,174.83
Cotton
1.25
131.08
3,910.42
-11,709.41
CRB index
0.50
4,884.03
-55,666.35
Crude oil
2.36
-647.78
600.54
4,868.78
-7,508.33
Canada dollar
1.11
37.30
1,929.15
-6,386.36
T-bonds
1.19
264.28
8,514.21
-25,036.36
CHAPTER 13
249
TABLE
13.5
Avg. trade
2 St. dev.
Corn
-8.80%
-29.57%
-2.46%
4.75%
3.28%
-17.38%
1.46%
1.63%
Orange juice
-5.06%
-9.97%
4.90%
20.85%
Live cattle
-2.88%
-157.13%
0.19%
9.94%
Lumber
-0.72%
-7.36%
-0.23%
14.10%
Coffee
8.14%
641.83%
3.38%
-16.63%
S&P 500
Drawdown
Better
Market
Japanese yen
-3.04%
-2.49%
1.49%
22.23%
Copper
-7.71%
113.89%
-3.71%
9.35%
9.14%
21.81%
-1.63%
-21.37%
-0.97%
-4.37%
-0.87%
3.17%
-18,38%
-25.16%
2.11%
29.41%
0.07%
-0.04%
1.74%
8.01%
-16.57%
28.79%
-4.68%
-2.03%
Gold
Eurodollar
Dollar index
Cotton
CRB index
5.58%
10.25%
4.43%
0.05%
Canada dollar
-0.74%
-6.92%
-0.47%
-11.33%
T-bonds
-4.06%
-20.62%
-2.00%
-0.20%
Crude oil
Better
TABLE
13.6
Performance measurements for all markets for the SDB/true range combination.
After filter (modified system with exits and filter)
Market
P. factor
Avg. trade
2 St. dev.
Drawdown
Crude oil
4.22
808.63
4,276.38
-2,192.25
T-bonds
1.34
517.60
11,124.55
-19,518.81
T-bills
2.54
865.65
6,978.05
-5,794.19
Rough rice
3.57
1,266.12
9,152.78
-3,587.94
Nikkei index
1.21
770.16
22,715.90
-9,832.09
8,817.78
21,619.06
0.00
3,353.59
-9,101.18
Natural gas
Live cattle
1.28
160.80
Lumber
1.50
376.28
5,895.38
Coffee
1.73
274.34
4,278.94
-4,591.37
-4,998.12
Japanese yen
1.64
966.81
12,290.12
-13,073.75
Copper
2.29
765.87
7,659.45
-5,704.59
Gold
1.92
693.90
5,423.84
-5,592.07
Dollar index
2.89
1,418.88
7,538.99
D mark (Euro)
2.93
1,693.64
9,198.07
-4,611.68
-11,567.57
Cotton
4.03
948.52
4,829.12
-2,639.46
Wheat
1.42
202.91
3,382.67
-6,670.94
250
PART 4
TABLE
High-probability Filters
13.7
P. factor
Crude oil
22.73%
8.25%
3.77%
17.41%
18.00%
Rough rice
Nikkei index
T-bonds
T-bills
Drawdown
Better
2.23%
21.56%
1.82%
-1.85%
27.93%
8.17%
2.98%
182.47%
906.66%
200.80%
-30.69%
-70.47%
-87.41%
-5.39%
100.47%
466.14%
235.64%
-100.00%
3
2
Natural gas
Live cattle
Avg. trade
2 St. dev.
17.43%
232.39%
11.10%
5.69%
Lumber
5.31%
40.72%
23.63%
-17.61%
Coffee
38.21%
212.89%
74.05%
20.22%
Japanese yen
-31.83%
-43.52%
-4.60%
23.62%
Copper
99.84%
697.70%
89.14%
-17.55%
Gold
50.94%
179.49%
0.87%
-34.66%
Dollar index
18.80%
-2.01%
-5.99%
5.83%
D mark (Euro)
-1.15%
-7.41%
-2.89%
-4.20%
Cotton
48.15%
41.47%
6.60%
-32.16%
Wheat
-23.62%
-33.99%'
8.45%
39.44%
Better
12
11
comparable to Tables 10.19 and 10.20. A n o t h e r positive factor is that the number
of tradable markets, as measured by the value of the average trade, also has
increased from 12 to 14.
Less optimistic is the fact that the risk, as measured by the standard deviation, has increased for a total of 12 markets. But as long as the risk does not
increase at a faster rate than the value of the average trade, the risk-adjusted return
still increases, in 11 out of 12 instances. T h e only market that really does not like
this filter strategy is the wheat market, w h i c h does not m a n a g e to improve by one
single measure.
Given the good performance of the S D B system together with the true range
filter a n d the popularity of the A D X filter a m o n g the elite system builders, one
would think that the S D B s y s t e m / A D X filter combination is b o u n d to be a success. W r o n g ! As Tables 13.8 a n d 13.9 show, the A D X filter did not work this time
either, improving the profit factor for only seven and the value of the average trade
for only eight, out of 16 markets. C o m p a r e d to Tables 10.19 and 10.20, this system/filter combination also m a d e a total of four markets untradable, as measured
by the profit factor, by lowering it to 1.0 or lower.
A m o n g the markets that really were hit by this combination are rough rice
and Nikkei index. For the Nikkei index, for instance, the profit factor decreased
CHAPTER 13
TABLE
251
13.8
P. factor
Avg. trade
2 St. dev.
Drawdown
Crude oil
2.91
685.61
4,302.23
-1,738.02
T-bonds
2.36
1,633.85
13,332.82
-8,787.06
T-bills
2.09
692.96
7,150.36
-7,690.38
Rough rice
0.90
-64.51
3,130.25
-6,798.88
Nikkei index
0.11
-3,477.53
6,978.33
-13,336.11
Natural gas
25.96
6,892.23
20,012.22
-1,104.33
Live cattle
1.00
0.27
3,378.56
-8,096.56
Lumber
1.27
191.77
5,353.82
-6,417.54
Coffee
0.90
-34.70
2,004.95
-4,677.28
Japanese yen
2.47
2,000.98
13,937.97
-13,918.76
Copper
2.59
920.57
8,005.03
-5,594.21
Gold
1.52
416.74
5,333.78
-7,406.50
Dollar index
2.47
1,427.69
7,923.35
-4,357.46
D mark (Euro)
2.51
1,502.94
8,893.76
-8,294.33
Cotton
3.38
877.76
5,145.42
-3,821.89
Wheat
1.84
332.38
3,119.55
-5,114.78
TABLE
13.9
P. factor
Avg. trade
2 St. dev.
Drawdown
Better
-15.41%
-8.22%
2.85%
-3.62%
83.31%
270.60%
22.03%
-55.81%
-2.59%
2.41%
10.84%
36.69%
Rough rice
-28.76%
-151.29%
2.88%
31.34%
Nikkei index
-97.38%
-156.83%
-70.94%
171.92%
Natural gas
271.87%
342.51%
210.70%
6.04%
-8.07%
-99.44%
11.93%
-5.97%
Lumber
-10.39%
-28.29%
12.27%
15.15%
Coffee
-27.89%
-139.58%
-18.45%
12.50%
0
1
2.70%
16.89%
8.19%
31.61%
125.63%
858.83%
97.67%
-19.15%
19.66%
67.85%
-0.80%
-13.46%
1.38%
-1.40%
-1.20%
0.00%
-15.17%
-17.84%
-6.11%
-31.31%
24.14%
30.91%
13.59%
-1.77%
Wheat
-0.83%
8.13%
0.02%
6.91%
Better
Live cattle
Japanese yen
Copper
Gold
Dollar index
D mark (Euro)
Cotton
252
PART 4
High-probability Filters
from 4.09 without the filter, to 0.11 with the filter. W i t h too few markets benefiting in the form of lower standard deviation of the o u t c o m e of the returns and the
m a x i m u m drawdown, it does not matter that other markets, like natural gas, really excel. T h e conclusion m u s t be that the A D X filter does not do its j o b together
with this system and, therefore, must be put aside in favor of the true range filter.
TABLE
13.10
Avg. trade
2 St. dev.
Drawdown
-13.45%
-23.14%
-7.08%
36.24%
-3.29%
2.66%
-6.85%
4.38%
Orange juice
-10.60%
-19.86%
-8.11%
10.49%
Live cattle
-10.81%
-58.90%
-7.21%
17.61%
Lumber
-23.44%
-35.52%
-6.53%
24.08%
Coffee
-10.44%
-16.48%
-2.38%
-9.31%
Corn
S&P 500
Japanese yen
P. factor
Better
-3.00%
-8.86%
-4.06%
6.74%
Copper
-27.55%
-48.55%
-1.50%
2.39%
Gold
-28.93%
-81.58%
-4.25%
59.60%
14.57%
22.10%
0.47%
-9.70%
Dollar index
9.29%
18.43%
3.66%
-8.42%
Cotton
4.16%
2.51%
-1.36%
-23.55%
Eurodollar
CRB index
-35.98%
154.00%
-17.92%
26.24%
Crude oil
-21.23%
-19.88%
-6.81%
-10.99%
Canada dollar
-6.42%
-25.23%
-1.04%
9.01%
T-bonds
Better
-5.02%
-19.99%
0.40%
12.35%
13
CHAPTER 13
253
TABLE
13.11
P. factor
Avg. trade
2 St. dev.
Drawdown
Better
Corn
-38.94%
-37.13%
4.30%
155.44%
S&P 500
-10.60%
46.20%
4.39%
-15.70%
Orange juice
-20.65%
-19.25%
16.06%
86.99%
Live cattle
-11.90%
-62.62%
-11.03%
28.56%
Lumber
^13.84%
-67.32%
-2.69%
17.19%
Coffee
-12.38%
-14.32%
3.05%
8.34%
Japanese yen
-18.72%
-30.38%
-15.31%
67.02%
Copper
-18.09%
-18.57%
21.57%.
-11.58%
Gold
-8.18%
-12.10%
13.98%
-23.63%
Eurodollar
-2.30%
19.91%
12.07%
-18.51%
-36.89%
-65.45%
-13.76%
28.87%
34.31%
60.46%
7.93%
^5.17%
CRB index
-58.62%
295.44%
-25.85%
-9.55%
Crude oil
-25.59%
-22.13%
-1.74%
47.38%
Canada dollar
-17.99%
-60.76%
12.89%
48.30%
6.22%
42.15%
8.42%
12.07%
Dollar index
Cotton
T-bonds
Better
is not robust and reliable enough for me to allow it to m a k e its way into any of my
systems. In fact, as soon as I see a system developer speaking at a seminar about
filtering w i t h the A D X indicator, I start to wonder if this g u y really knows what he
is doing.
B e c a u s e I h a d a pretty good idea beforehand about the results of the longt e r m filters, I debated even bringing up the topic. W h a t finally m a d e me decide to
do it was my belief that there is no such thing as a "failed" experiment, and that
even when the hypothesis leading up to the test cannot be proved, the results are
still worth m e n t i o n i n g so that others w o n ' t spend their time on unnecessary work.
CHAPTER
14
This chapter was cowritten with Max von Liechtenstein, graduate student majoring in economics at Uppsala University, Sweden, and influenced by the ideas of
Richard Werner, chief economist, Profit Research Center, Tokyo, Japan; Edgar
Peters, chief investment strategist, Panagora Asset Management, Boston; Dr. Henry
Pruden, Professor, Golden Gate University, San Francisco; and Dr. Bruno Latour,
Professor, Ecole Nationale Superieure des Mines, Paris, France and Dr. Knut
Wicksell (d. 1926), Professor, Lund University, Sweden.
Popular histories from LaSalle and Wall Street tell the story of tycoons and
market operators like N a t h a n Rotschild, Jesse Livermore, and George Soros. But
underneath these colorful stories there also runs a m o r e serious history of the development of the financial system as the heart of capitalist society. T h e s e stories also
provide insights into why technical analysis and rule-based trading in general are
profitable if understood and treated correctly.
O n e lesson we learn from the tycoons and market operators is that failure in
the financial markets is based on lack of discipline and knowledge, and that trading is a business and a craft carried out in a work process rather than as a set of individual and isolated decisions. For those w h o do not want to understand the markets,
calling t h e m " r a n d o m " is an easy way out, but without knowledge, the individual's
chances of meaningful profits are greatly reduced. Granted, there always will be a
few uninformed traders w h o will m a k e incredible profits. However, these results
are usually not based on knowledge, but on luck. That is, trading limited to the act
of isolated decisions is plain gambling with or without a favorable outcome, while
truly skillful trading is a work process, which interweaves tasks like analysis and
m o n e y and portfolio m a n a g e m e n t .
255
256
PART 4
High-probability Filters
CHAPTER 14
257
258
PART 4
High-probability Filters
However, social factors only explain half the story and m u s t be complem e n t e d by m o r e material factors, forming a global structure that explains the creation and flow of the necessary funds for materializing these " w a n t s " and "needs."
Together, the social factors (the wants) and the global structure (the funds, or flow
of funds) create the necessary d e m a n d to create different markets for all types of
g o o d s and services, other factors of production, and financial assets. But that is
not all. Together they also form a complex process of at least partially predictable
trends in several different markets intervening with each other. This stresses the
need to look at any type of trading as a rational work process rather than a quest
for a set of optimal decisions at different fixed points in time. This way of looking
at trading also emphasizes the need for m o n e y m a n a g e m e n t and portfolio management, which, outside of the world of rational investors, b e c o m e s something
completely different from just buying a n d holding the m o s t efficient portfolio in
accordance with C A P M a n d E M H .
T h e rule-based approach to trading is essentially a reflection of the idea that
prices move in at least partially predictable trends and by following the s a m e strategy, or work process, you end up being right m o r e often than not and/or make
m o r e m o n e y than you lose. T h e following e x a m p l e illustrates what we mean by a
trend b e i n g partially predictable.
In his book, Patterns in the Dark (Wiley, 1999), E d g a r Peters describes a
j u d g e w h o goes m a d . T h e j u d g e ' s madness stems from a simple observation: every
day, b a d people cause b a d things to happen. Could so m a n y tragedies simply be a
string of r a n d o m events? N o , according to the j u d g e , they m u s t be the result of a
conspiracy. This story captures our ability and desire to i m p o s e a stable order and
on specific explanations for what is happening around us in our everyday life, even
w h e n there are n o n e . T h e observation that bad people cause bad things to happen,
however, implies that there exists a stable and certain structure. What the judge
missed is that most victims are still singled out by m o r e or less purely random
events. T h u s , good people b e c o m e victims due to local randomness in joint action
with a global structure.
In nature, there are m a n y complex processes (for example the weather) that
consist of several elements acting as an entity, forming local randomness in joint
action with global structure. This is also true in technological and financial (technofinancial) systems. On the one hand, individuals act together, forming a global structure based on similar material prerequisites and conditions. But because of different
social factors, such as individual preferences and willingness to change, they also
create local randomness. The complexity of it all causes the evolving entity to look
like a conspiracy, although no mastermind is behind it.
In his book, Aramis or the Love of Technology (Harvard University Press,
1996) B r u n o Latour points out that if we want to understand material changes like
price and v o l u m e changes in traded assests, we need to define a n d integrate social
and material factors in the s a m e model. In other words, in the economy, the joint
CHAPTER 14
259
260
PART 4
High-probability Filters
By m e a n s of credit, m a c h i n e s are created, managed, and fed with raw materials. By m e a n s of credit, products are c o n s u m e d h o u s e and cars are bought, and
m o n e y is spent abroad by foreign customers. T h a n k s to the credit creation process,
single individuals a n d the economy as a whole can obtain the necessary funds
needed to materialize all our "wants." All our "wants," as explained by behavioral
finance, will not cause the market to trend by itself. Instead, the ability of a market to trend is dependent on how m u c h a n d what type of credit it can attract. That
is, short- and long-term trends are separated by whether the purchasing power is
created inside the market, as investors speculate on margin, or c o m e from outside
flows.
T h e importance of credit in understanding markets can be illustrated by comparing our capitalist society with the barter economy of ancient Egypt. T h e econ o m i c world of Pharaoh w a s very simple. He j u s t needed to use his whip and
power to c o m m a n d labor and material to build pyramids. T h e pyramid of Cheops
c o n s u m e d 600,000,000 days of h u m a n labor and all that was created after a period of 20 years was a frozen asset.
In our economy, there is no solitary pharaoh with the power to c o m m a n d labor
and material by word alone. In our economy, labor and material is c o m m a n d e d by
money. In a barter economy, m o n e y is viewed as a tangible, " i m m o r t a l " asset, the
quantity of which will only change as m o r e gold or other precious material can be
d u g up from the ground. In a m o d e r n , capitalist society, however, the life cycle of
m o n e y and credit is such that it is born when a b a n k issues a loan and is put to death
as the person w h o borrows it pays it back. There is neither value nor power in
m o n e y itself, only in what it r e p r e s e n t s c o m m a n d of labor and material.
In place of Egypt's single pharaoh, we have several pharaohs seeking comm a n d of labor and material by m e a n s of credit. At first, it does not really matter
h o w this money, or credit, is used, because it creates d e m a n d a n d transactions in
the economy. T h u s , at first, credit, or money, is a fabulous agent both for borrowers and others in the society. However, if credit c o m m a n d s labor and material into
something unproductivefor e x a m p l e , to build a p y r a m i d t h e n this capital loss
is really lost labor. Further, credit that cannot be repaid hurts society, because it
discourages b a n k s ' creation of n e w creditthe c o m m a n d of labor and material for
u p c o m i n g periods.
T h e price borrowers have to pay to c o m m a n d labor and material is annual
interest. To increase the likelihood for the debt to be amortized (or put to death),
banks often require collateral for their lending. T h e s e restrictions have a functional significance because they force borrowers to m a k e sure that their c o m m a n d of
labor and material will be productive e n o u g h to generate income that pays for
interest, repayment, and s o m e profit. T h u s , credit constraints restrain pyramid
building. Nevertheless, our m o d e r n world is filled with thousands of "pyramids,"
and the invisible ones are the m o s t dangerous, because they can survive only by
new loans.
CHAPTER 14
261
262
PART 4
High-probability Filters
CHAPTER 14
263
264
PART 4
F I G U R E
High-probability Filters
14.1
CHAPTER 14
265
al different ideas, preferences, and n o r m s interweave, a larger trend naturally consists of several smaller ones, m a k i n g life difficult for any trader. T h e theoretical
explanation behind these shorter-term trend and m o m e n t u m changes is illustrated
by Figures 14.2 and 14.3. In Figure 14.3, we can see h o w this long-term trend really consists of two distinctly different states of market behavior. In this case they
also are separated by a transition phase, forming the well-known halfway flag of
technical analysts.
To c o m e to grips with this, m a n y technical analysts try to isolate different
trends from each other using, for instance, different moving averages applied
directly to the price, again on the assumption that the longer the average, the m o r e
stable and long-term the trend. In this case, however, we do not concern ourselves
with whether the trend is driven mainly by material or social factors, although
there also is the underlying assumption that the material factors are m o r e long
t e r m than the social factors.
To isolate both the long-term and short-term shifts in the trend caused by, for
instance, sentiment shifts a n d the a m o u n t of trading taking place on margin, m a n y
analysts also use one or several oscillator-type indicators that could be applied
either directly to the price or to any other indicator that attempts to capture
the material or social factors m o r e explicitly. In this case, the longer the lookback
FIGURE
14.2
266
PART 4
F I G U R E
High-probability Filters
14.3
period for the oscillator, the m o r e significant and reliable the shift is assumed to
be, because it then is a s s u m e d to be the result of m o r e material factors, such as the
creation and flow of funds and/or sentiment shifts a m o n g the larger players, such
as the pension funds a n d insurance c o m p a n i e s .
M o r e formally and in accordance with our reasoning so far, it could be argued
that these stages of unpredictability coincide with periods of major shifts in the
long-term, stable trends and a high amount of margin trading (short-term credit
creation and flow of funds) a m o n g the weaker hands, as these players scramble to
figure out w h e r e the larger players are heading. That is, the shorter the credits, the
higher the degree of uncertainty regarding the material factors and the m o r e unpredictable the markets, because these shorter credits inseminate a larger degree of fear
and panic into the mixture of social factors affecting the traders.
PART
FOUR
This section started out by taking a closer look at how to filter out those situations
w h e n the m a r k e t s seem to greet us with a particularly friendly environment, suitable for the entry/exit triggers we currently are working with. W h a t it all c o m e s
down to is to increase your chances to place a winning bet, both in the short and the
long run. Whatever your preferred time perspective it never hurts to get an understanding of w h i c h underlying forces are at play to create a n d maintain the moves
we are interested in and are trying to capitalize from.
We n e e d to understand that the predictability and profitability is there if we
could only find a way to m e a s u r e it a n d transform it into dollars m a d e . T h e n you
" o n l y " will n e e d to be able to k n o w at w h a t scale you are looking so that you k n o w
h o w to distinguish one seemingly r a n d o m m o v e from another. Granted, the technical analysis and statistical tools we are using are very coarse a n d clumsy, and for
the p u r p o s e very unsophisticated. B u t however clumsy the tools, this is as good as
it gets, a n d at least with a proper understanding for how a trend gets started, the
right framework for analyzing it a n d a set of generalized rules, as those in a
m e c h a n i c a l trading system, we can b e c o m e good e n o u g h in recognizing the general differences between an uptrend and a downtrend, and if the market seems to be
in a state of predictable change or not.
For the long-term perspective, you can look at it this way: Pretend that the
e c o n o m y (or the part of the e c o n o m y that you are interested in) is a super tanker
h e a d i n g in a certain direction on the ocean. But instead of being full of oil, it is full
of people, single individuals, a m o n g w h o m you are one, w h o in one way or another have an interest in what is going on, j u s t as you d o . It could be other traders, b r o kers, analysts, farmers, regular workers, and all these people's families, relatives,
a n d friends.
267
268
PART 4
High-probability Filters
Pretend further that the person in charge of this ship, for instance Alan
Greenspan, has decided that the ship is heading in the w r o n g direction, or that he
can see trouble ahead, and decides to change course. Even if he puts the engines
into full reverse, the sheer mass and m o m e n t u m of the ship force it to continue in
the original direction for many miles to c o m e . Not even if everybody on the ship
agrees with his decision and wishes to turn around right away will the ship be able
to turn around any sooner. Wishful thinking has nothing to do with where the markets are heading or the o u t c o m e of your trading.
Now, pretend that you, as a trader, instead are standing on the shore, looking
at this ship on the horizon, holding exactly the s a m e information as everybody on
board. W h a t would you bet on: that it will continue in the same direction for
another couple of miles, or minutes, or days, or that the next thing you know, it
will have turned around? Of course, you are better off betting it will continue in
the s a m e direction. You do not mm a super tanker on a dime; not even if you close
your eyes hard and wish. A n d the s a m e goes for the economy, or even any specific smaller part of it, like an individual stock.
To be sure, in the short run strange things happen every now and then
exceptions to the rule bring short-lived fame and fortune to a lucky few. But they
are just thatexceptions to the rule. Generally speaking, you are m u c h better off
going with the current flow of events. On the financial markets, this m e a n s placing your trades in the s a m e direction as the trend is heading. Place a long-term bet
that tries to catch the beginning of the move, but be prepared to get out as soon as
it is clear it is not heading w h e r e you expected or w h e r e the situation is less clear,
as indicated by high short-term volatility levels.
Or to continue the analogy, w h e n you can see bad weather approaching or
w h e n mist or fog m a k e s it difficult to assess the situation, that is when your filters
should signal to stay out. To do that, you m u s t k n o w what to look for, how to measure it and h o w to m a k e the most of it, w h i c h s u m s up the p u r p o s e of this book and
all the hard work w e ' v e d o n e leading up to and including the "optisizing" process
in Part 5.
PART
FIVE
Now that we have finished building the engines, let us move over to the intricate
subject of putting together a gearbox and a chassis to get our babies going. But first
I need to point out that there is no way I would have been able to c o m e up with the
math a n d the logical reasoning behind this section myself. For this I rely solely on
Ralph Vince, w h o also coined m o s t of the terminology I use in this section, in his
b o o k s Portfolio Management Formulas (John Wiley & Sons, 1990) and The
Mathematics of Money Management (John Wiley & Sons, 1992). I have merely
taken what is in these b o o k s and tweaked it around a little bit to suit my needs. If
you are interested in learning m o r e about what is covered in the following section,
d o n ' t ask m e g o buy Mr. Vince's b o o k s .
W h e n it c o m e s to the gearbox (the m o n e y m a n a g e m e n t ) , it is quite simple
really. Because in a well-working system you really have no idea about whether
your next trade will be a winner or a loser, you will be best off, in the long run,
always and for each trade, to risk the same fraction of your account. That is, if your
account size going into a particular trade is $100,000 and you have decided that if
the trade goes w r o n g , you can stand to lose 2% of that amount, you will be willing
to lose $2,000. But if your account size is only $50,000, a 2% loss equals only
$1,000, w h e r e a s a $2,000 loss equals a fraction of 4 % .
269
CHAPTER
15
Money Management
The w h o l e idea of m o n e y m a n a g e m e n t is to always invest that fraction, or percentage, of your account going into each trade, m o s t suitable to you, considering such
factors as account size, expected worst-case trades, drawdowns, flat times, growth
rates, a n d dependency a m o n g trades. To be able to do thisto " o p t i s i z e " your tradi n g y o u m u s t start to think in fractions a n d percentages, rather than in flat dollar
rates. Otherwise, y o u will not be able to practice the very s a m e techniques that
already are in practice w i t h professional m o n e y m a n a g e r s .
A n o t h e r important point is that although these techniques add m o r e to your
b o t t o m line than your actual systems, or entry and exit triggers, they do not p e r f o r m
miracles. For these techniques to work, your s y s t e m s m u s t have positive m a t h e matical expectations in the first place. T h a t is, they must have a profit factor above
1 and a positive value for the average trade to be worthwhile. If they just have that,
if they are only marginally positive, w i t h the p r o p e r m o n e y m a n a g e m e n t you can
w o r k wonders.
On a separate note, however, it is w o r t h m e n t i o n i n g that this only h o l d s true
for the special case of one m a r k e t - o n e system. As soon as you trade a portfolio of
m a r k e t s and/or systems, it is fully possible to have individual market/system c o m binations that have a negative mathematical expectancy (a profit factor below 1 a n d
a negative value for the average trade), w h i c h m a y raise the positive expectancy for
the trading strategy as a w h o l e . T h e trick is to put together a portfolio of systems
and/or m a r k e t s with correlations as low as possible to each other, w h e r e a few m a r kets still zig w h e n others zag, b u t with the zigging greater than the zagging, generating a small but steady profit in the long r u n . T h e negative expectancy
markets/systems help to hold up the b o t t o m line while you wait for the positive
271
PART 5
272
Potential gain is not a straight-line function of potential risk; it is not true that
the m o r e you risk, the m o r e you are likely to gain.
Of these four things, we immediately must address the fact, that for money
m a n a g e m e n t purposes, w h e n price does not behave in a rational m a n n e r it means
that if it goes from, for instance 1,350 to 1,000, it does not have to stop at every
tick in between. If you are caught on the w r o n g side of such a m o v e you will suffer a severe, if not totally devastating, loss, because there will be no way out even
if you had a stop loss at 1,345. F u r t h e r m o r e , because these moves happen, the only
thing that is certain in trading is that we all will be blown out of the markets sooner or later. It is just a matter of time. Or to use a simple analogy: if you can only
die by from being hit by a truck, eventually you will die from being hit by a truck.
It is as simple as that.
In the world of trading, however, w h a t might be devastating for some may
only be a freak occurrence but still a fully expected outcome for others. From this
it follows that to fit as m a n y outcomes as possible into the boundaries of what
could be considered expected, you m u s t have considered and treated the whole
subject of trading very defensively. Or, to use the old start-a-new-business cliche,
m o n e y m a n a g e m e n t ( m a k i n g a business plan) is to h o p e for the best but prepare
for the worst. Still, for some the catastrophe might c o m e first thing tomorrow, no
matter h o w m u c h they have tried to protect themselves. If it h a p p e n s to you, I ' m
sorry, but that's j u s t the n a m e of the g a m e .
Now, let us consider the next point in the list above. "Potential gain is not a
straight-line function of potential risk." If it is not, then what is it? To answer that
question we first m u s t define a few t e r m s .
We need to understand the t e r m holding period return ( H P R ) . T h e H P R is the
percentage gained or lost for each specific trade, plus one. For e x a m p l e , if a trade
ends up with a 5% profit, the H P R is 1.05 (1 + 5% = 1 + 0.05 = 1.05). On the
other hand, if a trade ends up with a 5% loss, the H P R is 0.95 (1 + ( - 5 % ) = 1 +
( - 0 . 0 5 ) = 0.95).
T h e second t e r m we must understand is terminal wealth relative ( T W R ) . The
T W R is the geometrically c o m p o u n d e d H P R for all trades, which m e a n s that we
are using multiplication rather than addition. For example, if you have two winning
trades, with H P R s of 1.05 and 1.10, respectively, the T W R is 1.155 (1.05 X 1.10 =
1.155). A T W R of 1.155 means that after the two trades, you have 1.155 times your
original equity, or your total profit is 1 5 . 5 % (1.155 - 1 = 0.155 = 15.5%).
CHAPTER 15
Money Management
273
274
PART 5
CHAPTER 15
Money Management
275
work in the future. Therefore, my recommendation is not to bother with the dependency or serial correlation at all. W h e t h e r it's there or not, build your system with as
few rules as possible that m a k e sense to you, then trade it with a fixed fractional
m o n e y m a n a g e m e n t strategy. T h e price of not doing so is simply too high.
Now, suppose that the trade in the previous example ended up in a profitable
m o v e of 5 % , equal to a profit of $5,000 p e r contract, or a total profit of $25,000
or 2 5 % . T h e following formula tells us that the H P R is 1.25:
HPR = 1 + f x ( - P F I T / WCS)
w h e r e = the value we are using for f = 0.5; P F I T = the profit or loss, per contract, on the trade, with the sign reversed = $5,000; a n d W C S = the worst-case
scenario (always a negative n u m b e r ) = $10,000.
Notice that the only difference between this and the previous formula for the
H P R is that we now multiply the percentage m a d e on the trade with the factor
and the worst-case a m o u n t is the a m o u n t risked. In the previous e x a m p l e we really didn't state how m u c h we risked or lost in dollar terms, but just stated the percentage value as a result of the formula - P F I T X 100 / W C S . To do this in Excel,
type in t h e following formulas and values into an empty spreadsheet:
In cell B 3 : 100,000
I n cell C 3 : - 1 0 , 0 0 0
In cell D 3 : 0 . 5
In cell B 5 : 5,000
Type in the following n u m b e r sequence (one below the other) into cells B6
t o B 1 4 : 2,000, 7,000, - 4 , 0 0 0 , - 2 , 0 0 0 , 6,000, 2,000, - 1 0 , 0 0 0 , - 7 , 0 0 0 and
-3,000.
In cell C 5 : = 1 + D $ 3 * ( - B 5 / C $ 3 ) (then drag down to fill all the cells C5 to
C14)
I n cell D 5 : = C 5
In cell D 6 : = D 5 * C 6 (then drag d o w n to fill all the cells D6 to D14)
I n cell E 3 : = C O U N T I F ( B 5 : B 1 4 , " < > 0 " )
In cell E 5 : = D 5 * B $ 3 (then drag d o w n to fill all the cells E5 to E l 4 )
A
I n cell F 3 : = D 1 4 ( 1 / E 3 )
I n cell F 5 : = B 3 / ( C $ 3 / - D $ 3 )
In cell F 6 : = E 5 / ( C $ 3 / - D $ 3 ) (then drag down to fill all the cells F6 to F14)
W h e n you are done, your spreadsheet will resemble that in Figure 15.1.
To the e x a m p l e above, I also have added another very useful variable, the
geometric mean, w h i c h is akin to the average H P R or growth factor per play. To
arrive at any final T W R , you could either multiply all the H P R s , or you could take
the geometric m e a n raised by the n u m b e r of trades (more about this shortly).
276
PART 5
FIGURE
15.1
How to use Excel to calculate your holding period returns and terminal wealth relative.
You can manually change the value in cell D3 between 0 and 1 to try to find
the highest value for T W R in cell D 1 4 . For instance, if you change the value in cell
D3 to 0 . 1 , the value in cell D 1 4 changes to 1.0889 (if y o u ' r e displaying four decimals). T h e value in cell D3 that c o r r e s p o n d to the highest value in cell D 1 4 is the
optimal f for the system. A n o t h e r a n d quicker way is to use the Solver Add-in
function in Excel, u n d e r the Tools m e n u (Figure 15.2).
FIGURE
15.2
CHAPTER 15
Money Management
277
N o t e also that in this particular case we a s s u m e d the worst case to be constant and equal to the worst case in our sequence of trades. There are several other
ways to do this, including calculating the standard deviation of all o u t c o m e s and
setting the worst trade to equal a certain distance from the average trade, or letting
the stops of your system (as they pertain to each individual trade) determine an
individual worst-case scenario for each trade. This is how I prefer to do it. Figure
15.2 also hints at the fact that you could perform m o r e complex optimizations by
adding a few other constraints, such as not letting the m a x i m u m d r a w d o w n or the
standard deviations of the individual outcomes grow past specific values.
In this case, the optimal equals approximately 0 . 3 1 , with a final T W R of
approximately 1.18. This m e a n s that for any particular trade, you should not risk
m o r e than 3 1 % of your total equity going into the trade. This is the optimal for
this system w h e n we work under no other constraints than trying to m a x i m i z e the
growth rate, not taking into consideration any costs or the fact that we cannot trade
fractions of contracts. A n d j u s t as we do not take slippage and c o m m i s s i o n into
consideration when we are looking for the optimal variable setting for a system (so
we do not c o m e up with a suboptimal solution), this is also how you should look
for your system's o p t i m a l R e m e m b e r that we first and foremost want the system
to be well w o r k i n g rather than profitablewe want it to catch a certain type of
market m o v e as efficiently as possible. As long as we do that, eventually we also
will be able to apply it to a market w h e r e it will be profitable as well. Besides,
when it c o m e s to trading with a fixed fractional m o n e y m a n a g e m e n t , seldom will
you be able to trade your system at its optimal level anyway, as will b e c o m e evident shortly.
Consider the following expectancies for a system you are thinking about
trading real-time:
This is a fantasy system similar to that depicted by the performance s u m m a ry in Table 12.12. With a system like this, what could go w r o n g ? T h e losers are
considerably smaller than the winners a n d with plenty m o r e w i n n e r s than losers,
at first glance it looks like you should bet almost your entire equity each time, just
saving a little in case you happen to get into a drawdown, which you should m a k e
up for easily considering the high percentage winning trades.
Because the data that is exported into Excel has all outcomes measured in percentages rather than dollars, as is the case in the example above, the calculations look
a little different. In this case, I have used the trade-by-trade export function from Part
1, which you can use for single market/system combinations. (We will learn how to
build a bar-by-bar export function for multiple market /system combinations and bar-
PART 5
278
by-bar portfolio analysis later.) In this case, you must insert a few empty rows at the
top of the spreadsheet and a few empty columns directly to the right of the "Profit"
column, as shown in Figure 15.3. If your spreadsheet looks like that in Figure 15.3
(remember, this is a fantasy system that you can substitute for any system of your
choice), you can then type in the following formulas or values:
I n cell F 3 :
=MIN(F5:F219)/100,
w h e r e F219 denotes the last data row.
In cell G 5 :
= 1 +G$3*(-(F5/100)/F$3) (then drag down to fill all the cells G5 to G219)
In cell H 3 :
A
FIGURE
15.3
CHAPTER 15
Money Management
FIGURE
279
15.4
The TWR of a fantasy system in relation to the fraction of your capital risked per trade.
As y o u can see, trading at an level higher than the optimal does not m a k e
your account grow any faster. Instead you are a s s u m i n g m o r e risk than necessary
to a c c o m p l i s h the same growth rate as you could have d o n e trading at a lower
and you are also taking on a higher likelihood for going b r o k e the m o r e trades you
place. (See point t w o in the list at the beginning of this section.) B u t there is m o r e
to it than that. If you cut your risk (your f) in half, you will cut the expected profits by m u c h m o r e than that. In fact, if y o u change your arithmetically, profits
change geometrically.
T h e paradox is that the better the system a n d the higher the optimal the
larger the drawdowns you suffer. This is because the optimal is the percentage
amount you are willing to lose on one trade, b a s e d on h o w large you expect the
largest loser to be. W h e n that loser hits you, you lose that percentage a m o u n t of
your equity, as suggested by the level that you are using. A n d this is for one trade
only. If the next couple of trades turn out to be losers as well, the drawdown is even
m o r e severe than that.
This relates to points three a n d four in the list at the beginning of this chapter, because this has nothing to do with h o w m a n y markets or what type of markets y o u trade (i.e. h o w well diversified you think you are, or h o w y o u think that
you can keep a lower risk by only trading stocks and/or not selling short). Your
PART 5
280
worst d r a w d o w n will still be at least as large as your largest loser multiplied by the
n u m b e r of contracts it takes to assume the total risk required by the level you are
trading at. Figure 15.5 shows what the development of the T W R would have
looked like for this system, traded at the optimal
As you can see, at about trade 50 we m a d e approximately 10 times our initial equity. B u t then a series of b a d trades, w h i c h includes the largest loser, hits us,
taking the equity below the initial level. F u r t h e r m o r e , if you were to trade at the
optimal level, h o w sure could you be that this would be the m o s t optimal level in
the future as well? Because you can't, you are better off staying to the left of optimal because trading on a lower level results in the s a m e equity growth as trading at a level higher than the optimal but with a lower risk. A n d as things might
turn out, even if you a i m to trade to the left of the theoretical optimal you calculated using historical data, in real-time trading, unknowingly, you might still end
up trading to the right of the true optimal because it m i g h t have shifted to the left
as well.
F r o m this perspective, optimal is a purely a c a d e m i c figure with little practical value. B u t to go from that conclusion to reject the entire t h e o r y behind fixed
fractional trading is to take matters a little lightly. Did you, for instance, k n o w that
we have been working with several of these m o n e y m a n a g e m e n t parameters
10000
F I G U R E
15.5
CHAPTER 15
281
Money Management
already throughout the entire b o o k ? If you have not thought about it, take a look
at the export function for the performance s u m m a r y for all systems based on the
R A D contract and any of the spreadsheets you might already have produced with
this function.
Into the individual profits c o l u m n , titled "Profit" by the export function, we
essentially have exported the unweighted H P R for each trade, except we have presented it as a percentage figure instead of a multiplier. By unweighted I m e a n that
we have not taken the largest loser and the level into consideration when calculating it, as we did, for instance, in cells C5 to C 1 4 in the e x a m p l e above. T h e s a m e
goes for the cumulative profit, in the " C u m . prof." column, which corresponds to
the T W R variable. To transform these percentage n u m b e r s (X) into multipliers (Y)
do the following:
Y = X /100 + 1
To transfer a multiplier to a percentage figure:
X = (Y - 1) * 100
Take a look at the performance s u m m a r y in Table 12.14. It shows a final
cumulative profit of 5 0 . 0 2 % , which equals a T W R of 1.5002 (50.02 / 100 + 1). To
calculate the geometric m e a n , raise it by 1 divided by the n u m b e r of trades for the
system and you will get 1.00442 (1.5002 (1 / 92)). This translates to approximately 0 . 4 4 % ((1.00442 - 1) * 100). This is the return per trade you could expect
to m a k e h a d you b e e n able to reinvest all previous profits.
We also can estimate the geometric m e a n by taking the average profit
(0.46%) and transforming it into a multiplier (1.0046). Let us call this multiplier
A P M and the estimated geometric m e a n E G M . Then raise that by 2, before we
deduct the standard deviation ( S D ) , also raised by 2. Finally, raise everything by 1
divided by 2. Hence, in this case we calculate E G M to be 1.00447 ( ( 1 . 0 0 4 6 2 0 . 0 1 6 3 2 ) ( l / 2 ) ) , or approximately 0 . 4 5 % . From here, we can continue to estimate the T W R by raising everything by the n u m b e r of trades (please bear with
m e ) . Let us call the estimated T W R ETWR and the n u m b e r of trades N. That is:
A
282
PART 5
SD. Of course, the larger the A P M in relation to the SD, the better, but what really matters is how sure you can be that this relationship will hold up in the future.
B e c a u s e as long as you can be sure of that, the only thing that will affect your bott o m line is h o w frequently you can trade. That is, m a k e N as large as possible. You
do that by m a k i n g sure that the system works well and/or trades profitably on as
m a n y markets as possible. A n d h o w do you do that?
O n c e again, this relates t o w h a t w e l e a r n e d a b o u t the system-building
p r o c e s s a n d the i m p o r t a n c e of k e e p i n g it as s i m p l e as p o s s i b l e , b a s e d on as few
r u l e s as possible. T h i s is the only way to c o m e close to a s y s t e m that not only
trades profitably on historical data, but c o n t i n u e s to do so in the future. By
a d d i n g rules to build away individual m a r k e t d i s c r e p a n c i e s , we c u r v e fit the
s y s t e m a n d m a k e it less likely to w o r k in the future. B u t by w o r k i n g with techn i q u e s s u c h a s r a n d o m entries a n d p e r c e n t a g e - b a s e d stops a n d exits, w e make
sure that the s y s t e m will w o r k well in any m a r k e t , in any t i m e frame, a n d almost
at a n y t i m e .
T h e fundamental equation of trading also relates to what we discussed earlier about drawdown. A l t h o u g h diversification does not necessarily reduce drawdown, a fixed fractional trading strategy will d a m p e n it by forcing you to cut back
on the n u m b e r of contracts traded, while a larger n u m b e r of markets traded will
help you to recover from drawdown at a faster rate, simply because of the additional n u m b e r of trades e a c h n e w market brings to the portfolio.
CHAPTER 15
Money Management
283
and every market the same as all the others, basically stating that a time series is
a time series is a time s e r i e s . . . . N o t e that the key words here are "equally as well,"
not "equally as profitably." If we only wanted to optimize historical profits, we
would have curve fitted a system to a specific market, calculated the optimal
level to 0.99 or higher, then traded it real-time and g o n e broke tomorrow.
R e m e m b e r that we are not solely interested in optimizing our equity, but to optisize our betting size in accordance with a n u m b e r of constraints, a m o n g w h i c h a
desired ending equity is one.
Another key phrase in the p a r a g r a p h above is "over a long period of time."
Of course we will end up with different optimal fs for different market/systems
combinations within a limited t i m e frame, say the last 20 years or so, which is
basically how far back we have tested the systems in this book. But that is just pure
coincidence. Over the next 20 years there might be other market/system combinations with higher fs than those that seem to be doing the best right now, while the
average for the entire portfolio of all market/system combinations will still be
approximately the same.
It also is possible to do the s a m e type of logical reasoning as we did w h e n we
decided not to m a k e the amount invested dependent on any serial correlations
a m o n g the trades. In this case the hypothesis, based on historical observations, will
be, "that each market has its own specific features and statistical traits, and, therefore, should be traded at its o w n / " If this turns out to be false, then we are making
a type II error by accepting a hypothesis that in fact should have been rejected. We
will trade the system too aggressively when we shouldn't and not aggressively
enough when wc should. In the long run, we will lose m o n e y and increase the likelihood of going bust. Had we, on the other hand rejected the hypothesis when we
shouldn't have (a type I error) by trading all the market/system combinations with
the s a m e as suggested by, for instance, the lowest or the for the portfolio as a
whole, we still would have m a d e money, only at a slower rate.
To keep it simple, I therefore suggest that for each portfolio of markets to
which you apply the s a m e system, you should treat each trade the s a m e way, no
matter in which market that particular trade h a p p e n s to be, and trade it at a fixed
fractional level that m a k e s the m o s t sense to you, in regards to expected equity
growth, drawdowns, flat times, and worst-case scenarios. Exactly the s a m e goes
for a situation where you have several systems applied to one market. Finally, if
you would like to combine all your portfolios into one, continue to do the same.
If your systems are thoroughly researched and you " k n o w " they will continue to
work, you still will m a k e tons m o r e m o n e y trading at a fixed fractional level as low
0.015, not risking m o r e than 1.5% of your total equity per trade, than you would
on a fixed contract basis, depending on how you choose to define the constraints
against which you are maximizing your utility.
For instance, using the fantasy system above, if we were to risk only 3 % , the new
T W R would equal 1.4478, which means a total equity growth of a mere 4 5 % . Not too
284
PART 5
good, because the original system without optimal managed to produce a total of
more than 2 1 6 % . But what if instead we change the expected worst-case scenario to
equal the stop loss for the system at 1.1%, by typing " 0 . 0 1 1 " into cell F 3 . For each
new trade I put on, this is as bad as I expect things to go. Now, I know that sometimes
things will go worse than that, but that is as bad as I expect them to go. The fact is that
I know if I do this long enough there will come along one trade that will blow me away
completely. So from that point of view, whether I choose to go with the largest loser
(as suggested by the historical data) or with what I expect to lose the most in any particular trade (as suggested by the stop loss in the system) makes little difference.
D o e s n ' t it m a k e sense then to go with what I expect to lose in this particular
trade, not w h a t I might have lost in the past? Besides, if you trade the same system on a portfolio of m a r k e t s you w o u l d n ' t be able to trade it at the optimal level
anyway, as the following e x a m p l e shows.
If you trade 10 markets and it h a p p e n s that they all signal entry the same day,
you w o n ' t be able to allocate m o r e than 1 0 % of your total capital, on average, to
each market, no matter what the o p t i m a l / m i g h t be for each individual market/syst e m combination. A n d by allocating the m a x i m u m 1 0 % per m a r k e t you will go
broke if all trades go against you. N o t to risk going b r o k e you m u s t allocate less
than that, say 2% p e r market, w h i c h will give you a total risk of 2 0 % . Granted,
rarely will you enter all markets at o n c e a n d rarely will they all go against you, but
on the other hand, trading only 10 m a r k e t s isn't m u c h either.
Anyway, with the worst-case scenario set to equal the stop loss, the new optim a l / f o r this overall strategy c o m e s out to 0.10, with the relationship between different s and the T W R resembling Figure 15.6. As you can see, n o w it becomes
even m o r e important that you do not overtrade, because already at an equal to
0.15, the likelihood for going b r o k e is 100%.
By risking only 3% instead of 1 0 % of total equity I believe I have given
myself all the slack I need. In that case, the n e w T W R equals 19.44, which equals
a total equity growth of 1,844%. That is about 3 5 % per year, continuously compounded, over the last 10 years. As a comparison, the best CTAs average around
2 0 % to 2 5 % per year, while the average return from the stock market over the last
15 to 20 years is no m o r e than 1 2 % or so. Figure 15.7 shows you what the equity
g r o w t h for this strategy would look like. Now, I will not be m a k i n g 3 3 2 , 4 0 0 % , as
suggested by the original optimal but this fantasy figure describes the power of
this method. In Figure 15.7, notice especially that the drawdown around trade 50
(although the scales are different) is no worse than any of the others.
We can do a statistical type I/type II error analysis to confirm the importance
of trading at an lower than the optimal This time the hypothesis is "the true
for the future will be higher or the same as the optimal of the past; therefore we
should not use an lower than that " If we accept this hypothesis and it turns out
to be false, then we again c o m m i t a type II error. We will trade at an that is too
high, m a k i n g it likely that we will go bust sooner rather than later. H a d we instead
CHAPTER 15
285
Money Management
FIGURE
15.6
The TWR of a fantasy system using an individual worst-case scenario for each trade.
rejected the hypothesis by trading at an sufficiently lower than the historical optim a l f, w h e n it turned out that we shouldn't have, well, then we w o u l d n ' t have m a d e
as m u c h m o n e y as we could have, but we also would have increased the likelihood
of still being in the g a m e .
Next, we m u s t decide the "optisized" amount of contracts or shares we
should feasibly trade. A n d we will look at actual dollar figures instead of theoretical percentage n u m b e r s .
SHORT-TERM SYSTEMS
For each market/system combination, we have put together a spreadsheet like that
shown in Figure 15.8, w h i c h contains a daily s u m m a r y for that particular market/system combination. For e x a m p l e , Figure 15.8 shows that on D e c e m b e r 24,
1985, the system signaled to go long with a m a x i m u m risk of $578 per contract.
T h e fixed fractional m o n e y m a n a g e m e n t strategy attached to this system told us
to put on 56 contracts. On the close of that day, this market/system combination
w a s d o w n $232.50, on a one-contract basis and -$13,020 for the overall portfolio.
T h e position was closed out on D e c e m b e r 30, with a $315 profit per contract, for
a total profit of $13,440.
PART 5
286
FIGURE
15.7
The growth equity for a fantasy system with an individual worst-case scenario for each trade.
In Figure 15.8, the data in the five c o l u m n s under the "1 Contract from T S "
h e a d e r are imported directly from Trade Station, while the data in the three
c o l u m n s u n d e r the "N contractscalculated" are calculated in Excel. All other
cells also are imported directly from TradeStation, but can be altered within Excel
as well. To perform the necessary calculations in columns F to H, type in the following formulas (disregard that some formulas hold references to other cells, outside of Figure 15.8):
In cell F 3 6 :
0
In cell F 3 7 :
=IF(AND(C37<>C36,C37<0),H$32*H$33*MAX(INT($AN36*
( $B$47100)/C37), 1 ),IF(E37=0,F36,0))
then drag d o w n to fill all the cells in that column.
To calculate the open profit of all contracts:
In cell G 3 6 :
=ROUND(D36*F36,0)
CHAPTER 15
Money Management
FIGURE
287
15.8
Using Excel to calculate an "optisized" number of contracts for a fixed fractional trading strategy.
Array: VS[20](0);
For SetArr = 0 To 4 Begin
VS[SetArr * 4 + 0] = (0[SetArr] Data2 - C[SetArr + 1] Data2) /
C[SetArr + 1] Data2;
VS[SetArr * 4 + 1] = (H[SetArr] Data2 - QSetArr + 1] Data2) /
C[SetArr + 1] Data2;
VS[SetArr * 4 + 2] = (L[SetArr] Data2 - C[SetArr + 1] Data2) /
C[SetArr + 1] Data2;
VS[SetArr * 4 + 3] = (C[SetArr] Data2 - C[SetArr + 1] Data2) /
C[SetArr + 1] Data2;
End;
For SumArr = 0 To 19 Begin
IfSumArr = OThen
SumVS = 0;
PART 5
288
CHAPTER 15
Money Management
289
290
PART 5
CHAPTER 15
291
Money Management
prepared both the export function and the spreadsheet for the possibility of experimenting with different systems and market weights. To give all market/system
combinations an equal weighting keep the setting at 1, if you don't want to turn off
that particular market/system combination completely, in which case you can set
either o n e of the weights to 0.
O n c e you have typed in the necessary information and formulae in c o l u m n s
F to H, following Figure 15.8, you can either continue to add m o r e markets in adjacent c o l u m n s before you finish with the portfolio s u m m a r y calculations or, if you
only are interested in this particular market, m o v e on directly to the portfolio s u m m a r y in c o l u m n s J to Q, as shown in Figure 15.9.
To build the portfolio s u m m a r y type in the following formulas:
In cell J36:
=A36
then drag d o w n to fill all the cells in that column.
In cell K 3 6 :
=SUM(G36)
then drag down to fill all the cells in that column.
In cell L 3 6 :
=SUM(H36)
then drag down to fill all the cells in that column.
In cell M 3 6 :
=B2
I n cell M 3 7 :
=M36+L37+(K37-K36)
then drag down to fill all the cells in that c o l u m n .
FIGURE
15.9
Using Excel to calculate the aggregate results from trading several markets In a portfolio.
292
PART 5
In cell N 3 6 :
=ROUND(K36* 100/M3 6,2)
then drag down to fill all the cells in that c o l u m n .
I n cell 0 3 6 :
=M36
I n cell 0 3 7 :
=MAX(M37,036)
then drag down to fill all the cells in that c o l u m n .
In cell P 3 6 :
=ROUND((M36-036)* 100/036,2)
then drag down to fill all the cells in that c o l u m n .
In cell Q 3 6 :
=IF(P36=0,0,Q35+1)
then drag down to fill all the cells in that c o l u m n .
Notice especially the use of the s u m function in c o l u m n s K and L. This is
because h a d you also added data from other markets, that data would have been
a d d e d to the overall portfolio results.
In several of the above Excel formulae there are references to a set of cells
in the B column, because this is w h e r e I stored the initial p a r a m e t e r settings, like
the initial account balance, the dollar value to be deducted for slippage and commission, and the percentage risked per trade. This can be seen in Figure 15.10. In
this case, we start out with $1,000,000 in initial equity, of which we will risk
3 . 2 5 % p e r trade. Before we add the closed-out profit to the overall equity of the
portfolio, we deduct $75 p e r contract for slippage a n d commission.
Now, with the data and all the formulas in place it is t i m e to build a performance s u m m a r y that resembles that in Figure 15.11. In this particular case it
shows the results from trading the M e a n d e r system on the S & P 500, over the period M a r c h 1996 to October 1999, with $75 deducted for slippage a n d commission
per contract traded. T h e fixed fraction of the total equity risked per trade was set
to 5% and the initial capital w a s $1,000,000.
As you can see, in this particular case we took the initial capital to an ending
capital of $ 3 , 2 0 3 , 9 7 1 , w h i c h equals a yearly percentage return of approximately
3 6 . 4 % . T h e " p r i c e " for doing this c a m e in the form of having to spend approximately 16 out of every 100 days in the market, a m a x i m u m drawdown of close to
2 8 % , and a longest flat t i m e of 317 days.
Before we go on, let us take a closer look at h o w each performance figure is
calculated and what you need to type into each cell.
CHAPTER 15
293
Money Management
FIGURE
15.10
In cell E 3 :
=ROUND(AN(X),0),
w h e r e column AN refers to the column for w h e r e the portfolio equity is calculated ( c o l u m n M, in Figure 15.9, above) and Xrefers to the last row of data.
In cell E 4 :
=ROUND((E3/B2 - 1 ) * 100,0)
In cell E 5 :
A
FIGURE
15.11
PART 5
294
In cell E 6 :
,,
,,
=ROUND(SUM(SUMIF(H36:H989,">0"),SUMIF(Q36:Q989, >0 ),
SUMIF(Z36:Z989,">0"),SUMIF(AI36:AI989,">0"))/ABS(SUM(SUMIF
(H36:H989; <=0 ),SUMIF(Q36:Q989, <=0"),SUMlF(Z36:Z989,"<=0 ),
SUMIF(AI36:AI989,"<=0"))),2),
,
,,
where columns H, Q, Z, and AI refers to the closed out profit for each market/ syst e m in the portfolio (in this case I p r e p a r e d the fixed fractional portfolio calculations for four markets/systems, but temporarily turned off the other three).
In cell E 9 :
=ROUND(MIN(AQ36: AQ989),2),
w h e r e c o l u m n AQ refers to the portfolio d r a w d o w n ( c o l u m n P, in Figure 15.9,
above).
I n cell E l 0 :
=ROUND(MIN(AM36:AM989),0),
w h e r e c o l u m n AM refers to the closed out equity for the portfolio (column L, in
Figure 15.9, above).
I n cell E l l :
M
,,
In cell H 3 :
,,
,,
=SUM(COUNTIF(H36:H989, <>0"),COTJNTIF(Q36:Q989,"<>0 ),
M
COUNTIF(Z36:Z989,"<>0"),COUNTIF(AI36:AI989, <>0"))
In cell H 4 :
=ROUND(SUM(SUM(H36:H989),SUM(Q36:Q989),SUM(Z36:Z989),
SUM(AI36:AI989))/H3,0)
In cell H 5 :
=ROUND(H3/B5/B7,l)
In cell H 6 :
=ROUND(H5/12,l)
In cell H 9 :
=MAX(AR36:AR989),
w h e r e c o l u m n AR refers to the flat time for the portfolio ( c o l u m n Q, in Figure
15.9, above).
CHAPTER 15
295
Money Management
In cell H 1 0 :
=COUNTIF(AL36:AL989,"<>0")*100/COUNT(AL36:AL989),
w h e r e column AL refers to the total open equity for all open trades in the portfolio (column K, in Figure 15.9, above).
In cell HI 1:
M
FIGURE
15.12
The equity curve from trading Meander on the S&P 500 with a 5% fixed fractional setting.
296
PART 5
FIGURE
15.13
The drawdown curve from trading Meander on the S&P 500 with a 5% fixed fractional setting.
CHAPTER 15
297
Money Management
FIGURE
15.14
Profits per trade for Meander traded on the S&P 500 with a 5% fixed fractional setting.
surpass a loss of 5 % (because that should have us closed out). Therefore, when
this happens, you know this is an exceptional occurrence. A n d because exceptional occurrences, whether for better or worse, add m o r e to the insecurity and risk than
to the bottom line, you might be better off taking a profit or cutting the loss, overriding the signal from the system for the best of the portfolio as a whole.
As already concluded, the performance s u m m a r y in Figure 15.11 and the
development of the total equity as depicted by Figures 15.12 and 15.13 are not all
that impressive. But this portfolio consisted of only o n e market/system combination. To better our results we need to diversify into other market/system combinations. Table 15.1 shows the result of one such diversification. This time the portfolio consists of three different market/system combinations, the three short-term
systems we built in the previous section of this book, all applied to the S & P 500
c o m m o d i t y futures contract, with the m a x i m u m percentage risked per trade set to
only 1.5%. T h e initial capital was set to $1,000,000, with $75 deducted p e r contract traded. Notice that we n o w are m a k i n g over 5 0 % p e r year, with a largest
d r a w d o w n of less that 2 0 % a n d a longest flat time of less than 6 months ( 1 1 3 / 2 1
= 5.4). A n d we are only risking 1.5% p e r trade!
Figures 15.15 and 15.16 show the a c c o m p a n y i n g equity curve a n d historical
drawdown for this short-term strategy. As you can see, although from the total
298
PART 5
TABLE
15.1
1.5% fixed fractional portfolio performance summary for three systems trading S&P 500.
Strategy summaries
Profitability
End Eq ($)
Trade statistics
4,827,166
Total (%)
383
Year(%)
52.17
P factor
1.56
No Trades
316
Avg Tr ($)
12,773
T r / Mark /Year
Tr / Month
Risk measurers
28.1
2.3
Time statistics
Max DD (%)
-19.47
-307,050
Winners (%)
56.96
113
54.82
3.00
F I G U R E
15.15
The combined equity curve from trading three different market/system combinations.
CHAPTER 15
299
Money Management
FIGURE
15.16
PART 5
300
FIGURE
15.17
The dollar value for each trade from three different market/system combinations.
CHAPTER 15
301
Money Management
FIGURE
15.18
The percentage return for each trade from three different market/system combinations.
that one or several market/system combinations have developed in such a way that
you n o w are steering the entire portfolio into unfamiliar territory. In this case, very
seldom will the closed-out losses be any worse than j u s t a few percentage points.
Therefore, if this starts to h a p p e n m o r e and m o r e often, you k n o w that o n e or several of your market/system combinations have started to behave in ways not in line
w i t h w h a t could be expected and perhaps even against the logic of the system.
W h e n working with the daily and bar-by-bar data there is one m o r e important
chart to consider. That is the margin to equity ratio, which is shown in Figure 15.19.
This chart shows how m u c h of your total equity you actually need to keep on account
with your broker to do the necessary trades. In the case of the S & P 500 portfolio we
have been working with so far, I have assumed a margin of $22,000 per contract. In
this case, as time moves on, the average margin to equity ratio should probably even
out just below 2 0 % , with an expected m a x i m u m around 3 5 % . This m e a n s that of the
total equity we have at stake, we only need to keep, say 5 0 % just in case, on account
with our broker. T h e rest of it we can have elsewhere, where we h o p e it can generate a higher return than the interest rate our broker can offer. It is important to realize, though, that you m u s t have this money readily available and committed to your
strategy as well. Otherwise, it would be as if you were trading your portfolio with
only half the equity, but twice the a recipe for disaster, indeed.
302
PART 5
FIGURE
15.19
Before we m o v e on to the long-term systems, let us compare the performance summaries in Figure 15.11 and Table 15.1 with Tables 15.2 and 15.3 which
show the results from trading both these portfolios on a one-contract basis. If a
fixed fractional trading strategy is not doing any better than a one-contract, then
what is the point? But we do not have to worry. Table 15.2 shows that the single
market/system portfolio would only have m a d e $88,500 on a one-contract basis,
while the three-market/system portfolio would have m a d e $331,000, or approximately 8%> p e r year on an initial equity of $1,000,000. T h a t is quite a difference
c o m p a r e d to the 5 2 % per year we could have m a d e only risking 1.5% of total equity p e r trade.
O t h e r interesting o b s e r v a t i o n s are that the profit factor, the value of the
average trade, the p e r c e n t a g e profitable trades, a n d the d r a w d o w n all are better
in F i g u r e 15.11 a n d Table 15.2 than they are in Tables 15.1 and 15.3. For the
average s y s t e m builder, these are all i m p o r t a n t figures. H a d we not k n o w n what
we n o w know, c h a n c e s are that we m i g h t h a v e ditched the three-market/system
portfolio for t h e b e n e f i t of the s i n g l e - m a r k e t / s y s t e m c o m b i n a t i o n , a n d then traded that o n e m o r e aggressively instead, if we h a d derived these n u m b e r s directly
from T r a d e S t a t i o n ' s or any other c o m m e r c i a l l y available p r o g r a m ' s performance
summary.
CHAPTER 15
Money Management
TABLE
15.2
Trade statistics
1,088,541
No Trades
73
AvgTr($)
Total (%)
Year (%)
2.29
Tr/Mark/Year
6.5
P factor
1.86
Tr / Month
0.5
Risk measurers
1,213
Time statistics
Max DD (%)
-1.68
-13,148
Winners (%)
57.53
275
TIM (%)
16.35
Avg Days
4.00
There are several reasons w h y a portfolio of several market/systems combinations does better than only a single market/sy stem combination, even if we try
to c o m p e n s a t e by trading the sole combination m o r e aggressively. The m o s t obvious reason, as we learned from the fundamental equation of trading, is that the best
way to speed up the equity growth rate for a trading strategy with a positive
expectancy is to trade it as frequently as possible. A n d no matter h o w aggressively we trade a single market/system combination, the actual n u m b e r of trades will
not increase, as it will if we trade several market/system combinations simultaneously. Furthermore, by letting two or several market/system combinations with
positive expectancies share the s a m e account, there is a positive expectancy that
there will be m o r e m o n e y to play with, going into each individual trade.
TABLE
15.3
Trade statistics
1,331,013
Total (%)
33
No Trades
316
Avg Tr($)
1,079
Year(%)
7.92
Tr/Mark/Year
P factor
1.59
Tr/Month
Risk measurers
28.1
2.3
Time statistics
Max DD (%)
-3.85
-32,656
Winners (%)
56.96
112
54.82
3.00
304
PART 5
This is true as long as the different market/system combinations are not perfectly (100%) correlated and with each one having a positive expectancy. It could
also be true even if one or several of the market/system combinations have a negative expectancy, as long as they are uncorrelated e n o u g h with the rest of the combinations and the portfolio as a w h o l e . T h e r e is a price for doing this, however, and
that is that the overall efficiency of the portfolio diminishes the m o r e market/syst e m combinations you add. For instance, trading two market/system combinations
that are not perfectly correlated, with an optimal of 0.5 each, results in an optim a l of less than 0.5 for the strategy as a w h o l e . This m e a n s that there also is a
limit to h o w m a n y market/system combinations it is meaningful to trade.
But, to take the reasoning through yet another circle, the decrease in efficiency as a result of trading several uncorrelated market/system combinations also
has a major benefit. T h e lower the optimal or the fixed fractional trading level,
the lower the risk and the shallower the expected d r a w d o w n s . Consider, for
instance, two perfectly correlated market/system combinations. W h e n o n e of them
has a losing trade, so has the other, w h i c h m e a n s that all losing trades leading into
a new drawdown from a recent equity high hit you full force, w h e r e a s a drawdown
for an uncorrelated portfolio of market/system combinations is likely to be dampened because the combinations are low correlated, but also because they don't
trade at the s a m e time. This m e a n s that each losing trade decreases the n u m b e r of
contracts that can be traded going into each consecutive trade.
All the above leads to one important conclusion: the optimal is not a measure of how high a certain portfolio's return is likely to be, but instead of how risky
it is. To get an indication of h o w high the return will be, we must look at the estim a t e d growth rate, as measured by the estimated geometric mean ( E G M ) , given the
a s s u m e d risk as dictated by the largest expected amount to lose p e r contract and the
largest expected amount to lose per trade (the fixed fractional trading level).
Finally, just for the h e c k if it, it could be fun to k n o w h o w m u c h we could
have m a d e h a d we traded the three-market/system portfolio at or near its optimal
Table 15.4 and Figure 15.20 reveal that we would have taken the initial million
to $114,148,000, w h i c h corresponds to an average percentage return of 2 5 4 % per
year. However, the price for this would have been to suffer through a drawdown of
m o r e than 7 5 % of account equity a n d a largest single loss of close to $37,000,000.
(By the way, w h i c h one of all the drawdowns in Figure 15.20 do you think is the
worst, as a percentage of total equity?) T h e s e are clearly not tolerable or tradable
n u m b e r s , w h i c h also is illustrated by the fact that the m a x i m u m n u m b e r of contracts traded at o n e t i m e would have b e e n m o r e than 10,000 and that the average
margin-to-equity ratio would have been close to 2 0 0 % . We would have h a d to borrow the s a m e a m o u n t as we h a d on the account, j u s t to cover margin. A n d who in
his right m i n d would have lent us that k i n d of m o n e y w i t h a track record showing
d r a w d o w n s upwards of 8 0 % ? N o , although the theory surrounding optimal is
beautiful, to trade at an unconstrained optimal level simply is not feasible. (The
CHAPTER 15
305
Money Management
TABLE
15.4
Profitability
114,147,973
No Trades
316
Total (%)
11,315
Avg Tr ($)
451,612
Year(%)
253.72
Tr/Mark/Year
P factor
1.33
End Eq ($)
Tr / Month
28.1
2.3
Time statistics
Risk measurers
Max DD (%)
-75.67
-36,724,875
Winners (%)
56.96
160
54.93
3.00
PART 5
306
F I G U R E
15.20
The equity curve from trading three different market/system combinations at their optimal f.
w a s set to $1,000,000, with $75 deducted for slippage and c o m m i s s i o n per contract
traded.
Just to m a k e sure that it is indeed beneficial to use a fixed fractional trading
strategy, even if we keep t h e / a s low as 0.015, you can c o m p a r e the results in Table
TABLE
15.5
1.5% fixed fractional trading with the SDB strategy (in-sample period).
Strategy summaries
Trade statistics
Profitability
End Eq ($)
7,462,552
424
No Trades
14,614
646
AvgTr($)
Year(%)
17.6
Tr/Mark/Year
2.1
P factor
2.04
Tr / Month
2.8
Total (%)
Time statistics
Risk measurers
Max DD'(%)
-17.17
-148,124
Winners (%)
41.75
25.9
TIM (%)
99.81
Avg Days
20.00
CHAPTER 15
307
Money Management
15.5 with those in Table 15.6, w h i c h shows how m u c h you would have m a d e trading o n e contract only. T h e only major drawback with the statistics in Table 15.5 is
a little too long flat period. However, research and experimentation show that it is
m o r e a result of b a d portfolio composition than of the system itself, although at
this stage all three variablesthe system, the m o n e y m a n a g e m e n t , and the portfolio compositioninterfere and influence each other, m a k i n g all three parts
equally responsible for results. Nonetheless, in this case the longest flat period
r e m a i n s the s a m e even if is increased to 2 . 5 % or lowered to 1%. T h e only thing
that h a p p e n s is that with a higher c o m e s a higher drawdown and a higher return,
and vice versa.
By the way, t h e o p t i m a l for this portfolio can be found a r o u n d 1 4 % ,
w h i c h p r o d u c e s a final profit of m o r e than $ 2 1 . 5 billion, c o r r e s p o n d i n g to a
yearly rate of return close to 1 2 5 % , b u t also a d r a w d o w n close to 9 5 % , a largest
loss close to $4.5 billion, a n d a l o n g e s t flat t i m e of m o r e than 40 m o n t h s . As
s h o u l d be clear by now, the final r e t u r n is only a function of h o w well you
w o u l d like to sleep at night. In this case we w o u l d be m a k i n g s o m e t h i n g like
$ 1 . 7 5 billion a year, on a v e r a g e i f y o u believe that is w o r t h sleepless n i g h t s ,
b e m y guest.
N o w that we k n o w the S D B system works fine within a m o r e complete trading strategy incorporating consistent m o n e y m a n a g e m e n t on a whole portfolio of
market/system combinations, perhaps it is time to look at how the same strategy
would have performed on previously unseen data. T h a t we will do, but first we will
add another few analysis techniques to our portfolio s u m m a r y spreadsheet.
We will put together a set of formulae that produce monthly results, resembling those in Figure 15.21, w h i c h we will use for further input into a new set of
formulae that produce results like those in Tables 15.7 and 15.8.
TABLE
15.6
Profitability
End Eq ($)
1,329,060
No Trades
424
AvgTr($)
765
Total (%)
33
Year(%)
2.32
2.1
P factor
1.99
Tr / Month
2.8
Time statistics
Risk measurers
Max DD (%)
-2.53
-6,726
Winners (%)
41.75
20.81
TIM (%)
99.81
Avg Days
20.00
308
PART 5
FIGURE
15.21
To start, highlight the cell in the column, o n e c o l u m n away from your portfolio calculations a n d at the s a m e row for w h e r e you start the portfolio calculations. In Figure 15.21, that is cell E Z 3 0 .
In cell E Z 3 0 :
=EO30
w h e r e column EO denotes the daily updated dates.
In c e l l E Z 3 1 :
=IF(INT(E031/100)<INT(EO32/l 00),EO31,"")
then drag down to fill all the cells in that c o l u m n .
In cell FA30:
=ER30,
w h e r e column ER the daily updated total equity.
In c e l l F A 3 1 :
=IF(INT(EO31/100)<INT(EO32/100),ER31,"")
TABLE
15.7
12
24
36
48
60
159.88
-0.94
3.95
26.37
39.14
54.52
79.46
119.78
1.43
4.41
8.77
17.65
39.97
69.48
110.03
159.17
Best
13.25
27.13
49.21
62.70
116.21
162.76
228.11
256.53
Worst
25.23
Most recent
Average
-9.09
-12.34
-10.97
-6.54
-11.42
-1.67
8.71
St. dev.
3.92
7.21
11.26
15.42
29.05
44.40
60.53
69.04
EGM
1.35
4.16
8.19
16.64
36.92
63.56
101.12
149.81
Sharpe ratio
0.36
0.61
0.78
1.14
1.38
1.56
1.82
2.31
Avg. winning
3.57
7.48
12.17
20.80
44.63
70.11
110.03
159.17
-2.33
-3.52
-3.63
-3.35
-4.26
-1.67
N/A
N/A
Avg. losing
CHAPTER 15
309
Money Management
TABLE
15.8
12
24
36
48
60
-10.71
16.76
59.69
39.14
24.31
21.52
21.76
21.05
18.58
18.84
18.31
17.65
18.31
19.23
20.38
20.98
28.95
Best
345.1
161.21
122.64
62.7
47.04
37.99
34.59
Worst
-68.13
-40.95
-20.74
-6.54
-5.88
-0.56
2.11
4.6
58.63
32.11
23.79
15.42
13.6
13.03
12.56
11.07
St. dev.
Sharpe
% winners
0.32
0.59
0.77
1.14
1.35
1.48
1.62
63.76
72.11
78.47
86.96
90.48
99.12
100.00
1.9
100.00
310
PART 5
To transform the cumulatively c o m p o u n d e d values in Table 15.7 to annualized dittos in Table 15.8, simply raise each value by (12/PL), w h e r e PL equals the
length of the period. For instance, if the m o s t recent monthly return is stored in cell
K 3 , to transfer it into an annualized figure in cell K 1 3 , use the following formula
i n cell K l 3 :
A
CHAPTER 15
311
Money Management
FIGURE
15.22
TABLE
15.9
1.5% fixed fractional trading with the SDB strategy (both sample periods).
Strategy summaries
Trade statistics
Profitability
End Eq ($)
19,949,789
730
No Trades
25,184
Total (%)
1,895
AvgTr($)
Year(%)
16.68
Tr/Mark/Year
2.4
P factor
1.52
T r / Month
3.1
Time statistics
Risk measurers
Max DD (%)
-27.3
-568,453
Winners (%)
39.59
25.9
TIM (%)
99.88
Avg Days
19.00
312
PART 5
FIGURE
15.23
CHAPTER 15
313
Money Management
TABLE
15.10
-7.12
1.40
15.58
-13.63
St. dev.
4.70
Geo Mean
1.29
0.3
4.18
Avg. losing
-2.86
% winners
60.52
PART 5
314
FIGURE
15.24
The cumulative monthly returns for the SDB strategy (both sample periods).
To get a feel for how m u c h each market is contributing to the end result you
can put together a table like Table 15.12, w h e r e I simply divided the total closedout profit for each market by the total profit for the portfolio as a whole. In this
case, we can see that the S & P 500 lowers the result by close to 2 5 % , while the crude
TABLE
15.11
Trade statistics
No Trades
2,885
Total (%)
1,601
AvgTr($)
4,420
Year(%)
15.73
Tr/Mark/Year
P factor
1.06
End Eq ($)
17,011,080
Tr / Month
Risk measurers
9.3
12.4
Time statistics
Max DD (%)
-57.56
-2,374,435
Winners (%)
29.71
28.24
TIM (%)
98.06
Avg Days
7.00
CHAPTER 15
315
Money Management
FIGURE
15.25
The annualized monthly returns for the SDB strategy (both sample periods).
316
PART 5
FIGURE
15.26
TABLE
15.12
Contributing
Corn
-24.98
S&P 500
-24.82
Juice
-59.71
Live cattle
-23.61
Lumber
4.77
Coffee
49.77
Japanese yen
51.33
Copper
12.25
Gold
-3.30
Eurodollar
Dollar index
Cotton
0.16
-4.49
7.40
CRB
-5.52
Crude oil
91.46
Canada dollar
T-bonds
Total
7.34
21.96
100.01
CHAPTER 15
Money Management
F I G U R E
317
1 5 . Z 7
kets were lumber, coffee, Japanese yen, copper, dollar index, cotton, crude oil,
C a n a d a dollar, and T-bonds. As you can see, this time the m a x i m u m drawdown has
decreased to 2 7 . 5 % , which is considerably better than it was from trading all markets. Unfortunately, this is counterbalanced by a m a x i m u m flat period that is m u c h
t o o long. A n o t h e r interesting observation that can be m a d e from comparing
Figures 15.26 and 15.28 is that Figure 15.26 at o n e point h a d a m a x i m u m total
equity of close to $40,000,000, before the result started to turn south in the middle of 1998.
Honestly now, pretend it is early 1998 and that you just finished building this
very s a m e system using these very s a m e markets. Would you then decide to trade
it with all the available markets or only the nine markets that, in hindsight, turned
out to p r o d u c e the best result, considering the deep drawdown that started later that
s a m e year?
I bet m o s t of you would have gone with the original portfolio, o n e reason
being that c o m m o n knowledge dictates that, "with a long-term strategy you should
trade as m a n y markets as possible, because you never k n o w w h i c h one will take
off next, p r o d u c i n g that h u g e w i n n e r that will m a k e it possible to build a house on
the m o o n . " This is very b a c k w a r d reasoning, however, because, for o n e thing, the
m o r e markets you trade the m o r e likely it is that you will be caught on the wrong
side w h e n panic strikes any o n e of them. Additionally, because all our funds are
318
PART 5
FIGURE
15.28
The equity curve for the directional slope strategy traded on the nine best markets.
CHAPTER 15
Money Management
TABLE
319
15.13
Trade statistics
No Trades
1,646
Total (%)
20,709,401
1,971
AvgTr($)
10,867
Year(%)
16.91
Tr/Mark/Year
5.3
P factor
1.23
Tr / Month
7.1
Risk measurers
Time statistics
Max DD (%)
-27.54
-1,509,982
Winners (%)
31.83
26.33
TIM (%)
98.06
Avg Days
11.00
ing for the evidence to be strong enough to warrant the switch. True, but my answer
to that is the same as for the type I and type II errors: "Better safe than sorry."
Furthermore, you have to decide what it is you are trying to achieve. We are
discussing trend-following strategies, consisting of a m o n e y m a n a g e m e n t regim e n , a portfolio of markets, and a trend-following system, and the s a m e reasoning holds true for the complete strategy as it does for the single system. That is,
we are not trying to pick tops and bottoms, b u t rather to j u m p on a market in
motion once the trend has proved itself and then ride that m o v e until our stops and
exit techniques tell us that it is no longer there.
A n o t h e r practical reason why we shouldn't trade every market is that the
m o r e markets we trade the m o r e inefficient the strategy will be, lowering the optim a l for the portfolio as a w h o l e . A n d because we like to have plenty of r o o m
b e t w e e n the we are using a n d the true optimal we had better not b o g down the
portfolio too m u c h . My research shows that a portfolio of 12 to 18 different, lowcorrelated markets, possibly traded with as m a n y as three different systems, seems
to work best. But this conclusion is b a s e d on my personal preferences, and I urge
you to do your own research to c o m e up with a portfolio that m a k e s the m o s t sense
to you.
320
PART 5
TABLE
15.14
Trade statistics
No Trades
1,581
Total (%)
21,787,934
2,079
AvgTr($)
11,425
Year (%)
17.21
Tr/Mark/Year
5.1
P factor
1.11
Tr / Month
6.8
Risk measurers
Time statistics
Max DD (%)
-42.37
-1,123,734
Winners (%)
33.9
30.67
TIM (%)
99.98
Avg Days
11.00
CHAPTER
16
Portfolio Composition
322
PART 5
FIGURE
16.1
FIGURE
16.1
244,040,528
24,304
32.76
Max DD (%)
-23.81
17
CHAPTER 16
Portfolio Composition
TABLE
323
16.2
12
24
-11.06
-3.95
-11.76
16.03
15.67
97.60
131.19
196.04
2.53
8.07
16.88
37.20
93.34
180.59
309.77
500.63
1120.37
36
48
60
21.98
59.01
92.24
131.99
257.59
425.66
744.94
-11.06
-12.41
-11.76
-8.22
0.84
18.15
19.35
48.66
St. dev.
5.52
11.31
17.07
28.14
60.48
109.41
175.53
253.37
444.57
Worst
EGM
2.38
7.48
15.63
34.28
83.64
158.38
270.27
Sharpe
0.46
0.71
0.99
1.32
1.54
1.65
1.76
1.98
Avg. winning
4.98
11.80
20.30
39.30
93.34
180.59
309.77
500.63
-3.04
-3.31
-4.03
-2.97
N/A
N/A
N/A
12
-14.89
-22.14
Avg. losing
Annualized
Most recent
-75.5
Average
34.96
36.4
36.61
16.03
37.2
N/A
24
36
48
60
7.55
25.49
23.31
24.24
39.05
41.04
42.28
43.13
89.1
73.87
70.49
64.93
Best
985.08
539.29
269.56
131.99
Worst
-75.5
-41.14
-22.14
-8.22
0.42
5.72
4.52
8.25
53.51
37.05
28.14
26.68
27.94
28.84
28.72
St. dev.
Sharpe
% winners
90.55
0.39
0.68
0.99
1.32
1.46
1.47
1.47
69.53
75.32
85.96
95.05
100.00
100.00
100.00
1.5
100.00
indeed, once again showing the importance of trading as frequently as possible. The
only not-so-good n u m b e r is the flat period that might be considered a little too long,
especially since that we are working with such a favorable portfolio of markets.
T h e reason behind the relatively long flat time probably can be found in this
portfolio's greatest drawback: the high correlation and similarity between several
of the markets. For o n e thing, there are as m a n y as four currencies and two energies. It is doubtful this would be a preferable solution for a real-life portfolio. But,
on the other hand, there are several traders w h o use only o n e system, trading nothing but a few currencies, or nothing but the S & P 500. So, in that regard, at least
Charity I is far m o r e diversified than m a n y other real life examples.
O n e good thing is that we are not risking any m o r e than 0 . 5 % per trade,
w h i c h m u s t be considered very low. This m e a n s that at any particular time we
never risk m o r e than 1.5% of the total equity going into the trade, per market ( 2 %
for the S & P 500), which is no m o r e than in any of the single system portfolios discussed earlier. Despite the very low risk and the fact that we are only trading 2.5
t i m e s as m a n y system/market combinations as c o m p a r e d to the original long-term
portfolios, we are still raising the total equity tenfold or m o r e .
Unfortunately, however, one other thing that increases exponentially is the computational time. I did all this work on a computer with two Pentium III, 500 M H z
PART 5
324
FIGURE
16.2
processors and 256 MB memory, but it still can take as long as half an hour or more
for the computer to do all the necessary calculations. This is not something I recommend you to do unless you have plenty of computational power.
CHAPTER 16
Portfolio Composition
FIGURE
325
16.3
PART 5
326
FIGURE
16.4
TABLE
16.3
37,797,489
3,680
20.59
Max DD (%)
-28.89
-1,690,564
23.29
CHAPTER 16
Portfolio Composition
FIGURE
327
16.5
328
PART 5
CHAPTER 16
Portfolio Composition
TABLE
329
16.4
Contributing
Pearson
-5.46
-0.6592
Au dollar
Sugar
Soybeans
Rice
0.66
0.0561
-2.52
-0.4445
15.85
0.9508
-22.93
-0.8640
Nikkei index
7.55
0.8741
Natural gas
12.86
0.9137
Platinum
Municipal bonds
3.80
0.8302
Lean hogs
-0.13
-0.3184
Live cattle
-2.09
0.1241
8.83
0.6967
Coffee
28.58
0.7810
Copper
5.40
0.9064
Gold
5.19
0.6305
Feeder cattle
1.84
0.8413
Eurodollar
0.64
0.9099
Cotton
20.97
0.9098
Crude oil
32.29
0.8362
Canada dollar
-1.82
0.2626
Cocoa
-9.60
-0.6489
Lumber
Corn
6.79
0.7143
British Pound
-4.17
-0.5608
Wheat
-2.54
0.4263
Table 16.6 shows the result from trading this portfolio. T h e ending equity is
close to $40,000,000, corresponding to a percentage return of m o r e than 2 0 . 5 0 %
p e r year. T h e d r a w d o w n has decreased to a tolerable 2 9 % . T h e longest flat time
also has decreased considerably but is still, at close to 31 m o n t h s , a little too long.
TABLE
16.5
29,016,313
2,802
18.96
Max DD (%)
-39.29
-823,050
47.57
PART 5
330
TABLE
16.6
38,565,334
3,757
20.72
Max DD (%)
-29.07
-1,579,683
30.81
CHAPTER
17
Let us briefly look at a few techniques for h o w you can increase your confidence
in your paper tigers. T h e most obvious m e t h o d is to save some of your data for outof-sample testing. If the system still holds up w h e n tested on this part of your data,
chances are very good that you have m a n a g e d to c o m e up with a m o d e l that does
not j u s t m a n a g e to catch a p h e n o m e n o n only associated with the data you used for
your testing and optimization. T h e second method, and the one I prefer, is to alter
the different input variables one at a t i m e by approximately 5 0 % . If the result differs too m u c h from the original result, chances are that particular variable might be
too sensitive to be trusted with real-time data, and you m u s t go back to the drawing board. To be sure, I also run a best- and a worst-case scenario a n d will say m o r e
about this shortly.
OUT-OF-SAMPLE TESTING
For the first method, we specifically put some data aside when we built the Standard
Deviation Breakout (SDB) system. Table 17.1 shows how the original S D B system
(without exits and filters) fared w h e n tested on the out-of-sample data, covering the
period October 1992 to October 1999, trading one contract only. This table is directly comparable to Table 10.18. If you compare the two, you find that 12 markets had
both a higher profit factor and a lower standard deviation when tested on the out-ofsample data, and that nine markets also had lower drawdowns, but that only four markets managed to increase the value for the average trade. For the in-sample period, all
16 markets were tradable according to our rule-of-thumb, but for the out-of-sample
period, only nine markets were tradable. Overall, this indicates that the system is still
331
332
PART 5
TABLE
17.1
P. factor
Avg. trade
2 St. dev.
Drawdown
Crude oil
4.29
1,479.39
7,057.42
-2,978.23
T-bonds
1.84
959.06
8,535.63
-14,922.51
T-bills
0.78
-53.19
1,082.75
-2,918.79
Rough rice
2.35
469.66
4,414.97
-2,471.24
Nikkei index
1.16
278.92
10,217.26
-13,980.23
-9,231.34
Natural gas
1.27
370.80
8,909.49
Live cattle
0.45
-302.45
1,924.89
-6,976.45
Lumber
0.75
-290.64
4,713.38
-14,987.61
Coffee
2.28
2,677.13
26,860.39
-15,845.70
Japanese yen
5.16
3,240.19
14,366.39
-6,369.00
Copper
1.18
93.38
3,015.47
-5,342.02
Gold
1.13
47.16
2,083.29
-4,622.61
Dollar index
2.47
1,060.05
7,014.18
-9,012.39
D mark (Euro)
1.90
536.96
4,705.28
-3,672.00
Cotton
1.26
203.75
6,475.78
-8,008.77
Wheat
1.40
124.61
2,077.13
-2,711.16
doing a good j o b keeping down the risk and the cost of doing business, but that it
also is not as market insensitive as we would have liked.
Tables 17.2 and 17.3 show h o w the S D B system p e r f o r m e d on the out-ofsample data, with the stops a n d exits added. Table 17.2 also is comparable to
Table 10.19. O n c e again we m a n a g e d to improve the profit factor for 12 markets,
but unfortunately, the value of the average trade continued to decrease for 11 markets, resulting in only 6 tradable m a r k e t s according to our rule of t h u m b , leaving
only a few m a c r o e c o n o m i c oriented m a r k e t s with high point values as tradable
alternatives. T h i s is, of course, no g o o d a n d m i g h t indicate that we have set the
stops and exits too tightly. In the best of worlds, we should go b a c k to the drawing b o a r d to e x a m i n e w h a t h a p p e n s if we exclude or modify one or several of the
exit techniques.
On the m i n u s side is also the fact that we only m a n a g e d to decrease the drawd o w n for four markets, which confirms the fact that the stops are not doing their
j o b s as intended. T h e n it does not matter that the standard deviation decreased for
a total of nine markets, indicating a lower risk. If the profits are not there, something must be done. Hopefully, a filter adds to the performance again.
Tables 17.4 and 17.5 show the out-of-sample results for the final system,
with both the exits and the filter added. With the filters added, we once again man-
CHAPTER 17
333
TABLE
17.2
P. factor
Avg. trade
2 St. dev.
Drawdown
Crude oil
3.05
1,044.50
6,317.99
-2,287.13
T-bonds
2.09
1,245.85
10,007.90
-14,927.71
T-bills
0.73
-69.61
1,190.71
-3,477.18
Rough rice
0.95
-18.33
1,616.97
-2,578.88
Nikkei index
1.34
596.12
11,407.45
-11,504.12
Natural gas
0.74
-333.44
6,770.50
-16,311.91
Live cattle
0.51
-271.59
2,053.99
-6,430.07
Lumber
0.94
-49.30
4,132.89
-12,826.20
Coffee
0.46
-724.16
4,815.83
-16,986.35
Japanese yen
2.79
2,131.80
12,359.79
-8,681.72
Copper
0.85
-88.57
2,617.81
-7,656.22
Gold
0.97
-11.36
2,035.93
-5,796.95
Dollar index
2.80
1,250.31
7,839.86
-9,211.56
D mark (Euro)
1.55
411.75
5,445.90
-4,172.52
Cotton
1.29
209.09
5,914.57
-9,608.86
Wheat
1.03
13.43
2,149.37
-3,231.83
aged to improve the profit factor for 12 markets, but the value of the average trade
also continued to decrease for 10 markets. This time, however, the decrease c a m e
in markets that already w e r e quite profitable, which in the end resulted in a total
of 9 tradable markets.
If we c o m p a r e the final system, traded on out-of-sample data (Table 17.4) to
the very original system, tested on in-sample data (Table 10.18), we can see that
all m e a s u r e s are both lower in value and m o r e uniform (i.e. lower standard deviations) for the final out-of-sample system, than for its original in-sample counterpart. This also s e e m s to hold true if we c o m p a r e the final in-sample system (Table
13.7) with the final out-of-sample system (Table 17.4).
Of course there are plenty m o r e research and comparative analyses that
c o u l d a n d s h o u l d g o into this before you finally decide to start trading your
m o d e l , but in conclusion we can say that the fact that the system seems to m o v e
toward a m o r e uniform behavior w h e n comparing the different markets is a good
thing, as are the facts that the drawdown and standard deviation of the value of the
average trade seem to stay at relatively low levels. An ever-increasing profit factor
for most markets also is a positive. T h e b a d n e w s is that several markets did not
m a n a g e to p r o d u c e a tradable average profit p e r trade a n d that s o m e even turned
negative. B u t such are the traits of a n o n - m a r k e t - s p e c i f i c m o d e l . It will work well,
334
PART 5
TABLE
17.3
P. factor
Avg. trade
2 St. dev.
Drawdown
-28.77%
-29.40%
-10.48%
-23.21%
13.64%
29.90%
17.25%
0.03%
2
1
Better
-5.59%
30.87%
9.97%
19.13%
-59.79%
-103.90%
-63.38%
4.36%
Nikkei index
15.42%
113.72%
11.65%
-17.71%
Natural gas
Rough rice
-41.72%
-189.92%
-24.01%
76.70%
Live cattle
12.33%
-10.20%
6.71%
-7.83%
Lumber
26.14%
-83.04%
-12.32%
-14.42%
Coffee
-79.78%
-127.05%
-82.07%
7.20%
Japanese yen
-45.87%
-34.21%
-13.97%
36.31%
Copper
-28.18%
-194.85%
-13.19%
43.32%
Gold
-14.47%
-124.09%
-2.27%
25.40%
13.00%
17.95%
11.77%
2.21%
Dollar index
-18.44%
-23.32%
15.74%
13.63%
Cotton
D mark (Euro)
2.40%
2.62%
-8.67%
19.98%
Wheat
-25.99%
-89.22%
3.48%
19.20%
Better
12
on average, on all markets over a longer period of time, but there invariably will
be times w h e n s o m e markets start to m o v e against you.
CHAPTER 17
335
TABLE
17.4
P. factor
Crude oil
3.11
2 St. dev.
Drawdown
1,160.48
6,926.93
-2,485.61
-8,757.69
-1,278.81
Avg. trade
T-bonds
2.57
1,588.33
10,332.34
T-bills
0.82
-37.29
1,048.49
240.89
3,548.54
-3,438.43
-13,084.91
-8,022.83
Rough rice
1.57
Nikkei index
1.42
774.75
12,214.28
Natural gas
0.92
-95.87
6,898.78
Live cattle
0.52
-265.61
2,130.85
-5,406.43
-10,228.79
Lumber
0.93
-58.91
3,895.54
Coffee
1.71
905.00
14,273.04
-11,468.87
Japanese yen
1.82
1,260.72
12,526.50
-14,863.14
Copper
0.91
-52.43
2,726.10
-5,556.51
1.68
235.91
2,528.68
-4,544.11
Dollar index
2.75
1,348.52
8,472.42
-4,956.25
D mark (Euro)
0.90
-120.21
5,763.42
-9,866.05
1.88
587.89
6,767.50
-6,758.33
1.02
6.48
2,158.88
-3,341.48
Gold
Cotton
Wheat
336
PART 5
TABLE
17.5
Differences between SDB system with exits only and final system.
Differences
Market
P. factor
Crude oil
Avg. trade
2 St. dev.
Drawdown
Better
1.94%
11.10%
9.64%
8.68%
T-bonds
22.91%
27.49%
3.24%
-41.33%
T-bills
11.63%
-46.43%
-11.94%
-63.22%
Rough rice
65.73%
-1414.49%
119.46%
33.33%
Nikkei index
6.32%
29.96%
7.07%
13.74%
Natural gas
24.05%
-71.25%
1.89%
-50.82%
2.26%
-2.20%
3.74%
-15.92%
-1.43%
19.49%
-5.74%
-20.25%
Coffee
270.30%
-224.97%
196.38%
-32.48%
Japanese yen
-34.70%
-40.86%
1.35%
71.20%
Live cattle
Lumber
Copper
6.79%
^0.80%
4.14%
-27.42%
Gold
73.64%
-2176.69%
24.20%
-21.61%
Dollar index
-1.68%
7.85%
8.07%
-46.20%
^t2.31%
-129.20%
5.83%
136.45%
Cotton
46.55%
181.17%
14.42%
-29.67%
Wheat
-1.66%
-51.73%
0.44%
3.39%
Better
12
10
D mark (Euro)
TABLE
17.6
194
Profit factor
1.05
Lrg winner
Avg winner
Cum profit
Avg profit
0.04%
127
St Dev
1.72%
5,792
Winners
118
60.82%
76
39.18%
5.14%
17,348
Losers
Lrg loser
-8.30%
-28,013
1.26%
4,250
Avg loser
-1.86%
-6,275
4.52%
15,255
Drawdown - 1 9 . 5 2 %
-65,880
CHAPTER 17
TABLE
337
17.7
206
Winners
Profit factor
1.31
Lrg winner
Avg winner
Avg profit
0.17%
572
St Dev
1.73%
5,832
C u m profit
10
50.00%
5.14%
17,348
Losers
Lrg loser
10
50.00%
-8.30%
-28,013
1.44%
4,874
Avg loser
-1.11%
-3,730
37.46%
126,428
Drawdown
-14.76%
-49,815
PART
FIVE
The observant reader probably has noticed that up until Part 5 I have consistently
talked about " s y s t e m s " rather than "strategies," but that in Part 5 I have used the
word "strategy" m o r e frequently. This is because to m e , a " s y s t e m " is nothing but
the basic entry and exit rules. A "strategy," on the other hand, is a complete trading
plan, including a system, a m o n e y m a n a g e m e n t regimen, and a well-thoughtthrough reason for trading a particular set of markets. To m e , a system without a
proper m o n e y m a n a g e m e n t regimen attached to it can never be a strategy.
I have noticed that O m e g a research recently went from using the word "syst e m " to using the word "strategy." That is nothing but another ridiculous way for a
software v e n d o r to try to cash in on a new b u z z word or distance itself from another word that might have lost a little bit of its sex appeal. There is no way you can
use TradeStation as a standalone tool to build a complete strategy. You c a n ' t even
do proper system testing on a single market, not to mention all the hassle you have
to go through if you want to test a portfolio!
In Part 5 we took a closer look at how to put together a fixed fractional m o n e y
m a n a g e m e n t regimen, a n d we did so using percentage-based calculations throughout. It is important to understand that we would not have been able to do this had
we not d o n e our h o m e w o r k properly and g o n e through all the excruciating work in
the previous chapters. It should now be clear that everything affects everything else;
to build a trading strategy that is larger than its p a r t s t h e system, the m o n e y m a n agement, and the portfolio c o m p o s i t i o n w e m u s t know exactly w h a t it is we want
to achieve, and there is no way of cheating.
I am a big fan of Mr. Vince's work, but even so there have been a couple of
occasions throughout this section were I have implicitly argued against him and
339
340
PART 5
what seems to have b e c o m e " c o m m o n w i s d o m , " or otherwise argued for a different way of approaching a specific problem or topic. Before I end this book, I
would like to take the opportunity to address these in m o r e detail.
C o n c e r n i n g percentage-based versus point-based data, if I understand Mr.
Vince correctly, it should not matter what data we use. Mr. Vince acknowledges
the problem of using point- or dollar-based data in heavily trending markets, but
also says that if you have to use so m u c h data that the trend starts to b e c o m e a
problem, then you are probably using too m u c h data anyway (The Mathematics of
Money Management, p. 83 ff. John Wiley & Sons, 1992).
N o t h i n g can be m o r e wrong. You should use as m a n y data as you possibly
can to m a k e your results as robust as possible. There is no way around this,
because for a system to work in the future it needs to exploit a type of market
a n o m a l y that is not dependent on w h a t level we are trading, what the most recent
trend looked like, or w h o h a p p e n e d to be president at the time. It m u s t be a p h e n o m e n o n not dependent on any particular circumstances, only referable to that
particular point in time. Furthermore, using percentage-based calculations is the
only way to m a k e your results comparable a m o n g different markets. Mr. Vince
says that for a system to be robust, it should work on several markets, but he does
not address the problem of h o w to get there. (Granted that is not the p u r p o s e of
any of Mr. Vince's b o o k s , but still....)
Another key point throughout this section has been that you do not have to use
your largest historical loser to calculate optimal f. T h e optimal is the that gives
you the highest T W R value in accordance with the constraints you have applied to
your model. Unfortunately, most analysts and system designers consistently refer to
the optimal as the corresponding to the largest historical loser. This has stuck in
people's minds and m a n y have therefore dismissed the entire theory surrounding
fixed fractional investing as something very dangerous. But this is only one way of
many to relate optimal to a specific constraint. That is, we do not want to experience a loser larger than our largest historical loser, the largest historical loser being
the constraint. B u t we could equally as well have said that we do not want to experience a loser larger than our largest historical loser, times two, because this would
result in an even higher optimal than the optimal most commonly referred to.
In this particular case I do not think it w a s Mr. Vince's intention to have
everybody stare themselves blind on his way of doing it, but that is the way people work. T h e y read something a n d take it for face value without putting their own
thinking caps on. True, trading with an / b a s e d on your largest loser is very dangerous, but as we have seen, it is m o r e or less impossible to use an that high anyway if you like to trade a well-diversified portfolio, because of several practical
reasons such as margin constraints, extremely high drawdowns, and an impossible
n u m b e r of contracts traded.
Instead of using your largest historical loser to calculate I suggest that you
simply use the stop loss level for each individual trade and that you keep that stop
PART 5
341
loss level the same, no matter what m o d e the m a r k e t is in. O n c e y o u have calculated the optimal in accordance w i t h the constraints of your choice, m a k e sure
that you actually use an far lower than that, b e c a u s e there is no guarantee that the
future, u n k n o w n , w o n ' t be far lower as well, especially for a market-specific syst e m built with point-based data.
M a n y portfolio managers, especially in the stock market, probably also have
tried to combine a fixed fractional m o n e y m a n a g e m e n t regimen with the Capital
Asset Pricing M o d e l ( C A P M ) a n d the Efficient Market Hypothesis ( E M H ) .
However, as far as I understand, the two cannot be combined, because for a system
to work equally as well on several different markets, we have to assume that there is
no difference in the statistical traits of all these markets. This might or might not be
so in real life, but for our purposes, this is what we must assume. A n d because we
assume this, we cannot deviate from it w h e n it is time to apply m o n e y management,
to the system we are building, because it would result in a suboptimal solution. If we
do not believe that the statistical traits for all markets are the same, then there is no
way we can build systems that should work equally as well in all markets; all systems would, out of necessity, have to be market specific, curve fitted, not robust at
all, and very, very dangerous to trade using any m o n e y management regimen.
A few also have argued that one should use different s depending on whether
the overall portfolio is in a drawdown, whether the market is in an uptrending or
downtrending m o d e , or whether we are about to go long or short. However, in doing
so we m u s t assume that we h a d done a b a d j o b constructing the underlying system
and that we think we can increase the return from the individual trades by tinkering
with the m o n e y management. But this is not so, because with a correctly built system there is no way of knowing, or even anticipating, the outcome of each individual trade. A well-working system m a k e s no difference between trying to pick tops or
bottoms, entering on breakouts to the up side or down side, whether the trend is up
or down, or even in which markets all this occurs. This also argues against the p o s sibility, within the confines of a specific strategy, to risk m o r e going long (short) in
an uptrend (downtrend) either by altering the stop loss level or by altering the bet
size. That said, this does not mean that several market-specific or even trend-specific characteristics or anomalies do not exist (in fact, we have stumbled u p o n and
acknowledged several such [short-term] anomalies within this book). If these are the
types of market anomalies you would like to exploit, then you m u s t build a system
that exploits exactly that, one market anomaly at a time. Those systems would, however, no longer be universally applicable and therefore probably m u c h less reliable
and robust than any of the systems we have worked with in this book.
Finally, a few, m o r e theoretically inclined, system builders and analysts have
advocated that rather than j u s t looking at the historical trades, it is better first to
calculate the distribution of the outcomes of the trades, and from there calculate
parametrically. At first glance this m a k e s a lot of sense, because using the m a t h e matical expression for the expected distribution of our future trades would m a k e
342
PART 5
our m o d e l s even m o r e forward looking than using the actual, historical trades. We
looked into the distribution of our trades w h e n we put together the stops and exits
for our short-term systems. In this particular case, the distributions we c a m e up
with hardly lend themselves to any parametric calculations of In fact, if they did,
I would say that we had a b u n c h of b a d systems on our h a n d s . Because as soon as
the distribution of our trades starts to resemble something that we can put a n a m e
to, especially if it turns out to be normally distributed, we are probably doing a
very b a d j o b in m a n a g i n g our trades, essentially leaving each trade to its own destiny as soon as we have entered into it, using no stop or exit techniques to streamline the o u t c o m e .
Instead, we should m a k e sure that each trade only has a set of very few, very
specific and clearly distinguished outcomes, one being the stop loss that we also
used for our optimal calculation. Remember, it is thanks to our stop and exit techniques we are able to exploit non-market-specific anomalies. If it were not for these
techniques, we would not be able trust our systems to a fixed fractional m o n e y
m a n a g e m e n t regimen in the first place. That said, there still might be plenty of systems with normally distributed trades that work m u c h better than those in this book.
T h e systems a n d strategies we explored so far are simply "paper tigers."
PART 5
343
You get a long-term edge in almost every market if y o u only trade with the
direction of the underlying trend.
T h e statistical traits for the markets are pretty m u c h the s a m e whether the
trend is u p , down, or sideways. For instance, by j u s t looking at the last five days
of market action, you likely are not able to tell the direction of the underlying longt e r m trend. Therefore, for practical reasons, the short-term traits can be said to be
static in nature, although the small, nonmeasurable changes that might occur over
time lead up to a n d form the longer-term trend. At that level, the statistical traits
b e c o m e d y n a m i c w i t h measurable differences, distinguishing u p , down, and side-
344
PART 5
ways trends from each other. Another major advantage of trading short term, but
only in the direction of the long-term trend, is that you dare to w o r k with limit
orders, trying to pick tops and b o t t o m s , influenced by the increased security you
feel about k n o w i n g the long-term trend.
To figure out w h e r e the market is heading, both in the short and the long run,
and the t h e o r y w h y all this is happening in the first place, was what Part 4 was all
about. W h e n attaching the filters we also might have to go back and adjust the original idea a little, or perhaps even scrap it all together if it turns out that we cannot
c o m e up with a way to fit the filter to the rest of the machinery as efficiently as we
would like to. Not until all the pieces from Parts 1 and 4 fit snugly together can we
attach the m o n e y m a n a g e m e n t that not only transforms the system to a strategy, but
also will m a k e the whole picture larger than any of its parts. To this set of rules and
frameworks we also need to add the understanding of the trading process and the
creation of a rule-based trading strategy as a flow of events and intervening decisions, rather than individual decisions separated from each other in time and space.
Because if we do not understand and acknowledge this, we cannot see the benefits
of the type of trading a n d that it is not a matter of optimizing your system's individual signals to the underlying data, but "optisizing" your trading positions in relation to your overall strategy and other personal constraints and preferences.
INDEX
Index
346
23,123
Capital Asset Pricing Model (CAPM), 257,
258, 282, 341
catching market moves, 52-53
Charity I portfolio, 322-324, 322, 3 2 3 ( 0 , 324
Charity II portfolio, 325, 3 2 6 ( 0 , 327
Charity III portfolio, 328-330, 3 2 9 ( 0 , 3 3 0 ( 0
Chebchev's theorem, 191, 194
closed trade drawdown (CTD), 5, 23, 121,
122, 123, 134-135,135, 136, 208,
209, 343
commission, 17
Commitment of Traders Report, 262
Commodity Futures Trading Commission
(CFTC), 262
computer software for evaluating
performance, 1-2
consecutive winners/losers, maximum
number, 10-11
correlations, 274, 324-325, 3 2 5 ( 0
covariances, 324-325, 3 2 5 ( 0
Crash of 1929, 261,262
Crash of 1987, 37-38
creation-of-funds analysis, 262-263, 266
credit policies and market trends, 260
Index
347
drawdown {cont.)
348
Index
EasyLanguage, TradeStation, 1
Eckhardt, Bill, 97-98
efficient frontier, 282
Efficient Market Hypothesis (EMH), 257,
258, 282, 341
efficient trading, 119-142
bar count/calculation in TradeStation,
129-130
closed trade drawdown (CTD), 121, 122,
123, 134-135,135, 136
directional slope system for, 124-129
drawdowns for, 121-141
end trade drawdown (ETD), 122, 123,
131-134,132, 133, 134, 138-139,
140
Index
349
92
drift in, 70
in Dynamic Breakout System ( D B S ) , 101,
168-177,169, 1 6 9 - 1 7 6 ( 0
end trade drawdown ( E T D ) and, 122, 123,
1 3 1 - 1 3 4 , 1 3 2 , 133,134, 1 3 8 - 1 3 9 ,
140
in Gold Digger I I , 191
long-term exits and, 167-186
in Meander system, 219, 220
money management and, 2 7 1 , 282
multiple markets and, 7 1 - 7 2
profit target for, 70
in Standard Deviation Breakout system
( S D B ) , 177-186, 177
start trade drawdown ( S T D ) in, 1122-124,
124, 1 3 0 - 1 3 1 , 1 3 1 , 3 5 - 1 3 6 , 135,
136
350
Index
Index
351
MACD indicator, 51
macroeconomic-oriented markets, 83
margin to equity ratio, 301
market analysis (See also distribution curves;
trends in markets), 255-266,
342-344
academic theories of, 256-257
accumulation area in, 263, 264
adoption-diffusion model in, 263
arbitrage principles and, 257
beta value and, 327
Capital Asset Pricing Model (CAPM) in,
257,258
Commitment of Traders Report in, 262
Commodity Futures Trading Commission
(CFTC) and, 262
Crash of 1929, 261,262
creation-of-funds analysis in, 262-263,
266
credit policies and, 260
demographics and, 259-260
distribution area in, 263, 264
Efficient Market Hypothesis (EMH) and,
257, 258
fiscal policies and, 259-260
flow-of-funds analysis in, 262-263, 264,
266
global market structures and, 258-259
gross domestic product (GDP) in, 259,
261
halfway flags in, 265
interest and amortization in, 260-261, 264
market microstructure indicators in, 263
momentum changes in, 265-266, 265,266
money supply (Ml, M2) in, 259
net present value (NPV) in, 259
New Economy and, 261
on-balance volume (OBV) indicator in,
263
Pearson correlation coefficient in,
326-329
portfolio theory in, 257
price vs. value in, 256, 257
random walk hypothesis (RWH) and, 257
real vs. financial markets, outcomes in,
261
352
Index
Index
353
Index
354
Index
355
356
Index
T-bond, 55
technical analysis of markets, 51, 262
Technical Analysis of Stocks and
Commodities, 263
Index
357
TradeStation (cont.)
evaluating performance, code for, 11-12,
26-28
exit techniques in, 160
filtering in, 232-233
flat time calculation in, 26
futures contract data and, 31-44
Gold Digger systems code, 59-62, 6 0 ( 0 ,
6 2 ( 0 , 191-197
largest percentage drawdown in, 29
largest percentage loser in, 29
largest percentage winner in, 28
long trades, equations for, 119, 120,120
maximum intraday drawdown in, 5-6
Meander system code, 64-69, 67, 6 8 ( 0 ,
69(0
number of losers in, 28
number of trades in, 29
open trade and entry price in, 129-130
percentage of losers in, 29
percentage of winning trades in, 29
performance summary report in, 6, 2 8 ( 0
profit factor in, 30
profit in, 160, 161
random number generator in, 204-205, 223
short trades, equations for, 119-121
standard deviation in, 28, 29
trend-tracking calculations in, 58-59
Trade Works Software, 223
trailing stop, 70, 132, 157-159, 158(0, 159(0
in Black Jack, 214-215, 215
in Dynamic Breakout System (DBS),
168-177,169, 169-176
maximum adverse excursion (MAE),
157-159, 158(0, 159(0
maximum favorable excursion (MFE), 145
trajectory analysis, MAE/MFE, 145
trend filter, 70
trends in markets (See also distribution
curves; market analysis), 47, 55-56,
85-113,343-344
200-day moving average in, 87, 228, 229
absolute vs. percentage values in, 64
accumulation area in, 263, 264
average profit per trade over time in,
85-86, 8 6 ( 0
basic crossover signals in, 86-87
Bollinger-band type indicators and, 63,
107-113,108,110, 111, 113(0
calculations for, 58-59
Commitment of Traders Report and, 262
Commodity Futures Trading Commission
(CFTC) and, 262
Crash of 1929 and, 261, 262
uncertainty measures, 77
underwater equity curve, 23
358
Index
ABOUT
THE
AUTHOR
Thomas Stridsman is a senior editor for Active Trader m a g a z i n e , trading consultant, and popular speaker at industry seminars a n d conferences. Previously, he wrote
for Futures magazine. Before moving to Chicago in 1997, Stridsman operated his
own Web-based trading advisory service in Sweden and w a s chair of the Swedish
Technical Analysts Federation.