Trading without Fear / Richard W. Arms, Jr.
Neural Network: Time Series Forecasting of Financial Mark& /E. Michael Azoff
Option Market Making I Alan I. Baird
Money Management Strategies for Futures Traders / Nauzer J. Balsara
Genetic Algorithms and Investment Strategies ! Richard Bauer
Managed Futures: An Investorâ€™s Guide/Beverly Chandler
Beyond Technical Analysis / Tushar Chande
The New Technical Trader / Tushar Chande and Stanley S. tioll
Trading on the Edge / Guido J. Deboeck
Cybernetic Trading Strategies
New Market Timing Techniques /Thomas R. DeMark
The New Science of Technical Analysis /Thomas R. DeMark
Developing a Profitable Trading System with
Point and Figure Charting/Thomas J. Dorsey
Trading for a Living I Dr. Alexander Elder
Study Guide for Trading for a Living ! Dr. Alexander Elder
The Day Traderâ€™s Manual I William F. Eng
Trading 101 I Sunny Harris
Analyzing and Forecasting Futures Prices/Anthony F. Herbst
Technical Analysis of the Options Markets I Richard Hexton
Murray A. Ruggiero, Jr.
New Commodity Trading Systems & Methods I Perry Kaufman
Understanding Options/Robert Kolb
The Intuitive Trader / Robert Koppel
McMillan on Options/Lawrence G. McMillan
Trading on Expectations / Brendaâ€ť Moynihan
Intermarket Technical Analysis /John J. Murphy
Forecasting Financial and Economic Cycles I Michael P. Niemira
Beyond Candlesticks/Steve Nison
Fractal Market Analysis I Edgar E. Peters
Forecasting Financial Markets I Tony Plummer
inside the Financial Futures Markets, 3rd Edition /Mark 1. Powers and
Mark G. Cast&no
Neural Networks in the Capital Markets/Paul Refenes
Cybernetic Trading Strategies /Murray A. Ruggiero, Jr.
Gaming the Market/Ronald B. Shelton
Option Strategies, 2nd Edition I Courtney Smith
Trader Vie II: Analytic Principles of Professional Speculation I ViCtOr Sperandeo
Campaign Trading/John Sweeney
Deciphering the Market / Jay Tadion
The Traderâ€™s Tax Survival Guide. Revised Edition /Ted Tesser
Tiger on Spreads / Phillip E. Tiger
The Mathematics of Money Management / Ralph Vine
The New Money Management I Ralph Vince
Portfolio Management Formulas / Ralph Wince
The New Money Management: A Framework for Asset Allocation / Ralph Vince
Trading Applications of Japanese Candlestick Charting / Gary Wagner and
JOHN WILEY & SONS, INC.
Selling Short I Joseph A. Walker
Trading Chaos: Applying Expert Techniques to Maximize Your PrOfitS /
New York Chichester Weinheim Brisbane Singapore Toronto
Bill Williams l l l l l
This text is printed on acid-free paper
Universal Seasonal is a trademark of Ruggiero Associates.
TradeStationâ€™s EasyLanguage is a trademark of Omega Research.
SuperCharts is a trademark of Omega Research.
TradeCycles is a trademark of Ruggiero Associates and Scientific Consultant Services.
XpertRule is a trademark of Attar Software.
DivergEngine is a trademark of Inside Edge Systems.
Copyright 0 1997 by Murray A. Ruggiero, Jr.
Published by John Wiley & Sons, Inc.
All rights reserved. Published simultaneously in Canada.
Reproduction or translation of any part of this work beyond
that permitted by Section 107 or 108 of the 1976 United
As we approach the end of one millennium and the beginning of another,
States Copyright Act without the permission of the copyright
computers have changed the way we think and act. In the field of finan-
owner is unlawful. Requests for permission or further
cial market analysis, the changes have been nothing short of revolution-
information should be addressed to the Permissions Department.
John Wiley & Sons, Inc. ary. Some of us remember when analysts charted the performance of
markets without the aid of computers. Believe me, it was slow and M) fun
This publication is designed to provide accurate and authoritative
at all. We spent hours constructing the charts before even getting to the
information in regard to the subject matter covered. It is sold
fun part-analyzing them. The idea of experimenting with indicators and
with the understanding fhat the publisher is not engaged in
rendering legal, accounting. or other professional services. If optimizing them was still decades away.
legal advice or other expert assistance is required, the services
The computer has removed the drudgery of market analysis. Any in-
of a competent professional person should be sought.
vestor can buy a computer and some inexpensive software and, in no time
Library of Congress Cataloging-in-P˜bficatian Data: at all, have as much data at his or her fingertips as most professional
money managers. Any and all markets can be charted, manipulated, over-
Ruggiero, Murray A., 1963-
laid on one another, measured against one another, and so on. In other
Cybernetic trading strategies : developing a profitable trading
words, we can do pretty much anything we want to with a few keystrokes.
sysfem with state-of-the-art technologies/by Murray A. Ruggiero,
Jr. The popularity of computers has also fostered a growing interest in tech-
cm. -(Wiley trading advantage)
P. nical market analysis. This visual form of analysis lends itself beauti-
fully to the computer revolution, which thrives on graphics.
ISBN O-471-14920-9 (cloth : alk. paper)
Up to now, however, the computer has been used primarily as a data-
1. Investment analysis. 2. Electronic trading of securities.
gathering and charting machine. It enables us to collect large amounts of
I. Title. II. Series.
HG4529.RS4 1 9 9 7
Mr. Murphy is CNBCâ€™s technical analyst, and author of Technical Analysis of the Futures
Printed in the United States of America. Markets and Inremarker Technical Analysis. His latest book, The Visual Investor (Wiley,
1996). applies charting techniquesto sector analysis and mutual fund investing.
vi Foreword Foreword vii
market information for display in easily understood chart pictures. The by validating what many of us have known for a long time-technical
fact is, however, most of us have only been scratching the surface where market analysis does work. But it can also be made better.
the computer is concerned. Weâ€™ve been using it primarily as a visual tool. Thereâ€™s much more to this book, having to do with state-of-the-art
Enter Murray A. Ruggiero, Jr., and Cybernetic Trading Straregies. thinking-for starters, chaos theory, fuzzy logic, and artificial intelli-
I first became aware of Murrayâ€™s work when he published an article gence-which leads us to some new concepts regarding the computer it-
titled â€śUsing Neural Nets for Intermarket Analysis,â€ť in Futures Maga- self. The computer can do more than show us pretty pictures. It can
zine. I subsequently did a series of interviews with him on CNBC in optimize, backtest, prove or disprove old theories, eliminate the bad
which he developed his ideas even further, for a larger audience. Iâ€™ve fol- methods and make the good ones better. In a way, the computer almost
lowed his work ever since, with growing interest and admiration (and oc- begins to think for us. And perhaps thatâ€™s the greatest benefit of Cyber-
casionally offered a little encouragement). Thatâ€™s why Iâ€™m delighted to netic Trading Strategies. It explores new ways to use the computer and
help introduce his first book. I do so for some selfish reasons: Murrayâ€™s finds ways to make a valuable machine even more valuable.
research validates much of the work I helped develop, especially in the Technical analysis started being used in the United States around the
field of intermarket analysis. Murrayâ€™s extensive research in that area beginning of the 20th century. Over the past 100 years, it has grown in
not only validates my earlier writings in that field but, I believe, raises in- both value and popularity. Like any field of study, however, technical
termarket analysis to a higher and more practical level. analysis continues to evolve. Intermarket Technical Analysis, which I
Not only does he provide statistical evidence that intermarket linkages wrote in 1991, was one step along that evolutionary path. Cybernetic
exist, but he shows numerous examples of how to develop trading systems Trading Strategies is another. It seems only fitting that this type of book
utilizing intermarket filters. Most traders accept that a positive correla- should appear as technical analysis begins a new century.
tion exists between bonds and stocks. How about utilizing a moving-
average filter on the bond market to tell us whether to be in the stock JOHN J. MURPHY
market or in T-Bills? One such example shows how an investor could have
outperformed the S&P500 while being in the market only 59 percent of
the time. Or how about utilizing correlation analysis to determine when
intermarket linkages are strong and when they are weak? That insight al-
lows a trader to use market linkages in trading decisions only when they
are most likely to work. I was amazed at how useful (and logical) these
techniques really were. But this book is more than a study of intermar-
On a much broader scale, traditional technical analysts should applaud
the type of work done by Murray and young writers like him. They are
not satisfied with relying on subjective interpretations of a â€śhead and
shoulders patternâ€ť or reading Elliott Waves and candlestick patterns.
They apply a statistical approach in order to make these subjective meth-
ods more mechanical. Two things are achieved by this more rigorous sci-
entific methodology. First, old techniques are validated by historical
backtesting. In other words, Ruggiero shows that they do work. Second,
he shows us how to use a more mechanical approach to Elliott Waves and
candlesticks, to make them even˜more useful; Murray does us all a favor
Advanced technologies are methods used by engineers, scientists, and
physicists to solve real-world problems that affect our lives in many un-
seen ways. Advanced technologies are not just rocket science methods;
they include applying statistical analysis to prove or disprove a given
hypothesis. For example, statistical methods are used to evaluate the ef-
fectiveness of a drug for treating a given illness. Genetic algorithms
have been used by engineers for many different applications: the de-
velopment of the layout of micro processors circuits, for example, or
the optimization of landing strut weights in aircraft. In general, com-
plex problems that require testing millions or even billions of combi-
nations to find the optimal answer can be solved using genetic
algorithms. Another method, maximum entropy spectral analysis or the
maximum entropy method (MEM), has been used in the search for new
oil reserves and was adapted by John Ehlers for use in developing trad-
ing strategies. Chaos, a mathematical concept, has been used by sci-
entists to understand how to improve weather forecasts. Artificial
intelligence was once used only in laboratories to try to learn how to
capture human expertise. Now, this technology is used in everything
from cars to toasters. These technologies-really just different ways
of looking at the world-have found their way to Wall Street and are
now used by some of the most powerful institutions in the world. John
x Preface Preface xi
HOW TO GET THE MOST OUT OF THIS BOOK
Deere Inc. manages 20 percent of its pension fund money using neural
networks, and Brad Lewis, while at Fidelity Investments, used neural
This book will introduce you to many different state-of-the-art methods
networks to select stocks.
for analyzing the market(s) as well as developing and testing trading sys-
You do not need to be a biophysicist or statistician to understand these
tems. In each chapter, I will show you how to use a given method or tech-
technologies and incorporate them into your technical trading system.
Cybernetic Trading Strategies will explain how some of these advanced nology to build, improve, or test a given trading strategy.
The first of the bookâ€™s five parts covers classical technical analysis
technologies can give your trading system an edge. I will show you
methodologies, including intermarket analysis, seasonality, and commit-
which technologies have the most market applicability, explain how they
ment of traders (COT) data. The chapters in Part One will show you how
work, and then help you design a technical trading system using these
to use and test classical methods, using more rigorous analysis.
technologies. Lastly, but perhaps most importantly, we will test these
Part Two covers many statistical, engineering, and artificial intelli-
gence methodologies that can be used to develop state-of-the-art trading
Although the markets have no single panacea, incorporating elements
systems. One topic I will cover is system feedback, a concept from sys-
of statistical analysis, spectra analysis, neural networks, genetic algo-
tem control theory. This technology uses past results to improve future
rithms, fuzzy logic, and other high-tech concepts into a traditional tech-
forecasts. The method can be applied to the equity curve of a trading sys-
nical trading system can greatly improve the performance of standard
tem to try to predict the results of future trades. Another topic is cycle-
trading systems. For example, I will show you how spectra analysis can
based trading using maximum entropy spectra analysis, which is used in
be used to detect, earlier than shown by classical indicators such as
oil exploration and in many other engineering applications. I apply this
ADX-the average direction movement indicator that measures the
method to analyzing price data for various commodities and then use this
strength of a trend-when a market is trending. I will also show you how
analysis to develop mechanical trading strategies.
to evaluate the predictive value of a given classical method, by using the
Part Three shows how to mechanize subjective methods such as Elliott
same type of statistical analysis used to evaluate the effectiveness of
Wave and candlestick charts. Part Four discusses development, imple-
drugs on a given illness.
mentation, and testing of trading systems. Here, I explain how to build
I have degrees in both physics and computer science and have been re-
and test trading systems to maximize reliability and profitability based
searching neural networks for over eight years. I invented a method for
embedding neural networks into a spreadsheet. It seemed a natural ex- on particular risk/reward criteria.
Finally, in Part Five, I show how to use many different methods from
tension to then try and apply what I have learned to predicting the mar-
the field of artificial intelligence to develop actual state-of-the-art trad-
kets. However, my early models were not very successful. After many
ing systems. These methods will include neural networks, genetic algo-
failed attempts, I realized that regardless of how well I knew the ad-
rithms, and machine induction.
vanced technologies, if I didnâ€™t have a clear understanding of the mar-
I would like to point out that many of the systems, examples, and charts
kets I was attempting to trade, the applications would prove fruitless. I
have different ending dates, even in the same chapter. This occurs be-
then spent the greater part of three years studying specific markets and
cause the research for this book is based on over one year of work, and
talking to successful traders. Ultimately, I realized that my systems
M)t all of the systems and examples in each chapter were compiled at the
needed a sound premise as their foundation.
My goals are: to provide you with the basics that will lead to greater
As you read the book, donâ€™t become discouraged if you donâ€™t under-
market expertise (and thus a reasonable premise on which to base your
stand a particular concept. Keep reading to get a general sense of the sub-
trades) and to show you how to develop reliable trading models using so-
ject. Some of the terminology may be foreign and may take some getting
called advanced technologies.
used to. Iâ€™ve tried to put the concepts in laypersonsâ€™ terminology, but the
fact remains that jargon (just like market terminology) abounds. After
you get a general feel for the material, reread the text and work through
the examples and models. Most of the examples are based on real sys-
tems being used by both experienced and novice traders. It has been my
goal to present real-world, applicable systems and examples. You wonâ€™t
find pie-in-the-sky theories here.
MURRAY A. RUGG˜ERO, JR.
East Haven, Connecticut
Whatever my accomplishments, they have resulted from the people
who have touched my life. I would like to thank all of them. First, my
loving wife Diana, who has stood beside me my whole career. While I
was building my business, she worked full-time and also helped me on
nights and weekends. Early in 1996, she left her job at Yale University
so we could work together. We make a great team, and I thank God for
such a wife, friend, and partner. I also thank my son, Murray III, for or-
derstanding why his daddy needs to work and for giving me focus. I
know that I must succeed, so that he can have a better life. Next, I thank
my parents, who raised me to work hard and reach for my dreams. I am
also indebted to Ilias Papazachariou for spending several weekends
helping me with researching, organizing, collecting, and editing the ma-
terial in this book.
Several of my professors and colleagues have helped me become who
I am. Dr. Charlotte LeMay believed in me more than I believed in myself.
It has been 12 years since I graduated from Western Connecticut State
University and she is still a good friend. She made me believe that if I
could dream it, I could do it.
Many friends in the futures industry have also helped me along the
way. I thank Ginger Szala, for giving me the opportunity to share my re-
search with the world in Futures Magazine, and John Murphy for giving
me a chance to meet a larger audience on CNBC, for being a good friend
and colleague, and for agreeing to write the Foreword of this book.
Finally, I thank Larry Williams. Larry has been very good to me over
the years and has helped me understand what it takes to be successful in
this business. Inside Advantage, my newsletter, began based on a sugges-
tion from Larry Williams. Larry has been a valued colleague, but, most
importantly, he is a friend whom I can always count on.
I know that I am forgetting people here; to everyone else who has
helped me along the way: Thank You!
PART ONE CLASSICAL MARKET PREDICTION
1 Classical Intermarket Analysis as a Predictive Tool 9
What Is Intermarket Analysis? 9
Using Intermarket Analysis to Develop Filters and Systems 27
Using Intermarket Divergence to Trade the S&P500 29
Predicting T-Bonds with Intermarket Divergence 32
Predicting Gold Using Intermarket Analysis 35
Using Intermarket Divergence to Predict Crude 36
Predicting the Yen with T-Bonds 38
Using Intermarket Analysis on Stocks 39
2 Seasonal Trading 42
Types of Fundamental Forces 42
Calculating Seasonal Effects 43
Measuring Seasonal Forces 43
The RuggierolBarna Seasonal Index 45
Static and Dynamic Seasonal Trading 45
Judging the Reliability of a Seasonal Pattern 46
Counterseasonal Trading 47
xvi contents contents xvii
Conditional Seasonal Trading 47 Using Cycles to Detect When a Market Is Trending 109
Other Measurements for Seasonality 48 Adaptive Channel Breakout 114
Best Long and Short Days of Week in Month 49 Using Predictions from MEM for Trading 115
Trading Day-of-Month Analysis 51
Day-of-Year Seasonality 52 119
Combining Statistics and Intermarket Analysis
Using Seasonality in Mechanical Trading Systems 53
Using Correlation to Filter Intermarket Patterns 119
Counterseasonal Trading 55
Predictive Correlation 123
Using the CRB and Predictive Correlation to Predict Gold 124
Long-Term Patterns and Market Timing for Interest
Intermarket Analysis and Predicting the Existence of a Trend 126
Rates and Stocks 60
Inflation and Interest Rates 60
Using Statistical Analysis to Develop Intelligent Exits
Predicting Interest Rates Using Inflation 62
Fundamental Economic Data for Predicting Interest Rates 63 The Difference between Developing Entries and Exits 130
A Fundamental Stock Market Timing Model 68 Developing Dollar-Based Stops 13 1
Using Scatter Charts of Adverse Movement to Develop Stops 132
Trading Using Technical Analysis 70 Adaptive Stops 137
Why Is Technical Analysis Unjustly Criticized? 70
Using System Feedback to Improve Trading
Profitable Methods Based on Technical Analysis 73
The Commitment of Traders Report 86 How Feedback Can Help Mechanical Trading Systems 140
How to Measure System Performance for Use as Feedback 141
What Is the Commitment of Traders Report? 86
Methods of Viewing Trading Performance for Use as Feedback 141
How Do Commercial Traders Work? 87
Walk Forward Equity Feedback 142
Using the COT Data to Develop Trading Systems 87
How to Use Feedback to Develop Adaptive Systems or Switch
between Systems 147
PART TWO STATISTICALLY BASED MARKET PREDICTION Why Do These Methods Work? 147
A Traderâ€™s Guide to Statistical Analysis 95
11 An Overview of Advanced Technologies
Mean. Median, and Mode 96
The Basics of Neural Networks 149
Types of Distributions and Their Properties 96
Machine Induction Methods 153
The Concept of Variance and Standard Deviation 98
Genetic Algorithms-An Overview 160
How Gaussian Distribution, Mean, and Standard
Developing the Chromosomes 161
Deviation Interrelate 98
Evaluating Fitness 162
Statistical Testsâ€™ Value to Trading System Developers 99
Initializing the Population 163
Correlation Analysis 101
The Evolution 163
Updating a Population 168
Cycle-Based Trading 103
Chaos Theory 168
Statistical Pattern Recognition 171
The Nature of Cycles 105
Cycle-Based Trading˜in the Real World 108 Fuzzy Logic 172
Xâ€ťlll contents xix
PART THREE MAKING SUBJECTIVE METHODS MECHANICAL PART FIVE USING ADVANCED TECHNOLOGIES TO DEVEIOP
How to Make Subjective Methods Mechanical
Data Preprocessing and Postprocessing
Totally Visual Patterns Recognition 180
Subjective Methods Definition Using Fuzzy Logic 180 Developing Good Preprocessing-An Overview 241
Human-Aided Semimechanical Methods 180 Selecting a Modeling Method 243
Mechanically Definable Methods 183 The Life Span of a Model 243
Mechanizing Subjective Methods 183 Developing Target Output(s) for a Neural Network 244
Selecting Raw Inputs 248
13 Building the Wave Developing Data Transforms 249
Evaluating Data Transforms 254
An Overview of Elliott Wave Analysis 184
Data Sampling 257
Types of Five-Wave Patterns 186
Developing Development, Testing, and Out-of-Sample Sets 257
Using the Elliott Wave Oscillator to Identify the Wave Count 187
Data Postprocessing 258
TradeStation Tools for Counting Elliott Waves 188
Examples of Elliott Wave Sequences Using Advanced GET 194
Developing a Neural Network Based on Standard
14 Mechanically Identifying and Testing Candlestick Patterns Rule-Based Systems
A Neural Network Based on an Existing Trading System 259
How Fuzzy Logic Jumps Over the Candlestick 197
Developing a Working Example Step-by-Step 264
Fuzzy Primitives for Candlesticks 199
Developing a Candlestick Recognition Utility Step-by-Step 200
Machine Learning Methods for Developing
PART FOUR TRADING SYSTEM DEVELOPMENT AND TESTING
Using Machine Induction for Developing Trading Rules 281
15 Developing a Trading System 209 Extracting Rules from a Neural Network 283
Combining Trading Strategies 284
Steps for Developing a Trading System 209
Postprocessing a Neural Network 285
Selecting a Market for Trading 209
Variable Elimination Using Machine Induction 286
Developing a Premise 211
Evaluating the Reliability of Machine-Generated Rules 287
Developing Data Sets 211
Selecting Methods for Developing a Trading System 212
20 Using Genetic Algorithms for Trading Applications
Designing Entries 214
Developing Filters for Entry Rules 215 Uses of Genetic Algorithms in Trading 290
Designing Exits 216 Developing Trading Rules Using a Genetic Algorithm-
Parameter Selection and˜optimization 217 An Example 293
Understanding the System Testing and Development Cycle 217
Designing an Actual System 218 References and Readings 307
16 Testing, Evaluating, and Trading a Mechanical I n d e x 310
The Steps for Testing and Ev&ating a Trading System 226
Testing a Real Trading System 231
During the past several years, I have been on a quest to understand how
the markets actually work. This quest has led me to researching almost
every type of analysis. My investigation covered both subjective and ob-
jective forms of technical analysis-for example, intermarket analysis,
Elliott Wave, cycle analysis, and the more exotic methods, such as neural
networks and fuzzy logic. This book contains the results of my research.
My goal was to discover mechanical methods that could perform as
well as the top traders in the world. For example, there are technologies
for trading using trend following, which significantly outperform the leg-
endary Turtle system. This book will show you dozens of trading systems
and filters that can increase your trading returns by 200 to 300 percent.
I have collected into this volume the best technologies that I have discov-
ered. This overview of the bookâ€™s contents will give you the flavor of
what you will be learning.
Chapter 1 shows how to use intermarket analysis as a predictive tool.
The chapter first reviews the basics of intermarket analysis and then,
using a chartistâ€™s approach, explains the many different intermarket re-
lationships that are predictive of stocks, bonds, and commodities. That
background is used to develop fully mechanical systems for a variety of
markets, to show the predictive power of intermarket analysis. These mar-
kets include the S&P500, T-Bonds, crude oil, gold, currencies, and more.
Most of these systems are as profitable as some commercial systems cost-
ing thousands of dollars. For example, several T-Bond trading systems
have averaged over $10,000 a year during the analysis period.
Chapter 2 discusses seasonal trading, including day-of-the-week,
monthly, and annual effects. You will learn how to judge the reliability
2 Introduction Introduction 3
by professional traders to exploit inefficiencies in the markets and make
of a seasonal trade and how to develop reliable and profitable seasonal in-
money. These strategies range from position to day trading.
dexes. Several winning methods for using seasonality were developed
Chapter 5 explains what the commitment of traders (COT) report is,
using a walk forward approach in which the seasonal is calculated only
how it is reported, and how to use it to develop market timing models.
using prior data for trading stocks, bonds, and corn. This means that these
Several system examples are provided.
results are more realistic than the standard seasonal research normally
Chapter 6 is an overview of how general statistical analysis can be ap-
available and are very profitable. The chapter also discusses several is-
plied to trading. To make you a more profitable trader, the following sta-
sues relating to rhe proper use of seasonality. For example, in some mar-
tistical measures are discussed:
kets, such as corn or other commodities that are grown, all of the available
data should be used to calculate a seasonal. In markets like T-Bonds,
Mean, median, and mode
where seasonal forces are influenced by the release of government re-
ports, only the past N years are used because these dates change over Types of distributions and their properties
time. Finally, several new seasonal measures are presented, beginning Variance and standard deviation.
with the Ruggiero/Barna Seasonal Index. This new indicator combines
Interrelation of gaussian distribution, mean, and standard deviation.
the win percentage (Winâ€™%) and returns into one standardized measure
Statistical tests that are of value to trading system developers
that outperforms standard ways of selecting which seasonal patterns to
trade. For example, 71 percent of our trades can be won by using the Rug- Correlation analysis.
giero/Barna Seasonal Index to trade T-Bonds using walk forward analy-
This chapter serves as a background to much of the rest of the book.
sis. Next, two other new indicators are explained: (1) seasonal volatility
Chapter 7 first explains the nature of cycles and how they relate to
and (2) the seasonal trend index based on the trading day of the year. The
real-world markets. Later, you will see how cycles can be used to develop
seasonal volatility measure is valuable for setting stops: for example,
actual trading strategies using the, maximum entropy method (MEM), or
when seasonal volatility is high, wider stops can be used, and when it is
maximum entropy spectral analysis. MEM can be used to detect whether
low, tighter stops can be used. This measure is also good for trading op-
a market is currently trending, or cycling, or is in a consolidation mode.
tions, that is, for selling at premium when seasonal volatility is falling. I
Most important, cycles allow discovery of these modes early enough to be
use my seasonal trend index to filter any trend-following system. The
of value for trading. A new breakout system, called adaptive channel
power of this seasonal trend index was exhibited when it predicted the
breakout, actually adapts to changing market conditions and can therefore
trend in T-Bonds starting in mid-February of 1996. By taking the down-
be used to trade almost any market. During the period from l/1/80 to
side breakout in T-Bonds during that month, when our seasonal trend in-
9/20/96, this system produced over $160,000.00 on the Yen with a draw-
dicator was crossing above 30, I caught a short signal worth about
down of about $8,700.00. Finally, the chapter tells how MEM can be used
$9,000.00 per contract in only a month and about $13,000.00 in only eight
to predict turning points in any market.
Chapter 8 shows how combining statistics and intermarket analysis
Chapter 3 shows how fundamental factors such as inflation, consumer
can create a new class of predictive trading technology. First, there is a
confidence, and unemployment can be used to predict trends in both in-
revisit to the intermarket work in Chapter 1, to show how using Pearsonâ€™s
terest rates and stocks. For example, one market timing model has been
correlation can significantly improve the performance of an intermarket-
90 percent accurate since August 1944, and would have produced better
based system. Several trading system examples are provided, including
than the standard 10 to 12 percent produced by buy and hold and was in
systems for trading the S&P500, T-Bonds, and crude oil. Some of the sys-
the market about half the time.
tems in this chapter are as good as the high-priced commercial systems.
Chapter 4 discusses traditional technical analysis, beginning with why
The chapter also discusses a new indicator, predictive correlation, which
some people say technical analysis does not work and why they are wrong.
actually tells how reliable a given intermarket relationship currently is
Several powerful trading strategies based on technical analysis are used
Chapter 17 discusses data preprocessing, which is used to develop
when predicting future market direction. This method can often cut draw-
models that require advanced technologies, such as neural networks. The
down by 25 to 50 percent and increase the percentage of winning trades.
chapter explains how to transform data so that a modeling method (e.g.,
Intermarket analysis can be used to predict when a market will have a
neural networks) can extract hidden relationships-those that normally
major trend. This method is also good at detecting runaway bull or bear
cannot be seen. Many times, the outputs of these models need to be
markets before they happen.
processed in order to extract what the model has learned. This is called
Chapter 9 shows how to use the current and past performance of a
given system to set intelligent exit stops and calculate the risk level of a
What is learned in Chapter 17 is applied in the next three chapters.
given trade. This involves studying adverse movement on both winning
Chapter 18 shows how to develop market timing models using neural
and losing trades and then finding relationships that allow setting an op-
networks and includes a fully disclosed real example for predicting the
timal level for a stop.
S&P500. The example builds on many of the concepts presented in ear-
In Chapter 10, system control concept feedback is used to improve the
lier chapters, and it shows how to transform rule-based systems into
reliability and performance of an existing trading strategy. You will learn
supercharged neural network models.
how feedback can help mechanical trading systems and how to measure
Chapter 19 discusses how machine learning can be used to develop
system performance for use in a feedback model. An example shows the
trading rules. These rules assist in developing trading systems, selecting
use of a systemâ€™s equity curve and feedback to improve system perfor-
inputs for a neural network, selecting between systems, or developing
mance by cutting drawdown by almost 50 percent while increasing the
consensus forecasts. The rules can also be used to indicate when a model
average trade by 84 percent. This technology is little known to traders
developed by another method will be right or wrong. Machine learning is
but is one of the most powerful technologies for improving system per-
a very exciting area of research in trading system development.
formance. The technology can also be used to detect when a system is no
Chapter 20 explains how to use genetic algorithms in a variety of
longer tradable-before the losses begin to accumulate.
Chapter 11 teaches the basics of many different advanced technolo-
gies, such as neural networks, machine induction, genetic algorithms, sta-
Developing trading rules
tistical pattern recognition, and fuzzy logic. You will learn why each of
Switching between systems or developing consensus forecasts.
these technologies can be important to traders.
The next three chapters tell how to make subjective analysis mechani- Choosing money management applications.
cal. Chapter 12 overviews making subjective methods mechanical. In Evolving a neural network.
Chapter 13, I explain Tom Josephâ€™s work, based on how to identify me-
chanical Elliott Wave counts. Actual code in TradeStationâ€™s EasyLanguage The key advantage of genetic algorithms is that they allow traders to
is included. In Chapter 14, I develop autorecognition software for identi- build in expertise for selecting their solutions. The other methods pre-
fying candlestick patterns. A code for many of the most popular forma- sented in this book do not offer this feature. Following a discussion of
tions, in EasyLanguage, is supplied. how to develop these applications, there is an example of the evolution of
The next topic is trading system development and testing. Chapter 15, a trading system using TSEvolve, an add-in for TradeStation, which links
on how to develop a reliable trading system, will walk you through the de- genetic algorithms to EasyLanguage. This example combines intermarket
velopment of a trading system from concept to implementation. Chap- analysis and standard technical indicators to develop patterns for T-Bond
ter 16 then shows how to test, evaluate, Andy trade the system that has been market trades.
In the final chapters, I combine what has˜been presented earlier with
advanced methods, such as neural networks and genetic algorithms, to
develop trading strategies.
Analysis as a Predictive Tool
WHAT IS INTERMARKET ANALYSIS?
Intermarket analysis is the study of how markets interrelate. It is valuable
as a tool that can be used to confirm signals given by classical technical
analysis as well as to predict future market direction. John J. Murphy,
CNBCâ€™s technical analyst and the author of Intermarket Technical Analy-
sis (John Wiley & Sons, 1991), is considered the father of this form of
analysis. In his book, Murphy analyzes the period around the stock mar-
ket crash of October 19, 1987, and shows how intermarket analysis
warned of impending disaster, months before the crash. Letâ€™s examine
some of the intermarket forces that led to the 1987 stock market crash.
Figure 1.1 shows how T-Bonds began to collapse in April 1987, while
stocks rallied until late August 1987. The collapse in the T-Bond market
was a warning that the S&P500 was an accident waiting to happen; nor-
mally, the S&P500 and T-Bond prices are positively correlated. Many
institutions use the yield on the 30-year Treasury and the earnings per
share on the S&P500 to estimate a fair trading value for the S&P500.
This value is used for their asset allocation models.
T-Bonds and the S&P500 bottomed together on October 19, 1987, as
shown in Figure 1.2. After that, both T-Bonds and the S&P500 moved in
a trading range for several months. Notice that T-Bonds rallied on the
Classical Intermarket Analysis as a Predictive Tool 11
day of the crash. This was because T-Bonds were used as a flight to
T-Bond yields are very strongly correlated to inflation; historically,
they are about 3 percent, on average, over the Consumer Price Index
(CPI). Movements in the Commodity Research Bureau (CRB) listings
are normally reflected in the CPI within a few months. In 1987, the CRB
had a bullish breakout, which was linked to the collapse in the T-Bond
market. This is shown in Figure 1.3. The CRB, a basket of 21 commodi-
ties, is normally negatively correlated to T-Bonds. There are two differ-
ent CRB indexes: (1) the spot index, composed of cash prices, and (2) the
CRB futures index, composed of futures prices. One of the main differ-
ences between the CRB spot and futures index is that the spot index is
more influenced by raw industrial materials.
I\ s Eurodollars, a measure of short-term interest rates, are positively cor-
87 F M I\ M J J
related to T-Bonds and usually will lead T-Bonds at turning points. Fig-
FIGURE 1.1 The S&P500 versus T-Bonds from late December 1986 to
ure 1.4 shows how a breakdown in Eurodollars preceded a breakdown in
mid-September 1987. Note how stocks and T-Bonds diverged before the
T-Bonds early in 1987.
FIGURE 1.3 T-Bonds versus the CRB from October 1986 to June 1987.
The bullish breakout in the CRB in late March 1987 led to the collapse in
FIGURE 1.2 The S&P500 vews T-Bonds from mid-September 1987 to
the T-Bond market in April 1987.
early May 1988. T-Bonds bottomed on Black Monday, October 19, 1987.
Classical Market Prediction
FIGURE 1.4 T-Bonds versus the Eurodollar for the period September
1986 to May 1987. The breakdown in Eurodollars in late January 1987
preceded the collapse in the T-Bond market in April 1987.
Figure 1.5 shows how the gold market began to accelerate to the upside
just as Eurodollars began to collapse. Gold anticipates inflation and is
usually negatively correlated with interest-rate-based market rates such
as the Eurodollar.
Analysis of the period around the crash of 1987 is valuable because
many relationships became exaggerated during this period and are easier
to detect. Just as a total solar eclipse is valuable to astronomers, techni-
cal analysts can learn a lot by studying the periods around major market
Given this understanding of the link between the S&P500 and
T-Bonds, based on the lessons learned during the crash of 1987, we will
now discuss intermarket analysis for the S&P500 and T-Bonds in more
Figure 1.6 shows that T-Bonds peaked in October 1993, but the
S&P500 did not peak until February 1994. The collapse of the bond mar- FIGURE 1.6 The S&P500 versus T-Bonds for the period August 1993 to
ket in early 1994 was linked to the major correction in the S&PSOO, dur- April 1994. The 1994 bear market in T-Bonds led to the Iare March
ing late March. correction in the S&PSOO.
14 Classical Market Prediction
T-Bonds continued to drop until November 1994. During this time, the
S&P500 was in a trading range. The S&P500 set new highs in February
1995 after T-Bonds had rallied over six points from their lows. This ac-
tivity is shown in Figure 1.7.
Figure 1.8 shows the Eurodollar collapse very early in 1994. This col-
lapse led to a correction in the stock market about two weeks later. This
correction was the only correction of more than 5 percent during all of
1994 and 1995.
Figure 1.9 shows that the Dow Jones Utility Average (DJUA) also led
the S&P.500 at major tops. The utilities topped in September 1993-a
month before bonds and five months before stocks.
Figure 1.10 shows that the S&P500 and DJUA both bottomed together
in November 1994.
With this background in intermarket relationships for the S&P500,
letâ€™s IH˜W discuss the T-Bond market. FIGURE 1.8 The S&P500 versus Eurodollars for the period September
1993 to May 1994. The collapse in Eurodollars was linked to the late
March 1994 correction in the stock market.
FIGURE 1.9 The S&P500 versus the Dow Jones Utility Average for the
FIGURE 1.7 The S&P500 verws T-Bonds for the period September
period July 1993 to March 1994. The DJUA peaked in September 1993.
1994 to May 1995. When T-Bonds bottomed in November 1994, stocks
Stocks did not peak until February 1994.
did not break the February 1994 highs until F&br&ry 1995.
16 Classical Market Prediction
FIGURE 1.11 The T-Bond market versus the Down Jones Utility
Average. The DJUA peaked a few weeks before T-Bonds in late 1993
14 5 A. ;;â€™ .;. ,$;. ˜;, pi. i
FIGURE 1.10 The S&P500 versus the Dow Jones Utility Average for the
period August 1994 to April 1995. The S&P500 and the DJUA bottomed
together in November 1994 and rallied together in 1995.
Figure 1.11 shows that the Dow Jones Utility Average (DJUA) led the
bond market at the top during several weeks in late 1993. The DJUA is
made up of two different components: (1) electrical utilities and (2) gas
utilities. Before T-Bonds turned upward in late 1994, the electrical util-
ities began to rally. This rally was not seen in the DJUA because the gas
utilities were in a downtrend. This point was made during the third quar-
ter of 1994 by John Murphy, on CNBCâ€™s â€śTech Talk.â€ť Figure 1.12 shows
how the electrical utilities are correlated to T-Bond future prices.
One of the most important things that a trader would like to know is
whether a current rally is just a correction in a bear market. The Dow
20 Bond Index, by continuing to make lower highs during 1994, showed
that the rally attempts in the T-Bond market were just corrections in a
bear market. This is shown in Figure 1.13. The Dow 20 Bond Index is T-Bonds versus the Philadelphia electrical utility average
predictive of future˜T-Bond movements, but it has lost some of its pre- for the period August 1994 to February 1995. The electrical average
dictive power for T-Bonds because it includes some corporate bonds turned up before T-Bonds in late 1994.
FIGURE 1.14 T-Bonds versus high-grade copper. Copper bottomed in
late 1993 just as T-Bonds topped.
FIGURE 1.13 T-Bonds versus the Dow 20 Bond Index for the period
March 1994 to November 1994. The Dow 20 Bond Index is in a
downtrend, and short-term breakouts to the upside fail in the T-Bond
that are convertible to stock. This property also makes the Dow 20 Bond
Index a very good stock market timing tool.
Copper is inversely correlated to T-Bonds, as shown in Figure 1.14.
The chart shows that copper bottome˜d in late 1993, just as the T-Bond
market topped. The copper-T-Bond relationship is very stable and reli-
able; in fact, copper is a more reliable measure of economic activity than
the CRB index.
Many other markets have an effect on T-Bonds. One of the most im-
portant markets is the lumber market. Lumber is another measure of the
strength of the economy. Figure 1.15 shows how T-Bonds have an inverse
relationship to lumber and how lumber is predictive of T-Bonds.
Crude oil prices, another measure of inflation, are inversely correlated FIGURE 1.15 T-Bonds versus lumber from late September 1995 to the
to both T-Bonds and the Dollar index. The inverse correlation of crude oil end of March 1996. Lumber was in a downtrend during late 1995 while
and T-Bonds is depicted in Figure 1.16. T-Bonds were rising.
Classical Market Prediction
20 Classical Intermarket Analysis as a Predictive Tool 21
TABLE 1.1 T-BONDS VERSUS
Stock Group Relationship to T-Bonds
S&P500 Chemical Croup Negative
S&P500 Aluminum Index Negative
S&P500 croup Steel Negative
S&P500 Oil Composite Negative
S&P500 Saving and Loans Positive
S&P500 Life Insurance Positive
foreign currencies are positively correlated. On a longer-term basis, this re-
lationship makes sense. When interest rates drop, Dollar-based assets be-
come less attractive to investors and speculators. Foreign currencies gain
a competitive edge, and the Dollar begins to weaken. Freeburgâ€™s research
has also shown that the link between T-Bonds and foreign currencies is
Jwl JUI SW
npr w AUII
FIGURE 1.16 T-Bonds versus crude oit. In general, T-Bonds and crude
oil have a negative relationship.
Many other markets are predictive of T-Bonds. For example, many of
the S&P500 stock groups have strong positive or negative correlation to
T-Bond prices. Some of these groups and their relationships are shown in
We will now discuss the Dollar, which is normally negatively corre-
lated with the CRB and gold. Figure 1.17 shows that the breakout in gold
in early 1993 led to a double top in the Dollar. Later, when gold and the
CRB stabilized at higher levels, the Dollar had a major decline, as shown
in Figure 1.17.
Letâ€™s now look at foreign currencies, The Deutsche Mark (D-Mark)
was in a major downtrend during 1988 and 1989 and so was Comex gold.
The D-Mark and gold broke out of the downtrend at the same time, as *.. .*-.,, .,
shown in Figure 1.18. 93 91 91
Another intermarket that has a major effect on the currencies is FIGURE 1.17 The Dollar index, Comex gold, and the CRB index weekly
T-Bonds. In the December 1993 issue of Formula Research, Nelson Free- from mid-1992 to early 1995. The breakout in the CRB and gold in early
burg discussed the link between T-Bonds and the currencies. T-Bonds and 1995 was linked to a double top and then a collapse in the Dollar.
T-Bonds versus the Yen for the period late January 1996
to late July 1996. T-Bonds and the Yen are positively correlated.
FIGURE 1.18 The weekly chart of the D-Mark versus Comex gold for
the period early 1988 to late 1990. Both the D-Mark and gold were in a
downtrend that was broken in late 1989.
stronger than the link between T-Bills or Eurodollars and currencies. Fig-
ure 1.19 shows the link between the Yen and T-Bonds.
Our next subject is the precious metals-gold, silver, and platinum.
Figure 1.20 shows that, on a weekly basis, gold, silver, and platinum move
together, and silver and platinum usually turn a few days before gold at
major turning points.
Letâ€™s now see how the gold stocks can be used to predict gold prices.
The XAU (Philadelphia gold and silver index) usually leads gold at major
turning points. Figure 1.21 shows that the gold stocks bottomed about
three months before gold did. The gold stocks also had a bigger percent-
age of increase because the gold stocks are leveraged. For example, if
XYZ Mines has a production cost of $330.00 per ounce and gold is sell-
ing for $350.00, then XYZ will make $20.00 an ounce. If gold rises to
Comex gold, Comex silver, and platinum on a weekly
$370.00 an ounce, XYZ has doubled its profits.
basis for the period early 1993 to late 1995. The three metals move
Figure 1.22 shows that the double top in gold stocks contributed to the
breakdown in gold.
Classical Intermarket Anal& as a Predictive Tent
Turning now to crude oil, Figure 1.23 shows that crude is negatively
correlated to the Dollar. Notice that the rally in the Dollar during late
1993 was linked to the collapse of crude oil down to its lows around
$14.00 a barrel.
When the Dollar collapsed during early 1994, it caused crude to rally
to over $20.00. When the dollar stabilized, crude prices dropped, as
shown in Figure 1.24.
We will now examine the link between oil stocks and crude oil. As Fig-
ure 1.25 shows, the X01 (Philadelphia oil stock index) turns either with
or a few days ahead of crude oil.
Figure 1.26 shows that the X01 link to crude can disappear. The X01
rose as part of a bull move in the general market during 1995. When the
dollar bottomed and began to stabilize, crude collapsed even though the
X01 was rallying.
Now that you have a basic understanding of intermarket relationships
FIGURE 1.21 Comex gold versus the XAU index for the period
for various markets, letâ€™s apply it to developing subcomponents for me-
September 1992 to May 1993. The XAU bottomed 3.S months before
chanical trading systems. Most intermarket relationships between the
gold in early 1993.
FIGURE 1.22 Comex gold versus the XAU during the period May 1993
FIGURE 1.23 Crude oil verws the Dollar index. An uptrend in the
to December 1993. A double top in the XAU led to the collapse of gold in
Dollar during late 1993 was linked to a collapse in crude.
Classical Intermarket Analysis as a Predictive Tool 27
FIGURE 1.24 Crude oil for the period October 1993 to June 1994. As
the dollar topped, crude began to bottom and then rallied to over $20 a
barrel in June 1994. FIGURE 1.26 Crude oil versus the XOI for the period December 1994
to August 1995. Sometimes the link between crude and the XOI can
break down. Here, the XOI decoupled from oil as part of a stock market
market you are trading (Traded Market) and another commodity (X) can
be classified as shown in Table 1.2.
Having gained an understanding of the theory behind how different
markets may interact, letâ€™s use these interactions to develop trading
methodologies that give us an edge.
USING INTERMARKET ANALYSIS TO DEVELOP
FILTERS AND SYSTEMS
The S&P500 futures contract rose about 410.55 points during its 3,434-
day trading history as of early February 1996. This represents an average
rise of about 0.120 point per day or $60.00 per day on a futures contract.
Letâ€™s now examine how the S&P500 has done when T-Bonds are above or
FIGURE 1.25 Crude oil versus the XOI from late July 1994 to March
below their 26.day moving average. The theory is: You should be long
1995. The XOI normally leads Wins in the crude oit market.
Classical Market Prediction
28 Classical Intermarket Analysis as a Predictive TOOI 29
Letâ€™s now look at how we can use the relationship between Eurodollars
TABLE 1.2 TYPES OF INTERMARKET RELATIONSHIPS.
and the S&P500, employing the ratio of Eurodollars/S&PSOO. We would
have been bullish when the ratio was above its IO-day moving average,
X is in an uptrend Buy Traded Market and bearish when it was below. When this ratio was above its average,
X is in a downtrend Sell Traded Market
the market rose 457.85 points in only 1,392 days, or 0.3289 point per day.
X is in an uptrend Sell Traded Market
When it was bearish, the market fell 91.35 points in 1,903 days, or -0.048
X is in a downtrend Buy Traded Market
X is up and Traded Market is down Buy Traded Market point per day. You would have outperformed buy and hold by 11.6 percent
X is down and Traded Market is up Sell Traded Market while being in the market only about 40 percent of the time. When this
X is down and Traded Market is down Buy Traded Market model is bullish, the market rises 77 percent of the time; when it is bear-
X is up and Traded Market is up Sell Traded Market ish, it falls 66 percent of the time.
If X/Traded Market > average (X/Traded Market) Buy Traded Market
How can simple intermarket relationships be used to give us a statis-
if X/Traded Market < average (X/Traded Market) Sell Traded Market
tical edge in the bond market? Using the Philadelphia Utilities average
If X/Traded Market < average (X/Traded Market) Buy Traded Market
If X/Traded Market > average (X/Traded Market) Sell Traded Market as an example, we will buy T-Bonds when this average crosses above its
moving average and sell when it crosses below. By using these simple
X is an intermarket used in your study.
rules, a 40-day simple moving average works best. During the period
from l/4/88 to 5/13/96, this simple model produced $72,225.00 on 133
trades-an average trade of $543.05, after $50.00 slippage and commis-
only when you are above the moving average, and be short only when you sions. The drawdown was high (almost -$lS,OOO.OO), but it does show
are below it. We are using the 67/99 type back-adjusted continuous con- that this data series is predictive of T-Bonds.
tract supplied by Genesis Financial Data Services. without slippage and Letâ€™s now discuss trading crude oil. We showed earlier that crude oil
commissions. Using these simple rules, you would have been long 2,045 is inversely correlated to the Dollar. How can we use this information to
days and short 1,389 days. During this time, the market rose an average help predict crude oil? We will buy crude when the Dollar is below its
of 0.204 point per day when you would have been long, and fell an aver- moving average and sell it when it is above. We tested parameters for this
age of -0.0137 point when you would have been short. This means that moving average between 10 and 50, in steps of 2. We will use a continu-
you would have outperformed the S&P500 while being in the market only ous backadjusted contract for our analysis.
59 percent of the time. During the other 41 percent of the time, you would All but four of these parameters were profitable on both sides of the
have been in a money market earning interest risk-free. By subdividing market. Over three-fourths of them made more than $40,000.00. The best
the market, based on whether T-Bonds were trending up or down, we pro- combination, based on both performance and robustness, was a 40-day
duced two subsets of days, and their distributions are very different from moving average.
those of the complete data set. Table 1.3 shows the results using a 40-day moving average for the pe-
We can also use the ratio between two markets. As an example, letâ€™s riod from 1 l/20/85 to 5/17/96, with $50.00 deducted for slippage and
look at the ratio of T-Bonds to the S&PSOO. When this ratio is above its commissions.
28&y average, you buy; when itâ€™s below, you sell. Once again, this sim-
ple method would have outperformed buy and hold. This simple ratio test
made 424.00 points on the long side in 1,740 days, or 0.2437 point per USING INTERMARKET DIVERGENCE TO TRADE THE S&P500
day. It also made 47.75 points on the short side in 1,650 days, or -0.028
point per day. Divergence is a valuable concept in developing trading systems. Com-
When it was long, the market moved higher 70 percent of the time; bining divergence and intermarket analysis, we define intermarket diver-
when it was short, it moved lower 56 percent of the time. gence as the traded market moving in an opposite direction to what was
Classical Market Prediction Classical Intermarket Analysis as a Predictive TOOI 31
TABLE 1.4 S&P500/T-BOND DIVERGENCE MODEL
TABLE 1.3 SIMPLE CRUDE/DOLLAR SYSTEM.
Net profit $56,421 .OO
Profit long MAkâ€ť MAkâ€ť
Profit short Short Proiit Drawdown Trades Win%
S&P500 T-Bonds Net Prolit Long Profit
16 26 $348,175.00 $267,225.00 580,950.OO -1628S25.00 130 68 %
Average trade $316.97
12 30 344.675.00 265,475.OO 79,200.OO -26,125.OO 124 69
12 26 341,275.OO 263.775.00 77,500.OO -26,125.OO 130 68
Profit factor 2.02
14 26 333.975.00 260.100.00 73.825.00 -31.675.00 130 68
Profit factor = Cross profit/Crors losses.
expected. If we trade the S&P500, for example, T-Bonds rising and the
the S&P500, we discovered some very valuable relationships. First,
S&P500 falling would be divergence. On the other hand, if we trade
among all of the markets we have used as intermarkets to predict the
T-Bonds, gold rising and T-Bonds rising would also be defined as diver-
S&P500, T-Bond futures are the best for developing systems that hold
gence because these two markets should be negatively correlated.
overnight positions. We also found that using the moving average rather
Using an add-in we developed for both SuperChartsTM and Trade-
StationrM, we were able to easily test intermarket divergence as a method than the price momentum between the two markets works better for these
that would yield a statistical edge. longer-term systems. Our results were very robust, and similar sets of
We tested two different types of intermarket divergence. The first is parameters gave us very similar results.
a simple momentum of both the intermarket and the market being traded. For longer holding periods, T-Bonds are the most predictive of the
The second compares the current prices of both the intermarket and the S&P500. Letâ€™s analyze the effect of T-Bonds, T-Bills, or Eurodollars on
traded market to their respective moving averages. predicting whether the S&P500 will close higher or lower than its open-
Letâ€™s now analyze how divergence between T-Bonds and the S&P500 ing average.
This is the same period we used earlier, so once again buy and hold is
can be used to build trading systems for the S&P500. We will optimize
across the complete data set in order to simplify our examples. Normally, about $193,000.00. Letâ€™s look at our results, with $50.00 deducted for
when these types of systems are developed, there are at least two sets of slippage and commissions.
data. One is used for developing parameters and the second is used to Our research showed that Eurodollars are better than T-Bonds for pre-
dicting price movements on an open-to-close basis. We also found that
test them on new data. We used backadjusted continuous contracts for
the period from 4/21/82 to 2/7/96. During the data period used, buy and using simple differences in our divergence patterns, rather than prices
hold was about $193,000.00. above or below a moving average, worked better for this type of short-
term trading, Table 1.5 examines the best overall sets of parameters, with
Letâ€™s first analyze how divergence between the S&P500 and T-Bonds
$50.00 deducted for slippage and commissions, over the period from
can give an edge for forecasting the S&P500. Table 1.4 shows the top
four overall moving average lengths (MALen) relative to prices used for 4/21/82 to 2/7/96. In the table, LenTr is the period used in the momentum
developing divergence patterns between the S&P500 and T-Bonds, with for the S&P500, and LenInt is the period used in the momentum for in-
$50.00 deducted for slippage and commissions.
Table 1.4 shows that simple intermarket divergence is a powerful con- The best two sets of parameters, one on the long side and one on the
cept for developing a trading system for the S&P500. short side, used the difference between a price and its moving average.
When we used our tool for TradeStation and SuperCharts to analyze the T-Bills produced the best profit on the long side, and T-Bonds, the best
effect of T-Bonds, T-Bills, and Eurodollars on longer-term˜movements in profit on the short side. The best long-and-short combination is as follows,
Classical Market Prediction Classical Intermarket Analvsis as a Predictive Tool 33
TABLE 1.5 S&P500 AND INTERMARKET divergence between Eurodollars and T-Bonds normally resolved itself in
DIVERGENCE OPEN TO CLOSE. the direction of the Eurodollar market. We tested over 500 different com-
binations of moving average lengths and, based on both profit and sta-
bility, we found that a Eurodollar length of 32 and a T-Bond length of 24
worked best. The results for these parameters, with $50.00 allowed for
slippage and commissions, are shown in Table 1.6.
Besides the relationship between Eurodollars and T-Bonds, many other
commodities are predictive of T-Bonds. We tested over 4,000 combina-
tions of divergence using crude oil, lumber. XAU, gold, and copper. Be-
cause all of these commodities or indexes have a negative correlation to
where LenTr is the length of the moving average for the S&P500, and
T-Bonds, we would define divergence as the commodities moving in the
LenInt is the length of the moving average of the intermarket:
same direction; that is, if T-Bonds were rising and so was the XAU, that
pattern would be defined as divergence and we would expect T-Bonds to
Intermarket LenTr LUlht Long Profit Drawdown
Our tests showed that using a price relative to a moving average pro-
$135.675.00 -$20.000.00 667 56%
T-Bills 18 IO
duces the best results for systems that hold overnight positions. We also
found that the XAU is the most predictive of these five markets. For ex-
ample, 39 of the top 40 most profitable combinations used the XAU. The
Infermarker LenTi- LtVGU Short Profit Drawdown
only non-XAU combinations of parameters were sets of parameters using
2 $39,435.00 -$44,300.00 821 52%
T-Bonds 8 copper. The best overall set of parameters using copper used an S-day
moving average for T-Bonds and a lo-day moving average for copper. One
of the best sets of parameters used the XAU and was chosen based on
PR˜DlcTlbx T-BONDS INTERMARKET DIVERGENCE
WITH both profitability and robustness. Data were: T-Bond moving average
length = 6; XAU moving average length = 34.
Letâ€™s now use divergence between Eurodollars and the T-Bonds for pre- Our results during the period from l/1/86 to 3/18/96, with $50.00 al-
dicting T-Bonds. T-Bonds and Eurodollars are positively correlated, and lowed for slippage and commissions, are shown in Table 1.7.
divergence between them can be used to develop either trading filters or
a trading system. We will trade T-Bonds using these rules:
1. If T-Bonds close below average (T-Bond close,LenTB) and Euro- TABLE 1.6 INTERMARKET DIVERGENCE
dollars close above average (Eurodollar close,LenEuro), then buy SYSTEM T-BONDS/EURODOLLARS.
Net profit $63,593.75
2. If T-Bonds close above average (T-Bond close,LenTB) and Euro- Profit long $55,431.25
dollars close below average (Eurodollar close,LenEuro), then sell Profit short $8.275.00
at open. Win% 59
Average trade $1.447.87
We tested this basic relationship using different lengths of LenTB and
Profit factor 2.57
LenEuro for the period from l/2/86 to 2/7/96. Our research indicated that
Classical Market Prediction Classical Intermarket Analysis a˜ a Predictive Tool 35
TABLE 1.7 INTERMARKET DIVERGENCE TABLE 1 .B INTERMARKET DIVERGENCE
Net profit 4101,250.00 Net profit $98,937.50
Profit long Trades 90
Profit short Win%
Trades Average trade i;â€™ 099.31
Win% 66 Maximum drawdown -$9:506.25
Average trade Profit factor 3.08
moving average from 2 to 30 in steps of 2. Over 25 percent of these com-
These results are not good enough for stand-alone trading, but they
binations generated more than $lO,OOO.OO a year; 165 of them produced
make a great indicator to give you an edge.
65 percent or more winning trades. On the basis of our analysis for both
Another nontradable but very interesting set of parameters uses a 2.day
profitability and robustness, we selected a set of parameters that used
moving average for both T-Bonds and the XAU index. This combination
price relative to a moving average. The moving average used an g-day pe-
made $95,668.75 during our development-and-testing period and won 61
riod for T-Bonds and a 24-day period for the UTY index. This was not the
percent of its trades. What makes it interesting is that it trades once a
most profitable, set of parameters-in fact, it was seventh on our list. Four
week. The drawdown is high (over $35,000.00), but this is a good short-
other sets of parameters produced more than $100,000.00 during this pe-
term directional filter. Our research shows that, based on the divergence
riod. Table 1.8 shows the results during the analysis period for the se-
found, lumber is the next most predictive market after the XAU, and gold
lected set of parameters.
is a distant third. Crude oil was the least predictive of all of the markets
We also tested the divergence between the CRB cash and the CRB
PREDICTING COLD USING INTERMARKET ANALYSIS
futures and found that the CRB futures have been more predictive of
T-Bonds. Using a simple model that was bullish when T-Bonds and the
Letâ€™s now discuss the gold market. Using divergence, we will examine
CRB were below their moving average, and bearish when T-Bonds and
the relationship between gold and both the XAU and the D-Mark. The
the CRB were above their moving average, we found that using 10 days
XAU is an index of American gold mining stocks and is positively
for the moving average of T-Bonds and 16 days for the moving average
correlated to gold, as is the D-Mark. We begin by testing the following
of the CRB futures produced both profitable and stable results. This
combination produced over $92,000.00 in net profit from l/12/86 to
3/18/96 while winning 67 percent of its trades. The maximum drawdown
1. XAU up, gold down, D-Mark up = buy gold.
was about -$13,000.00. These divergence models based on the CRB per-
formed badly in 1989, 1993, and 1994, and very well in the other years. 2. XAU down, gold up, D-Mark down = sell gold.
Earlier in this chapter, we saw how the Philadelphia electrical utility
We defined up and down as a given marketâ€™s being above or below its N-
average was predictive of T-Bonds˜ (see Figure 1.12). Letâ€™s now see how
using intermarket divergence between this average and T-Bonds can day exponential moving average (EMA). Our test rules have been tested
in the period from l/3/84 to 2/8/96 using backadjusted continuous con-
produce great results for trading T-Bonds. We optimized the period
from 6/l/87 to 6/18/96 for both price difference and price, relative to a tract data. The rules are:
Classical Intermarket Analysis as a Predictive Tool 37
Classical Market Prediction
performed well. This type of divergence model traded much more than
1. If XAU is greater than XAverage (XAU,Lenl), gold is less than
our simple moving average model and had a much higher winning per-
XAverage (Gold,Len2), and the D-Mark is greater than XAverage
centage. For example, a 12-day moving average for crude oil and an 1%
(D-Mark,Len3), then buy at open.
day moving average for the Dollar proved to be a robust pair of parameters
2. If XAU is less than XAverage (XAU,Lenl), gold is greater than
that performed very well. The results for this set of parameters for the pe-
XAverage (Gold,Len2), and the D-Mark is less than XAverage riod from l/2/86 to 5/17/96, with $50.00 deducted for slippage and com-
(D-Mark,Len3), then sell at open.
missions, are shown in Table 1.10.
This set of parameters was picked for its profitability and stability. It
We tested these rules using different values for Lenl, Len2, and Len3 was not the most profitable set of parameters; for example, a 12.day av-
over the period from l/3/84 to 2/8/96. This period was selected because erage for crude and an g-day average for the Dollar produced over
l/3/84 was the starting point for the XAU Index. We found that the in-
$50,000.00. This relationship between the Dollar and crude was very sta-
termarket relationship among these three data series was very stable and ble for 78 out of the 90 tests, won more than 60 percent of the trades, and
profitable during the selected time period.
had a positive net profit in every test but one. The net profits of all of the
We tested Len1 and Len2 from lo- to 20.day periods, and Len3 from pairs of parameter values cluster between $40,000.00 and $50,000.00; in
16-to 24-day periods. We found that all 121 tests we ran were profitable. fact, 30 of them made more than $40,000.00 and 65 of them made more
On the long side, 106 of them made money, and all of them made money than $30,000.00.
on the short side. About half of them made more than $40,000.00 in The Dollar index is not the only intermarket that can be used with the
net profit, and almost 75 percent of them had drawdowns of less than concept of divergence to predict crude. The X01 index, an index of oil
-$lO,OOO.OO. We found that the best parameters were 12, 10, and 20. stocks, is also predictive of crude oil. We use prices related to a moving
Using this set of parameters, with $50.00 deducted for slippage and com-
average as our measure of an uptrend or a downtrend. When the X01 is
missions, the results over our test period were as shown in Table 1.9. up and crude is down, then buy crude; when the X01 is down and crude
is up, then sell crude. We found that a moving average length of 2 days for
crude and 16 days for the X01 produced good results during the period
USING INTERMARKET DIVERGENCE TO PREDICT CRUDE
from I l/7/84 to 5/17/96. This combination produced $49.271.00 during
this period and had 63 percent winning trades. It is not tradable as a sys-
Earlier in this chapter we showed how a simple moving average of the
tem because the drawdown is much too high (-$19,000.00), but it does
Dollar index could be used to predict crude oil (see Figure 1.23). Letâ€™s show that the X01 is predictive of future oil prices. The X01 is not the
now use divergence between the Dollar and crude oil to trade the crude.
We found that using a moving average relative to price-type divergence
TABLE 1 .lO RESULTS OF INTERMARKET
DIVERGENCE CRUDE/DOLLAR INDEX.
TABLE 1.9 RESULTS OF INTERMARKET DIVERGENCE
PREDICTING COLD USING GOLD, XAU, AND D-MARK. Net profit $46,171 .OO
Profit long $3&l 80.00
$60,360.00 + $1,980.00 open
Profit short $7,991 .oo
54 + open
Average trade $344.56
Drawdown -$l 1.690.00
Classical Market Prediction Classical Intermarket Analvsis as a Predictive Tool
USING INTERMARKET ANALYSIS ON STOCKS
only index that is predictive. The S&P500 oil-based stock groups are very
predictive of the future oil price; in fact, some of these groups are used
Intermarket analysis is also a valuable tool when you trade some indi-
in systems that we have developed for our clients.
vidual stocks. A classic example is the inverse relationship between East-
man Kodak and silver, shown in Figure 1.27. The relationship is based on
PREDICTING THE YEN WITH T-BONDS Kodakâ€™s use of silver for processing film.
Letâ€™s now use the concept of intermarket divergence to try to predict
the future direction of Kodak stock. Because Kodak and silver are nega-
We showed earlier that T-Bonds are positively correlated to the curren-
tively correlated, we can develop a system for trading Kodak using di-
cies. Letâ€™s now see what happens when we use divergence between the
vergence between silver and Kodak. Our rules are as follows:
Yen and T-Bonds to predict the Yen. They are positively correlated, so we
would want to buy the Yen when T-Bonds rise and the Yen falls. Using a
1. If Kodak is less than Kodak [Len11 and silver is less than silver
67/99 type for the period from l/l/80 to 3/18/96, we found that a simple
[Len2], then buy at open.
difference worked better at predicting the Yen than prices relative to a
2. If Kodak is mm-e than Kodak [Len11 and silver is more than sil-
moving average. We tested parameter lengths between 12 days and 40
days for both types of divergence and found that all of the top 84 sets of ver [Len2], then sell at open.
parameters used system difference between prices and not a moving
average. On the basis of our analysis, we found that a 34-day difference
between both T-Bonds and the Yen produced both profitable and stable
results. Our results with this pair of parameters, allowing $50.00 for slip-
page and commissions, are shown in Table 1.11.
These results are impressive except for the drawdown, which was
caused by two large losing trades. One closed in 1989 and the other in
1995. These large losses occurred because this is a stop-and-reverse sys-
tem and the market did not produce a divergence between the Yen and
T-Bonds for 8 months and a little over a year, respectively.
TABLE 1 .ll RESULTS OF INTERMARKET
Profit long 03
m NOâ€ť Dee 96
Win% FIGURE 1.27 Eastman Kodak versus cash silver for the period
overage trade September 1995 to January 1996. As silver was in a downtrend, Kodak
Classical Market Prediction Classical Intermarket Analysis as a Predictive Tool
TABLE 1.12 RESULTS OF INTERMARKET
We tested 256 different sets of parameters for Len1 and Len2. Of
these, all of the parameters between 10 days and 40 days were profitable
during the period from 7/29/80 to 4/22/94. We started in 1980 because Net profit $ I _â€śI
the relationship between silver and Kodak was upset during the Hunt Profit long $64.91
Crisis* of the late 1970s. During this time, silver rose to over $50.00 an $52.97
Average trade $0.74
The results of our tests were very stable, and we found that 18 days
and 48 days were the best parameters for Len1 and Len2. During our test-
ing of 256 sets of parameters in this range, we found that all of them out-
performed buy and hold on this stock. Another impressive fact was that
These impressive results show that intermarket analysis is powerful
this divergence pattern had between 63 percent and 78 percent winning
even when trading certain individual stocks.
trades across all 256 combinations. The number of trades varied from 75
The above examples show that intermarket analysis does have predic-
to 237 during this 14.year period, using different sets of parameters.
tive value. We optimized some of the parameters used in the examples.
The results for the selected set of parameters, without any allowance
If we were developing real trading systems, we would have split our data
for slippage and commission, are shown in Table 1.12. Amounts are for
into three sets: (1) a development set, (2) a testing set, and (3) an out-of-
only one share of stock.
sample set. We would have optimized on the development set, and then
Many life insurance companies and financial institutions are positively
tested on the testing and out-of-sample sets. Furthermore, we would not
correlated to interest rates; as an example, letâ€™s look at U.S. Life Corpo-
have selected only the most profitable sets of parameters. The parameters
ration and T-Bonds. Using divergence measured by a 22.day moving av-
selected should offer both good returns and neighboring sets of parame-
erage for U.S. Life and a 28-day moving average for T-Bonds produced
ters that produce similar results. The flatter the profit surface, the more
good results. This combination gained more than $31.00 a share and rose
likely the system will be robust. These intermarket relationships are so
73 percent of the time when the market was set up for bullish divergence.
strong that even the most profitable set of parameters is surrounded by
In another example, we will use T-Bond futures to predict Pegasus
other very profitable pairs. For this reason, the parameters selected
gold. Our research has shown that Pegasus gold has a positive correlation
should be reasonably robust and should hold up well into the future. These
to T-Bonds. This might sound odd, but it does make some sense. Gold
intermarket relationships will reappear in later chapters, when we de-
stocks normally lead gold prices at major turning points. For example,
velop trading systems using advanced technologies such as neural net-
the biggest move in the XAU was produced when T-Bond futures rose to
works and genetic algorithms.
all-time highs during 1993. Lower interest rates are viewed as a stimulus
to the economy. This will lead to a rise in gold prices. We used a 12.day
moving average for Pegasus and a 30.day moving average for T-Bonds.
During the period from 4/17/86 to 3/8/96, this stock rose from $6.25 to
$15.00; using our selected parameters would have produced a profit of
$51.72 per share while winning 67 percent of its trades. Profits, equally
divided on the long and short sides, represented over 80 percent per year
before slippage and commissions.
* During the late 1970% the Hunt family tried to cornw the silver market. The gov-
ernmenf sold silver and caused a collap&from $50 an ounce to less than $4.
Seasonal Trading 43
197Os, but it has been magnified since the 1987 Black Monday crash. For
example, since the 1987 crash, Mondays have had an upward bias of over
.60 point per trade, or about $300.00, on a futures contract on an open-
2 to-close basis. Before the crash, the bias was about $138.00 per trade.
The crash magnified the fear of hold positions over a weekend. This fear
enhanced the upward bias on Mondays and changed the psychology of the
Seasonal Trading market.
CALCULATING SEASONAL EFFECTS
Now that we understand why seasonal trading works, letâ€™s discuss dif-
ferent ways of calculating these measures.
The simplest method is to use price changes-different prices from
open to close or from close to close. This type of seasonal analysis works
Many commodities, and even some individual stocks or stock groups,
very well for day-of-week and day-of-month analyses. When calculating
have recurring fundamental factors that affect their prices. These forces
seasonality on a yearly basis, price changes or several other methods can
can be seen by analyzing a market by day of week, day of month, or day
be used to capture the effects of these recurring fundamental forces.
of year. This is called seasonal trading.
One alternate method is to calculate the seasonal effect using a de-
trended version of the data. The simplest way to detrend a price series is
to subtract the current price from a longer-term moving average. Another
TYPES OF FUNDAMENTAL FORCES
popular method for calculating seasonality is to standardize the data on
a contract-by-contract or year-by-year basis-for example, by identify-
Three types of fundamental forces cause seasonal trading patterns. The
ing the highest or lowest price on each contract or year and using it to
first type is based on events that have fixed or relatively fixed dates. Ex-
create a scaled price.
amples are: The pollination of corn in late June and early July, and the fi-
ing of federal tax returns on April 15.
Many seasonal forces are related to events for which the date could
MEASURING SEASONAL FORCES
change-for example, the governmentâ€™s release of the current unemploy-
ment numbers. If these dates remain fairly constant for many years, then
Letâ€™s first discuss measuring these seasonal forces based on the day of the
seasonal effects can be identified. If these dates change slightly, it may
week. Day-of-week forces can be measured in several ways. The first way
look as if the seasonal pattern has changed when, in actuality, the sea-
is to measure the change on an open-to-close or a close-to-close basis-for
sonal bias relative to the reports has not changed. For example, the Thurs-
example, measure the close-to-open change every Monday on the S&P500.
day before the monthly unemployment number is scheduled to be
Another, even more powerful, variation is to compare only one day of the
announced has a downward bias in the T-Bond market.
week throughout a month-Mondays in December, for example. As we will
The third type of fundamental˜forces is based on human psychological
see later, this type of analysis can produce amazing results,
factors. For example, in the stock market, Mondays have an upward bias
Using another form of day-of-week analysis, you would map where the
because many traders exit their positions on the preceding Friday and
high and low for a given week will occur. This information can help you
reenter them on Monday. This Monday bias has˜existed at least since the
44 Classical Market Prediction Seasonal Trading 45