5, 0 and −15 % divergence levels. Up arrows indicate buy signals triggered by BollingerBand divergence peaks above the 15 % divergence level. Similarly, down arrows indicate sellsignals triggered by Bollinger Band divergence troughs but only below the −15 % negativedivergence level.
It is defined as the percentage difference or “disparity” of the latest close to achosen moving average, and the formula is:((Close − MA(Close, 30))/MA(Close, 30))∗ 100.To calculate the intermarket disparity I subtract the disparity index of the basesecurity from the disparity index of the intermarket security according to the followingformula:DS1=(SEC1-MA(SEC1))/MA(SEC1)∗ 100DS2=(SEC2-MA(SEC2))/MA(SEC2)∗ 100Intermarket Disparity (ID)=c∗ DS2-DS1
(9.7)(9.8)
where SEC1 = the base security (the security that you want to predict); SEC2 =the intermarket security. c has been introduced to take into account the sign of thecorrelation coefficient and can be either +1 in cases of positive correlation between
126
Intermarket Trading Strategies
Figure 9.3 Composite chart of the gold ETF (GLD) and the dollar index (DXY). The 30-dayintermarket disparity indicator is depicted in the top window. Buy signals are triggered by theintermarket disparity reaching a top and turning down on 3 % or greater positive divergence.Similarly sell signals are generated by the intermarket disparity reaching a bottom and turningup but only for divergence values below −3 % (negative divergence).
SEC1 and SEC2 or −1 in case of negatively correlated markets (like gold and thedollar index).The interpretation is similar to the Bollinger Band indicator. Positive and negativevalues indicate positive and negative divergence respectively. A sell signal is generated when the divergence reaches a bottom and reverses below a certain negativelevel and a buy signal is generated when the indicator reaches a top and falls above acertain positive level. Unlike the Intermarket momentum oscillator (see Section 9.6below), there are no upper or lower limits as these vary according to the securitiesbeing compared and their correlation.A similar method was used by Murray Ruggiero in his book Cybernetic TradingStrategies (see Bibliography) to develop the mechanical trading signals based onintermarket divergence.The difference between the two methods is that Ruggiero considers buy signals between positively correlated markets only when DS1<0 and DS2>0 and sellsignals only when DS1>0 and DS2<0 whereas the intermarket disparity indicator(ID) described above calculates the divergence precisely. It can issue buy signals whenDS2-DS1 rises above a certain level even when both securities are above their moving
Intermarket Indicators
127
average (both DS1 and DS2 are positive), which usually occurs when the disparity ofthe intermarket security (DS2) is considerably higher than DS1. Similarly Ruggiero’smethod issues buy signals between negatively correlated markets only when DS1<0and DS2<0 and sell signals when DS1>0 and DS2>0 whereas the ID indicator canissue buy signals even when both DS1 and DS2 are negative, which occurs only whenthe disparity of the intermarket security (DS2) is considerably lower than DS1.
9.4
INTERMARKET LRS DIVERGENCE
This indicator was first introduced in my article “Volume Flow Performance” inTechnical Analysis of STOCKS & COMMODITIES (see Bibliography) in order tocalculate the divergence money flow divergence between price and the volume flowindicator.
Figure 9.4 Composite chart of the gold ETF (GLD) and the CRB Index (CRB). The 15-dayintermarket divergence LRS indicator is depicted in the top window. Buy signals are triggeredby the intermarket LRS divergence reaching a top and turning down on positive divergencelevels of 15 or greater. Similarly, sell signals are generated by the intermarket LRS divergencereaching a bottom and turning up, but only for divergence values below the −30 level (negativedivergence).
128
Intermarket Trading Strategies
It can also be used (with some modifications) to calculate the divergence of asecurity from its related intermarket. First the linear regression slope of both securitiesis calculated and the intermarket slope is then adjusted to take into account thedifference in volatilities between the two securities. The divergence is then derivedby subtracting the base security slope from the intermarket. Values below zero indicatenegative divergence and values over the zero line positive divergence. Buy signals aregenerated when the indicator reaches a peak above a certain level (usually between10 and 40) and subsequently declines. Similarly, sell signals are triggered when theindicator reaches a bottom below a certain level (usually from −10 to −40) and rises.Divergence levels vary according to the intermarket securities chosen for comparison.
9.5
INTERMARKET REGRESSION DIVERGENCE
The linear regression equation, derived in Chapter 3, is used to make a prediction oflikely values of the dependent variable or the security to be predicted (gold in ourexamples), based on values of a correlated market. This method can only be usedwith price differences or yields as raw prices violate the two basic assumptions ofregression: linearity and normality.The regression line usually crosses through the origin and can be therefore ignoredso the regression equation is reduced to:Y(Pred)=r∗ StDev(Y)/StDev(X)∗ X
(9.9)
where r=Pearson’s correlation between the related markets; Y=percentage yieldof the security to be predicted (actual); Y(Pred)=predicted percentage yield;X=percentage yield of the intermarket security; StDev=standard deviation;and the divergence is Y(Pred)−Y(actual).
(9.10)
Where a scatterplot reveals that the regression line does not cross the origin thenwe can add the Y-Intercept from formula (3.3) in Chapter 3 to formula (9.9) whichbecomes:Y(Pred) = r∗ StDev(Y)/StDev(X)∗ X+MA(Y)-MA(X)∗ r∗ StDev(Y)/StDev(X).(9.11)
9.6
INTERMARKET MOMENTUM OSCILLATOR
A serious disadvantage in using all the above indicators is that extreme divergencelevels vary according to the markets being analyzed. This is mainly because of pricescaling differences between the base and intermarket security.
Intermarket Indicators
129
Figure 9.5 Composite chart of the gold ETF (GLD) and the XAU. The 300-day intermarketregression divergence indicator of the 15-day Gold-XAU yields is depicted in the top window.Buy signals are triggered by the intermarket regression divergence reaching a top and turningdown on positive divergence levels of 3 or greater. Similarly, sell signals are generated by theintermarket regression divergence reaching a bottom and turning up but only for divergencevalues below the −4 level (negative divergence).
To automate the tedious work of identifying indicator extreme values, I use asimple momentum oscillator which I call the intermarket momentum oscillator. I usethe following formula to calculate the new oscillator:Momentum = MA,3(Indicator − Lowest(Indicator,200))∗ 100)/(MA,3(Highest(Indicator,200) − Lowest(Indicator,200)where MA,3 = 3-day moving average; Highest and Lowest are the highest and lowestvalues of the indicator over the previous 200-day period.The formula above will normalize the divergence on a scale from 1 to 100. Tradingsignal interpretation is similar to that of the stochastic oscillator:• Buy when the oscillator falls below a specific level (e.g. 30) and then rises abovethat level, and sell when the oscillator rises above a specific level (e.g. 80) and thenfalls below that level.
130
Intermarket Trading Strategies
• Buy when the oscillator falls below a specific level (e.g. 30) and then rises above ahigher level (e.g. 40), and sell when the oscillator rises above a specific level (e.g.90) and then falls below a lower level (e.g. 80).• Buy when the oscillator rises above its signal line (moving average) and sell whenit falls below the signal line.• A combination of either one of the first two methods with the third.An example of this oscillator applied on the intermarket relative strength is shown inFig. 9.1. When the indicator is used to normalize divergence the buy and sell signalsindicated above should be reversed as we want to buy at maximum positive divergenceand sell at maximum negative divergence. Care should also be taken in interpretingindicator signals in trending markets. In this case the second method of interpretationwould be more appropriate as the indicator can remain in the overbought area for along period of time.
9.7
Z-SCORE DIVERGENCE
A comparison of two securities on the same chart is sometimes difficult and misleading because of price scaling differences. A convenient method of normalizingboth prices on an equal scale is by converting the prices to their Z-scores. These arecomputed by subtracting the mean and dividing by the standard deviation accordingto the formula:Z = (C − MA)/SDZ-scores use the standard deviation as a unit of measure and indicate how manystandard deviations the price falls above or below the mean. In order to eliminatedecimal places and negative values it is sometimes convenient to transform theminto a different scale with a mean of 50 (instead of 0) by adding 50 and multiplyingby 10.The Z-score divergence is computed by subtracting the Z-score of the base securityfrom the intermarket and multiplying the result by their correlation coefficient. Avisual inspection of the Z-scores and their differences can help you determine if youare positioned in the market in the correct direction and which one is leading orlagging.An interesting chart is that of gold and the euro in Fig. 9.6. Although these marketshave a fairly high degree of correlation, their relationship swings, with the euroswitching position as follower and leader. Their spread is more accurate (because ofscaling differences) when comparing the Z-scores (in the middle chart) rather thanthe prices themselves. Care should be taken when using this method for trading,because by using the standard deviation to convert prices to Z-scores we make theimplicit assumption that the distribution of security prices is normal.
Intermarket Indicators
131
Figure 9.6 Composite chart of the gold ETF (GLD) (thick line with the scale on the rightY-axis) and the Euro (thin line on the left Y-axis). The 250-day (1 year) Z-scores of gold (thickline) and the Euro (thin line) are depicted in the upper window on the same scale. The Z-scoreillustrates more clearly the relation between gold and the Euro, especially in periods whereboth charts are very close in the bottom window.
Financial series, however, are rarely normally distributed. The Z-score will normalize prices regardless of statistical merit which is only absolutely correct in thecase of perfectly normally distributed data. In the case of serious deviations fromnormality, unlikely events – such as the markets uncoupling even more – are morelikely to occur than is the case in a normal distribution.Nevertheless, the above limitations do not mitigate the usefulness of the Z-scoreindicator in comparing multiple related securities visually.
9.8
MULTIPLE INTERMARKET DIVERGENCE
All the indicators discussed above involve the comparison between two correlatedmarkets. This concept can be extended to multiple markets where a prediction of thefuture direction of a security is extended to include multiple predictor markets.
132
Intermarket Trading Strategies
This can be achieved by adding the divergences for each market after takinginto account the redundant cross correlation between the predictor (independent)variables.This can be achieved by weighing each predictor variable according to its part (orsemi-partial) correlation coefficient with the dependent variable (the security to bepredicted).The part correlation coefficient represents the proportion of the variance of apredictor market (independent variable) that is not associated with any other predictorsand is calculated by removing all variance which may be accounted for by the otherindependent variables. The remaining unique component of the independent variablesis then correlated with the dependent variable. The computational formula for thepart correlation coefficient is:r y1 − r y2 r12r y1(2) = 21 − r12
(9.12)
r y2 − r y1 r12r y2(1) = 21 − r12
(9.13)
where: ry1(2) is the correlation between y (the dependent variable) and 1 (the firstindependent variable) with the influence of the second independent variable removedfrom variable 1.ry2(1) is the correlation between y (the dependent variable) and 2 (the secondindependent variable) with the influence of the first independent variable removedfrom variable 2.ry1 and ry2 are the correlations between the dependent variable y and the independent variables 1 and 2 respectively.r12 is the correlation between the independent variables.In the example in Fig. 9.7 the formula for the intermarket divergence LRS (topwindow) has been extended to include two predictor markets: silver and the dollarindex by weighing each predictor variable according to its part correlation with thesecurity to be predicted (gold). The complete double LRS divergence formula isincluded in Appendix A.The linear regression slopes were compared over a 20-day interval. The timeinterval was used as a switch for increasing or decreasing the amount of tradingsignals. Decreasing the time segment produced more signals while increasing itreduced them.Please note that because of gold’s recent strength all examples presented in thischapter have a tendency to exaggerate negative divergence. To compensate for thisdivergence bias, asymmetrical divergence levels of +15 and −20 were chosen forthe extreme positive and negative divergence levels respectively.
Intermarket Indicators
135
Table 9.1 Correlation matrix of 9-day yields. The TNX is the CBOE 10-year Treasury yieldindex. Data for the most recent 15-year period were used to calculate the correlations. Only10 years of data were available for the euro and therefore it was not included in the matrix.15 Year Correlation Matrix of 9-Day Yields
GoldXAUSilverVentureDollarCRBYenTNX
Gold
XAU
Silver
Dollar
CRB
Yen
TNX
10.700.600.58−0.330.43−0.19−0.09
0.7010.540.67−0.220.42−0.17−0.05
0.600.5410.59−0.170.44−0.110.02
−0.33−0.22−0.17−0.271−0.180.550.18
0.430.420.440.47−0.181−0.180.08
−0.19−0.17−0.11−0.240.55−0.1810.08
−0.09−0.050.020.080.180.080.081
correlated well with gold but were not too highly related with each other. The euro wasnot included because of its high cross correlation with the dollar index (r = −0.97).The first aspect to consider is how well the independent variables predicted thedependent variable, in this case gold. This is determined by the coefficient of determination, R squared. Model 3 (see Table 9.3) has an R2 of 0.587 implying that 58.7 %of the variance in gold is explained by the predictor variables, the XAU, silver andthe dollar.Clearly the XAU is the largest contributor to the coefficient of determination, R2(Table 9.3). The first model (first line in Table 9.3) which consists of the XAU onlyhas a coefficient of determination R2 of 0.484, hence we can say that the contributionTable 9.2 Pearson’s 10-year correlation matrix of 9-day percentage yields. Data for themost recent 10-year period were used to calculate the correlations.10 Year Correlation Matrix of 9-Day Yields
GoldXAUSilverVentureDollarEuroCRBYenTNX
Gold
XAU
Silver
Dollar
Euro
CRB
Yen
TNX
10.700.580.58−0.430.400.44−0.22−0.09
0.7010.520.67−0.310.280.43−0.19−0.03
0.580.5210.59−0.260.230.43−0.130.01
−0.43−0.31−0.26−0.271−0.97−0.270.540.24
0.400.280.230.23−0.9710.21−0.35−0.24
0.440.430.430.47−0.270.211−0.250.10
−0.22−0.19−0.13−0.240.54−0.35−0.2510.10
−0.09−0.030.010.080.24−0.240.100.101
134
Intermarket Trading Strategies
constant. They will therefore vary depending upon the other independent variablesincluded in the regression equation.Part correlation, discussed above, is also the basis of multiple regression.The values of the regression coefficients are found using ordinary least squares.In this case it is more convenient to express the regression coefficients in matrixform. When more than two variables are involved, the formula becomes too long andcannot be programmed into MetaStock because of formula space limitations. Theycan, however, be calculated using any other programming language.However, for a trader who is only interested in a few markets, there is an easiermethod. The linear regression coefficients can be calculated using any off-the-shelfstatistical package and substituted in the MetaStock code. This method has the advantage of being able to select an effective set of predictor intermarket securities thatwill maximize the coefficient of determination, R squared.The practical problem in multiple regression is one of identifying predictor variables that are highly correlated with the dependent variable but have low correlationsamong themselves.There might be a tendency to continue including variables as long as there seemsto be an increase in R squared. In practice, however, it is simply not feasible to findmore than three predictor markets that are uncorrelated.In choosing the best independent variables to include in the regression equation itis important to ensure that these are not too highly correlated with each other (i.e.Pearson’s correlation should not exceed 0.80), because the regression may becomeunstable.A counterintuitive point worth noting is that sometimes an independent variablethat has zero or very low correlation with the dependent can lead to improvement inprediction if it is included in the regression equation. This is because it removes theirrelevant variance or “noise” that it shares with the other predictors but is not presentin the dependent variable.The gold example can be used again to illustrate some of these points.The first step is to choose independent variables that are known to be related togold and choose the best time increment to use when calculating percent changes.The correlation analysis in Chapter 7 (Table 7.6) indicates that gold has the strongercorrelation with the XAU and the dollar index when taking 9-day yields. This timesegment was therefore used to construct the correlation matrix with related marketsin Tables 9.1 and 9.2 using 15 and 10 years of data respectively. The correlationcoefficients were similar in both tables, except for the correlation between the dollarindex and gold which improved considerably (from −0.33 to −0.43) when using10 years of data.Considering that the dollar is a major fundamental factor affecting gold, I decided to use the shorter time period when calculating the regression equationcoefficients.We can now proceed with the regression analysis to predict gold in terms ofthe XAU, silver, the dollar, the CRB and the yen. These were chosen because they
Intermarket Indicators
133
Figure 9.7 The 20-day double divergence between gold, the dollar index and the silver ETFis depicted in the top window. Extreme values of the divergence are indicated by the horizontallines at +15 and −20.
9.9
MULTIPLE REGRESSION DIVERGENCE
In multiple regression, the goal is to predict the value of the dependent variable (the market to be predicted) from a set of k independent variables (relatedmarkets).Multiple regression finds a set of partial regression coefficients bk such that thedependent variable could be approximated as well as possible by a linear combination of the independent variables (with bi etc. being the weight of the combination). Therefore, a predicted value, denoted Y, of the dependent variable is obtainedfrom:Y = a + b1 X1 + b2 X2 + . . . . bk Xk
(9.14)
The coefficients of the multiple regression equation represent the amount by whichthe dependent variable (to be predicted) increases when one independent (predictor)variable is increased by one unit and all the other independent variables are held
136
Intermarket Trading Strategies
Table 9.3 Model summary. The first model includes only the XAU. Silver, the dollar, theCRB and the yen are added one at a time in models 2, 3, 4 and 5 respectively. Adding theCRB and the yen make very little difference to the coefficient of determination R2 .Part correlationsModel
R2
R2 change
R2 % change
XAU
Silver
Dollar
CRB
Yen
12345
0.4840.5490.5870.5920.593
0.4840.0650.0380.0050.001
10013.46.90.90.2
0.700.460.410.380.38
0.260.230.200.20
−0.20−0.19−0.18
0.070.07
0.03
of the XAU to R2 was 0.484. When silver is added (in model 2) R2 increases 13 % to0.549 and the addition of the dollar index (model 3) adds a further 0.038 or 7 % to R2 .The CRB and the yen, in the fourth and fifth model respectively, contribute very littleto R2 and consequently add very little value to the predictive ability of the regressionequation. This is also verified by their near zero part correlation coefficients (theircorrelation coefficient with gold after removing the effects of all other variables)depicted in the last two columns of Table 9.3.The relative impact of each variable on gold is also of interest.Each of the regression coefficients in Table 9.4 estimates the amount of changethat occurs in the dependent variable (gold) for one unit change of the correspondingindependent variable. We cannot say, however, that because the dollar index coefficient is larger than the corresponding coefficient for the XAU that the dollar is moreimportant for predicting gold, as they use different scales of measurement. In orderto make effective comparisons, all coefficients should be normalized. This is doneby multiplying each variable by the ratio of its standard deviation to the standarddeviation of the dependent variable (gold). The resultant normalized coefficients arethen called standardized.Table 9.4 Unstandardized regression coefficients.Regression coefficientsModel
Constant
XAU
Silver
Dollar
CRB
Yen
12345
0.1210.060.0710.0680.066
0.310.240.2160.2070.207
0.180.1660.1530.151
−0.43−0.413−0.449
0.1170.123
0.049
Intermarket Indicators
137
Table 9.5 Standardized regression coefficients. The yen produces thesmallest regression coefficient (0.034).Standardized Regression CoefficientsModel
XAU
Silver
Dollar
CRB
Yen
12345
0.6960.5400.4900.4690.469
0.2990.2700.2490.247
−0.208−0.199−0.216
0.0800.085
0.034
Examining the standardized coefficients in Table 9.5 and their percentage weightin Table 9.6 we can see that when including all potential predictor markets (last linein Table 9.6) the XAU has the greatest impact on gold (45 %). The CRB, in spite ofa moderate correlation with gold (r = 0.44), has a very low standardized coefficient(0.085) because of its high cross correlation with the XAU and silver.In view of the above the CRB and the yen can be removed from the regressionequation with very little loss to its predictive ability. Thus the equation reduces to:G9 = 0.07 + 0.216∗ X9 + 0.166∗ S9-0.43∗ D9
(9.15)
where the variables G9, X9, S9 and D9 are the 9-day percentage yields of gold, theXAU, silver and the dollar index respectively.Thus we can calculate the divergence between the predicted (based on the relatedmarkets) and actual values of gold’s 9-day yields using the above formula (9.15) bysubtracting the second from the first.The divergence was plotted in the top window of the chart in Fig. 9.8. Unlikeconventional technical analysis indicators, all divergence indicators are leading priceand it is therefore prudent to wait until the indicator forms a top or bottom andreverses direction before making any buy or sell decisions.Table 9.6 Percentage weight of each variable in the model.% WeightModel
XAU
Silver
Dollar
CRB
Yen
2345
64%51%47%45%
36%28%25%24%
21%20%21%
8%8%
3%
138
Intermarket Trading Strategies
Figure 9.8 The multiple regression divergence between gold, the XAU, silver and the dollarindex using 9-day percentage yields is depicted in the top window. Extreme divergences areindicated by the horizontal lines at +/−20 levels. Buy signals are triggered by the indicatorforming a top above the extreme level and declining below 20, and sell signals are triggeredby the indicator declining below −20, forming a bottom and rising above −20.
It would be interesting to see which of the indicators described above performsbetter in predicting gold. The winner will be revealed in Chapter 11, after someserious back-testing.
9.10
INTERMARKET MOVING AVERAGE
I have seen the intermarket moving average mentioned in a book on intermarketanalysis but unfortunately the author did not provide the formula. To calculate thepredicted moving average I use the multiple regression formula (equation 9.16) topredict gold prices based on their correlation with the XAU, the dollar and silver.The formula for this indicator is provided in Appendix A and the indicator is plottedin Fig. 9.9. Crossovers over the conventional (actual) moving average indicate thatgold is undervalued and crossovers under the conventional moving average indicatethat gold is overvalued relative to its related markets. Crossovers, however, cannot beused to generate buy and sell signals as gold can remain undervalued or overvaluedfor some time before following its peers.
Intermarket Indicators
139
Figure 9.9 The intermarket (predicted) 5-day moving average (thick line) is plotted togetherwith the classic 5-day moving average in the bottom window and the multiple divergenceindicator in the top window. Notice that when the intermarket moving average crosses abovethe classic moving average the divergence (top window) turns positive.
This indicator, therefore, can only be used as a rough estimate of the price levelrelative to other correlated markets but can’t be used in mechanical trading systemsas these require precise and timely signals. It has not been included, therefore, in thecomparison tests in Chapter 11.9.11
CONGESTION INDEX
This indicator has nothing to do with intermarket trading but I thought that it wouldbe a good idea to mention it in this chapter as it is used extensively with the tradingsystems in the second part of this book.Market movements can be characterized by two distinct types or phases. In thefirst, the market shows trending movements which have a directional bias over aperiod of time. The second type of market behavior is periodic or cyclic motion,where the market shows no consistent directional bias and trades between two levels.This type of market results in the failure of trend-following indicators and the successof overbought/oversold oscillators.Both phases of the market require the use of different types of indicator. Trendingmarkets need trend-following indicators such as moving averages, moving average
140
Intermarket Trading Strategies
convergence/divergence (MACD), and so on. Trading range markets need oscillatorssuch as the relative strength index (RSI) and stochastics, which use overbought andoversold levels.The age-old problem for many trading systems is their inability to determineif a trending or trading range market is at hand. Trend-following indicators, suchas the MACD or moving averages, tend to be whipsawed as markets enter a nontrending congestion phase. On the other hand, oscillators (which work well duringtrading range markets) are often too early to buy or sell in a trending market. Thus,identifying the market phase and selecting the appropriate indicators is critical to asystem’s success. The congestion index attempts to identify the market’s characterby dividing the actual percentage that the market has changed in the past x days bythe extreme range according to the following formula:(C − C[X − 1])100C[X − 1]CI =Highest(H, X ) − Lowest(L , X )Lowest(L , X )
(9.16)
where C is the closing price; X is the time segment; and Highest and Lowest are thehighest high and lowest low respectively for the chosen time period X.To minimize daily noise the CI is further smoothed by a 3-day exponential movingaverage (see MetaStock formula in Appendix A).The congestion index fluctuates between 100 and −100. The larger the absolutevalue, the less congested the current market. Readings between +20 and −20 indicatecongestion or oscillating mode. Crossing over the 20 line from below indicates thestart of a rising trend. Conversely, the start of a down turn is indicated by crossingunder −20 from above.The CI can also be used as an overbought/oversold oscillator. The indicator signalsan exhaustion of the prevailing price trend and warns of an impending price reversalwhen it reaches an extreme reading either above 85 or below −85 and then reversesdirection.Unlike similar indicators, like the vertical horizontal filter (VHF) or Wilder’s ADX,the congestion index is directional for the following reasons:• It is self-contained in the sense that it eliminates the need for a second indicator toidentify the trend direction.• It is better in identifying trend reversals.• It provides more accurate readings in cases of temporary pullbacks.• The chart space is less congested.In the example of the S&P 500 in Fig. 9.10, the CI was the first to identify a risingtrend which started at the beginning of April 2007 and lasted until the end of May.
Intermarket Indicators
141
Figure 9.10 Chart of the S&P 500 from 1 February 2007 to 12 October 2007. The 3-daymoving average of the 28