Identifying Market Trends
Identifying Market Trends
INDICATORS
trading patterns whether we should be using trend-following methods or range trading methods at any given time.
USING R-SQUARED
R-squared is used to measure the relationship of variables in
an equation. Econometricians use r-squared to estimate how
well equations or models fit the data. In multiple linear
regression, each variable makes a contribution to the equation and the result of each new variable can be measured.
Observing r-squared as it moves through time provides us
with useful trading information as the indicator can range
CHRISTINE MORRISON
Stocks & Commodities V16:4 (173-179): Identifying Market Trends by Jack Karczewski
Stocks & Commodities V16:4 (173-179): Identifying Market Trends by Jack Karczewski
25
35
30
20
15
PRICE
PRICE
25
10
20
15
10
5
5
0
0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
TIME
TIME
Anatomy of A Trend
Trend breaking down
Consolidation or reversal
Trend developing
Trending
r-squared
Trending
No trend to trending
Transition
Nontrending
FIGURE 3: THE ANATOMY OF A TREND. This chart shows both types of periods.
A trend is developing, and you can see the r-squared climb as the market trends.
As the market peaks and moves into a consolidation, the r-squared falls in
value, setting the stage for a new trend. In both situations, the r-squared
provides a quantifiable method to measure the relationship between price and
time. This relationship enables the trader to make important decisions about
the trends longevity.
Stocks & Commodities V16:4 (173-179): Identifying Market Trends by Jack Karczewski
488
679
862
1026
1204
1391
1618
1892
2174
2234
488
191
183
164
178
187
227
274
282
60
22%
9%
8%
7%
8%
8%
10%
12%
13%
3%
No
Trend
39%
Transition
Trending
38%
FIGURE 5: Some inferences about trading conditions may be made by studying rsquared readings. Figure 5 shows a distribution of r-squareds; these readings were
taken from 30-day linear regression analysis of the S&P 500 index from August
1988 to summer 1997. Readings of greater than 0.70 describe a good fit, while
readings of less than 0.30 describe a poor one. At first glance, the numbers would
seem to indicate that the market does not trend as often as we would like. The
statistics suggest that the S&P 500 is in a trending mode only about 35% of the time.
representation of r-squared plotted through time. The interval used for this indicator is 30 trading days, which is about
42 calendar days. The period of 30 days was selected because
it is the smallest number of observations that can be used
without correcting for small samples. Longer or shorter
lengths can be used, but smaller samples will need to be
corrected for statistical significance, while longer lengths
suffer from the same problems as moving averages; they are
not responsive to short-term influences in the market. The
intervals should be adjusted to the traders time horizon.
It should be noted that the indicator is unstable; it is very
dynamic, does not remain in the same location for extended
periods and frequently oscillates between zero and 1. Of
further note is the manner in which it traverses the entire
range from low to high and has completed these in a cyclical
r-squared (0 7104)
Market failed to achieve an r-squared of greater than 0.7 for 204 market days
Stocks & Commodities V16:4 (173-179): Identifying Market Trends by Jack Karczewski
RUNS
Figure 5 gives us information about the distribution of trends
and nontrends, but what about the number of days the rsquared spends at certain levels? These are referred to as
runs. Runs are defined as consecutive days in a trend. If a
market achieves an r-squared reading of greater than 0.70 and
the following day has another day of greater than 0.70, that
would be a run of two days. The longest run in the S&P 500 of
a trending market has been 65 days (Figure 6); that run ended
in August 1997. The next largest runs were 55 days, which
ended in June 1995, and 38 days, which ended in March 1995.
Contrast that information with the longest period that a
market was not in a trend. That was 204 days, which ended
in November 1992 (Figure 7). The next longest period of rsquared of less than 0.70 ended in July 1996, and that was
102 days. The trend is certainly not your friend with numbers like these. This information may be why many moving
average systems fail.
This is not to suggest, however, that moving average
indicators are no longer useful. Linear regression has in
common with moving averages a shortcoming, and that is the
difficulty in selecting the correct interval or length of the
lookback period. With linear regression, it is clear when the
line no longer fits the market, but with a moving average, the user
must rely on the market trading below or above the moving
average for that information. Figure 8 summarizes the major
differences between moving averages and linear regression.
Linear
Regression
Moving
Average
Yes
Yes
Yes
No
No
No
No
No
No
Yes
while the linear regression gives information about the previous 30 days, the trader has to make an inference about the
market going forward. Observing the errors can give you that
early warning signal. The errors can be stated simply as:
((Actual-Predicted)/Predicted)) 100
ADDITIONAL
TRADING AIDS
Since the r-squared indicator
doesnt identify whether the
market is in an uptrend or a
downtrend, it is useful to paint
the bars to mark them as one or
the other if the r-squared
reaches 0.70 or higher. This may be accomplished by plotting
the slope of the regression line, but actual crossing to an up- or
downtrend is more dramatic and gives a visual reference.
Figure 10 is of the March 1998 Treasury bond futures, in
which the bond futures have been in an uptrend, punctuated
by brief downtrends. These changes of trend are accompanied
by low or zero r-squared readings. By definition, an r-squared
of zero indicates that the statistical methodology indicates no
trend is present. This is what technicians define as consolidation, and they can occur at tops or bottoms.
Another example is Figure 11. This is the TYX, the 30-year
interest rate, disseminated by the CBOE in real time. Note the
extended period that it has been in a downtrend, indicating rates
are moving lower. This is a market with sharp reversals, usually
caused by surprises in the monthly unemployment report. This
report often sets the tone of the bond market for the coming
month; careful analysis of the trend along with r-squared can
often yield valuable information about the coming months.
Figure 12 is Ascend Communications, a stock that has
fallen from a high in the low 80s to the low 20s in less than a
Stocks & Commodities V16:4 (173-179): Identifying Market Trends by Jack Karczewski
LR Errors
RUSSELL 2000
FIGURE 9: ERRORS, RUSSELL 2000 INDEX. Observe how the errors (top) started
to occur on the positive side when there was a low r-squared reading in the Russell
2000 index. The errors have been adjusted to reflect a percentage error from the
actual. This helps visualize the size of errors. This technique is useful, because
while the linear regression gives information about the previous 30 days, the trader
has to make an inference about the market going forward. Observing the errors can
give you that early warning signal.
FIGURE 10: MARCH 1998 TREASURY BONDS. Here, the bond futures have been
in an uptrend, punctuated by brief downtrends. These changes of trend are
accompanied by low or zero r-squared readings.
FIGURE 11: 30-YEAR TREASURY BONDS. Note the extended period that the TYX
has been in a downtrend, indicating rates are moving lower. This is a market with
sharp reversals, usually caused by surprises in the monthly unemployment report.
This report often sets the tone of the bond market for the coming month; careful
analysis of the trend along with r-squared can often yield valuable information about
the coming months.
FIGURE 12: ASCEND COMMUNICATIONS. Heres a stock thats fallen from a high
in the low 80s to the low 20s in less than a year. The bars, whick are red in
TradeStation, represent a negative linear regression slope. See how the market
reacts when the r-squared reading approaches zero. Look what occurred in early
December when the market consolidated, and reversed from down to up. The bar
changed color on what appeared to be a downtrend. The stock had a very large
upmove in just a few days before settling back down again.
FURTHER
CONSIDERATIONS
This technique is the linear part of the regression. If a market
is in some power exponential move, a straight line isnt going
explain that market; at least youll be aware that the market is
in a powerful move. The r-squared reading will, if nothing
else, alert you to look to other methods for trading assis-
Stocks & Commodities V16:4 (173-179): Identifying Market Trends by Jack Karczewski
RELATED READING
Chande, Tushar [1992]. Forecasting tomorrows trading
day, Technical Analysis of STOCKS & COMMODITIES,
Volume 10: May.
See Traders Glossary for definition
S&C