do not help either.Because of their low correlation to equities, most commodities are attractive diversification candidates as they can lead to a large increase in return while simultaneouslyreducing risk. Furthermore, futures diversification is particularly effective in declining stock markets, just where it is needed most. During periods of very low or negativestock returns, commodities (except industrial metal futures) dominate the portfolioreturn, acting as a hedge, or buffer, in falling markets. The benefit of including foreignstocks is not so clear as the world has gotten smaller due to the ability to communicatealmost instantaneously.
Intermarket Analysis
11
Unfortunately, the approach of most novice investors or even fund managers isto have no risk management at all and it becomes obvious too late that this is anextremely dangerous omission. A fund or portfolio manager should not be evaluatedonly by the return he has achieved. Another important criterion of his performance isthe portfolio risk exposure over time. A good benchmark of that risk is the standarddeviation of returns. This is a measure of how far apart the monthly or yearly returnsare scattered around the average.Correlation is a relatively simple concept but absolutely mandatory in the useof investments. It basically refers to whether or not different investments or assetclasses will move at the same time for the same reason and in the same direction.To be effective, diversification must involve asset classes that are not correlated(that is, they do not move in the same direction at the same time). High positive correlation reduces the benefits of diversification. On the other hand, selectinguncorrelated or negatively correlated asset classes not only reduces the downsidevolatility in the performance curve of the portfolio to a minimum but can also increase overall profitability as well. An example will help illustrate the basics ofdiversification.Suppose you are considering diversifying your stock portfolio by adding an uncorrelated commodity future from the energy complex. If you invest your entire equityin either stocks or crude oil futures, and returns vary in the future as they have in thepast, your equity line (in points) will be similar to the charts in the bottom windowof Fig. 1.5. If, however, you invest 70 % of your initial capital in stocks and 30 % incrude oil futures, your equity line will be similar to the top chart in Fig. 1.5. You canclearly see that the portfolio’s returns are not nearly as volatile as are those of theindividual investments.The reason for the reduction in volatility is that stocks did not move in the samedirection at the same time with crude oil futures. Thus, a crucial factor for constructingportfolios is the degree of correlation between investment returns. Diversificationprovides substantial risk reduction if the components of a portfolio are uncorrelated.In fact, it is possible to reduce the overall risk of the portfolio to almost zeroif enough investment opportunities having non-correlated returns are combinedtogether!Maximum return, however, is also proportional to risk. Low risk investmentsproduce low returns and speculative or riskier investments can produce higher returns.Thus reducing risk can also reduce return. Like everything else in life, the best solutionis a compromise between risk and return.The problem is therefore reduced to finding an efficient portfolio that will maximizeexpected return according to one’s individual risk preferences. The following examplewill help illustrate the basics of selecting an appropriate portfolio of securities or assetclasses.Let’s suppose that we want to invest in international equities but also diversifyinto futures and forex. For simplicity’s sake I include only one sample from eachasset class, for example crude oil futures to represent commodities, gold to represent
8
Intermarket Trading Strategies
Figure 1.3 Weekly composite chart of the S&P 500 (thick line), the CRB index (thin linewith the scale on the right Y- axis) and US Treasury Bonds (grey bar chart) from 1997 to 2008.Down arrows indicate major tops in stocks and bonds and up arrows bottoms.
Bonds were also the first to bottom in anticipation of the recovery, followed bycommodities and then stocks. From the beginning of 2003 until the middle of 2005all three were rising together. Commodities are usually the last to bottom during arecovery but this was not the case here as they were boosted by the weakness in thedollar. The dollar made a final peak in January 2002 and reversed direction, droppinglike a rock against the euro and other major currencies. This triggered a secular bullmarket in gold which spread to the rest of the commodities and has continued untilthe end of June 2008, almost nine months after stocks peaked in September 2007.More information on the business cycle, including sector rotation during economiccycles, can be found in John Murphy’s excellent book Intermarket Analysis: Profitingfrom Global Market Relationships (see Bibliography).
12
Intermarket Trading Strategies
Figure 1.5 Monthly comparison chart of the S&P 500 (bar chart with the scale on the rightY-axis) and light sweet crude oil futures continuous contract (NYMEX:CL) (line chart below)from January of 1994 to January of 2008. The equity line of a composite portfolio consisting of70 % equities (represented by the S&P 500) and 30 % oil futures is plotted in the top window.The composite portfolio produced better returns with less volatility.
precious metals and the British pound to represent foreign exchange. Internationalequities are represented by the S&P 500 (or a stock selection tracking the S&P), oneEuropean (the FTSE 100) and one Asian (the Hang Seng) index. In Table 1.1, I haveprepared the average yearly percentage returns and standard deviation of returns. Ihave also calculated, at the bottom of the table, the total average 10-year return andthe standard deviation of returns using Excel’s STDEV function.The correlation coefficients between the selected asset classes or indices are listedin Table 1.2. These coefficients are based on monthly percentage yields and arecalculated, as part of this study, over the same 10-year period. As discussed later, thecorrelation coefficients play a role in selecting the asset class allocation.You can see from Table 1.2 that the S&P 500 is correlated only with internationalindices. Among the other asset classes, the British pound is weakly correlated withgold (r = 0.36) and negatively correlated with the FTSE (r = −0.30) so it might bebeneficial to include the pound together with the FTSE but not with gold. Gold is
Intermarket Analysis
13
Table 1.1 All stock index returns include dividends. Also foreign index returns wereconverted to US dollars. The bond returns were obtained from the Lehman Brothers website(http://www.lehman.com/fi/indices/) and concerned aggregate returns of the US Bond Index.British pound (GBP/USD) returns include price appreciation versus the USD and also interestincome. Oil returns were obtained from the historical continuous light sweet crude oilcontract (NYMEX:CL).Annual returnsYear
S&P 500
FTSE
Hang Seng
Bonds
GBP
Gold
Crude oil
Cash
1997199819992000200120022003200420052006
33.3628.5821.04−9.10−11.9−22.128.6810.884.9115.79
23.9817.0217.22−15.6−17.6−8.7927.6018.439.7027.77
−17.3−2.1571.51−8.96−22.0−15.138.5516.307.8237.35
9.658.69−0.8211.638.4410.264.104.342.434.33
2.316.472.37−1.851.3913.5614.3512.25−5.7818.85
−21.8−0.260.00−5.552.4824.8019.095.5818.0023.17
−31.9−31.7112.44.69−26.057.34.2333.6140.480.02
5.255.064.745.954.091.701.071.243.004.76
MeanSt Dev
10.0219.14
9.9717.53
10.6130.35
6.314.00
6.398.02
6.5514.73
16.3145.67
3.691.80
also very weakly correlated with crude oil (r = 0.18). As you will see later, however,in the case of low correlations the volatility and not the correlation coefficient is thedominant factor to consider in reducing portfolio risk. Bonds had very low correlationwith the British pound (r = 0.10) and crude oil (r = 0.11) but were not particularlycorrelated with the others.Table 1.2 Pearson’s correlation of monthly percentage yields for the 10-year period from1997 to 2006.Correlation of monthly returns
S&P 500FTSEHang SengBondsGBPGoldOil
S&P 500
FTSE
Hang Seng
Bonds
GBP
Gold
Crude oil
10.810.57−0.06−0.09−0.04−0.03
0.8110.57−0.02−0.30−0.060.03
0.570.5710.050.000.110.18
−0.06−0.020.0510.100.080.11
−0.09−0.300.000.1010.360.00
−0.04−0.060.110.080.3610.18
−0.030.030.180.110.000.181
14
Intermarket Trading Strategies
Table 1.3 Risk reduction associated with asset allocation and correlations. The standarddeviation of each portfolio was calculated in a separate spreadsheet by adding the annualreturns of each asset class according to their percentage weights in the portfolio and thencalculating the standard deviation of the annual returns for the entire 10-year period of thestudy.
Portfolioallocation
US stocks Stocks &onlybonds
S&P 500CashFTSEHang SengBondsGBPGoldCRBOil
100 %
Average % ReturnStandard deviationRisk adj. return
10.019.10.52
70 %10 %
20 %
Internationalstocks &bonds
Stocks,bonds &futures
50 %10 %10 %10 %20 %
40 %
Minimum Maximumriskreturn10 %
60 %
10 %40 %55 %10 %
8.6413.10.66
8.6912.50.70
10 %
15 %
30 %
8.816.861.28
8.926.381.40
11.9618.700.64
A comparison of the returns, standard deviation and risk adjusted return of the fourhypothetical passive portfolios shows the real effect of diversification (Table 1.3).The first portfolio (in the third column of Table 1.3) contained a typical allocation ofasset classes found in an average US fund, i.e. 70 % equities, 20 % bonds and 10 %money market. By including uncorrelated assets such as bonds and cash (with zerocorrelation with the S&P), a risk reduction of 31 % was achieved with only 1.4 %reduction in returns. A further 5 % risk reduction was accomplished by includinginternational equities (10 % British and 10 % Hong Kong equities). The main reasonfor including international equities was to improve on US equity returns, but this wasnot the case in the hypothetical portfolio as the Hang Seng underperformed the S&P500 during the 1997–1998 Asian financial crisis. Commodities, however, were thereal star of the show as they played an important role in significantly reducing riskand, at the same time, increasing return.This is evident from the standard deviation of returns of the third hypotheticalportfolio. A huge 64 % reduction in risk was achieved by including gold (10 %) andcrude oil futures (10 %), even though the standard deviation (and risk) of investingin crude oil alone was more than double that of the S&P.The fourth portfolio was obtained by finding the best allocation (highest return)with the minimum risk. This produced a portfolio consisting of 30 % US equities,55 % bonds and 15 % oil futures. The relatively high percentage allocation of bonds
Intermarket Analysis
15
was to be expected as their standard deviation was the lowest of the group. Thepresence of the highly volatile oil futures in the minimum risk portfolio, however,was certainly a surprise.This portfolio reduced risk by an astonishing 64 %, sacrificing only 1.2 percentagepoints in return compared to the equities only portfolio.The relatively low performance of this portfolio was no surprise as the standarddeviation is proportional to returns: the smaller the standard deviation, the smallerthe risk and, of course, the smaller the potential magnitude of the return. Thereis therefore a limit beyond which the expected return cannot be increased withoutincreasing risk.Finally I used Excel’s Solver to maximize return without increasing the risk morethan the first (equities) portfolio. This portfolio (last column in Table 1.3) included60 % US stocks, 10 % international equities and 30 % crude oil futures. It outperformed the S&P 500 by almost 2 percentage points with slightly less risk. Typically,futures can be added up to a maximum 30 % allocation while maintaining a riskadvantage over a portfolio without futures.In maximizing the return I had to constrain the risk to lower than the first portfolio,otherwise the solver produced a portfolio consisting of 100 % oil futures whichis unacceptable. Similarly in minimizing risk (fourth portfolio) I had to specifya minimum return otherwise the solution also produced an unacceptable portfolioconsisting mostly of cash and bonds. I also had to constrain the allocation percentagesto positive values otherwise the solution occasionally included negative allocationsindicating selling the asset short rather than buying.Of course future performance rarely measures up fully to past results. Whilehistorical relations between asset classes may provide a reasonable guide, rates ofreturn are often less predictable. In addition, as you can see from Fig. 1.4, correlationscan also change over time.One solution is to rebalance the portfolio on a set time period to take into accountthe most recent correlations in order to maintain the desired level of risk exposure.This method of asset allocation, is not the only one, however.A different, dynamic rather than static, approach would involve changing assetweights depending on market conditions. This can be accomplished by reducing theallotment of equities in favor of cash, precious metals or foreign exchange in a downmarket. A dynamic asset allocation trading system is also discussed in Chapter 16 ofthis book.
2Correlation
Study the past if you would divine the future.–Confucius
2.1
THE CORRELATION COEFFICIENT
2.1.1 Pearson’s CorrelationThe correlation coefficient measures the strength and direction of correlation or corelation between two variables.There are several methods, depending on the nature of data being studied, for calculating the correlation coefficient, but the best known is Pearson’s product-momentcorrelation coefficient, usually denoted by r, which is obtained by dividing the covariance of the two variables by the product of their standard deviations. The formulafor calculating Pearson’s r is:r=
σX Yσ X σY
(2.1)
where σ XY is the covariance of variables X and Y and σ X, σ y are their standarddeviations. The covariance is the cross product of the deviations from the mean andis calculated by the following formula:σX Y =
(x − x̄)(y − ȳ).n−1
(2.2)
Unfortunately the size of the covariance depends on the values of measurementof each variable and is not normalized between −1.0 and +1.0 as is the correlationcoefficient.
18
Intermarket Trading Strategies
Substituting for the covariance in (1.1) we get:zx z yr=σx σ y (n − 1)
(2.3)
which is the average product of the z-scores, where z x = (xi − x̄) and z y =(yi − ȳ).The correlation coefficient varies between −1 and 1. A value of +1 indicates aperfect linear relationship with positive slope between the two variables; a value of −1indicates a perfect linear relationship with negative slope between the two variablesand a correlation coefficient of 0 means that there is no linear relationship between thevariables. Values in between indicate the degree of correlation and their interpretationis subjective depending to some extent on the variables under consideration.The interpretation is different for medical research, social, economic or financialtime series data. In the case of financial time series the interpretation can againbe different depending on whether we compare raw price data or percent changes(yields), as the direct calculation of the correlation based on absolute prices tendsto overestimate the correlation coefficient as relations between financial price seriesare seldom linear. Correlations based on price percent changes, on the other hand,produce more realistic values for the correlation coefficient as they deviate less fromlinearity.Therefore, although the correlation coefficient between two time series is unique,two different interpretations are included in Table 2.1, according to the method usedfor the calculation, in order to take into account the error resulting from the violationof the linearity assumption.Table 2.1 Interpretation of Pearson’s correlation coefficient. The second column applies tothe correlation between raw price data and the last column to percent weekly changes oryields. The interpretation for negative values of Pearson’s correlation is exactly the same.Correlation coefficient r
Interpretation
Absolute value
Price comparison
Percent changes
0.9 to 10.8 to 0.90.7 to 0.80.6 to 0.70.5 to 0.60.4 to 0.50.3 to 0.40.2 to 0.30.1 to 0.20 to 0.1
Extremely strongVery strongStrongModerately strongModerateMeaningfulLowVery lowVery slightNon-existent
Extremely strongVery strongVery strongStrongModerately strongModerateMeaningfulLowVery lowNon-existent
Correlation
19
A more precise interpretation arising from the correlation coefficient is recommended by some statisticians and requires one further calculation. If the correlationcoefficient is squared, the result, commonly known as r2 or r square or coefficientof determination (see also Section 2.1.2), will indicate approximately the percent ofthe “dependent” variable that is associated with the “independent” variable or theproportion of the variance in one variable associated with the variance of the othervariable. For example, if we calculated that the correlation between the S&P 500 andthe 10-year Treasury yield (TNX) is 0.50 then this correlation squared is 0.25, whichmeans that 25 % of the variance of the two indices is common. In thus squaring correlations and transforming the result to percentage terms we are in a better positionto evaluate a particular correlation.There is also another factor we must consider when we try to interpret the correlation coefficient – the number of points we have used.If we plotted only two points, then we would be bound to get a straight line betweenthem. With three points there is still a chance that the points will lie close to a straightline, purely by chance. Clearly, a high correlation coefficient on only a few points isnot very meaningful.Traders often need to know if time series of commodity or stock prices are cyclicand, if they are, the extent of the cycle. The correlation coefficient can also be used inthis case by testing for auto-correlation at different lags (testing whether values in agiven series are related to other values in the same series). By doing many correlationswith differing lags, the extent or duration of the cycle can be determined.
2.1.2 Coefficient of determinationThe coefficient of determination r2 is the square of Pearson’s correlation coefficient. Itrepresents the percent of the data that is the closest to the line of best fit. For example,if r = 0.922, then r2 = 0.850, which means that 85 % of the total variation in y can beexplained by the linear relationship between x and y (as described by the regressionequation). The other 15 % of the total variation in y remains unexplained and stemsfrom other exogenous factors. In regression, the coefficient of determination is usefulin determining how well the regression line approximates the real data points but itcan also be used (as explained above) to interpret the correlation coefficient.2.1.3 Spearman’s ρThe best known non-parametric correlation coefficient is Spearman’s rank correlationcoefficient, named after Charles Spearman and often denoted by the Greek letter ρ(rho). Unlike Pearson’s correlation coefficient, it does not require the assumption thatthe variables are normally distributed but, like Pearson’s correlation, linearity is stillan assumption.
20
Intermarket Trading Strategies
The main advantage of using the Spearman coefficient is that it is not sensitive tooutliers because it looks at ranks as opposed to actual values.The formula for calculating Spearman’s correlation, ρ is:6 d2(2.4)ρ =1−n(n 2 − 1)where d is the difference between paired ranks on the same row.Similar to Pearson’s correlation coefficient, Spearman’s ρ takes values between −1and +1. In calculating Spearman’s coefficient some information is lost because theprices are converted to ranks. Therefore, when two variables appear to be normallydistributed it is better to use Pearson’s correlation coefficient.The concept of correlation will be discussed extensively in the rest of the book andshould be fully understood by the readers, so I have included an example of calculatingboth Pearson’s and Spearman’s correlation coefficients in the Excel worksheets inTables 2.2 and 2.3 respectively.2.2
ASSUMPTIONS
2.2.1 LinearityThe formula used when calculating the correlation coefficient between two variablesmakes the implicit assumption that a linear relationship exists between them. Whenthis assumption is not true, the calculated value can be misleading. In practice thisassumption can virtually never be confirmed; fortunately, the correlation coefficientis not greatly affected by minor deviations from linearity. However, it is alwaysprudent to look at a scatterplot of the variables of interest before making importantconclusions regarding the relation between two variables.To understand what a linear relationship is, consider the scatterplots in Figs. 2.1,2.2 and 2.3.The first scatterplot in Fig. 2.1, between the S&P 500 and the British FTSE 100,illustrates an approximate linear relationship, as the points fall generally along astraight line. Keep in mind that in the financial markets there is no such thing as aperfect linear relationship. In contrast, the plot in Fig. 2.2 between the S&P 500 andthe Nasdaq 100 exhibits a curvilinear relationship. In this case increasingly greatervalues of the Nasdaq 100 are associated with increasingly greater values of theS&P 500 up to a certain value (approximately 1200 on the Nasdaq scale).A statistician, not knowing what each variable represents, would try to fit a cubicline of the formSP = a + b.NDX + c.NDX2 + d.NDX3and predict future values of the S&P 500 using the cubic equation above.
0.630150.0420.812
17
Nmean µσ
ROWCOLUMNBCDEFGH
B17−B$20D17* D17C17−C$20F17* F17D17* F17
0.640−0.132−0.2890.4700.4440.406−0.036−0.6670.0960.0720.2630.298−0.107−0.179−0.227
−1.3440.929−0.008−0.325−0.430−1.6640.1631.088−0.402−0.2500.3320.6130.4011.1330.394
12-8-0612-11-0612-12-0612-13-0612-14-0612-15-0612-18-0612-19-0612-20-0612-21-0612-22-0612-26-0612-27-0612-28-0612-29-06
1.052150.0700.352
Y
X
Date
C
B
A
B18/B19C18/C19
COUNT(B3:B17)COUNT(C3:C17)
H19/B21/C21
20
H18/(B19−1)
0.3250.0410.1290.1600.1400.1130.0110.5430.0010.0000.0370.0520.0310.0620.088
(Y − µ)2
G
H
−2.897−0.207−0.725
−0.790−0.1790.018−0.147−0.176−0.573−0.013−0.771−0.011−0.0010.0560.130−0.064−0.272−0.105
(X − µ)(Y − µ)
SQRT(E18/(B19−1))SQRT(G18/(C19−1))
21
1.733Covariance σ xy =Pearson’s Correlation r
0.570−0.202−0.3590.4000.3740.336−0.106−0.7370.0260.0020.1930.228−0.177−0.249−0.297
Y−µ
F
Excel Formula19
9.223
1.9210.7870.0030.1350.2232.9100.0151.0940.1970.0850.0840.3260.1291.1900.124
(X − µ)2
X−µ−1.3860.887−0.050−0.367−0.472−1.7060.1211.046−0.444−0.2920.2900.5710.3591.0910.352
E
D
Table 2.2 Example of calculating Pearson’s r in Excel. The variables X and Y are the daily percent change in gold and the dollar indexrespectively from 8 December 2006 to 29 December 2006.
18192021
34567891011121314151617
2
1
RANK(B17,B$3:B$17)RANK(C17,C$3:C$17)(D17−E17)ˆ2
17
0.63015
N
ROWCOLUMNBCDEF
0.640−0.132−0.2890.4700.4440.406−0.036−0.6670.0960.0720.2630.298−0.107−0.179−0.227
−1.3440.929−0.008−0.325−0.430−1.6640.1631.088−0.402−0.2500.3320.6130.4011.1330.394
12-8-0612-11-0612-12-0612-13-0612-14-0612-15-0612-18-0612-19-0612-20-0612-21-0612-22-0612-26-0612-27-0612-28-0612-29-06
143911131582121074516
Rank
D
Excel Formula
SUM(F3:F17)
SUM(B3:B17)SUM(C3:C17)
18
Spearman’s Correlation ρ =
1.052
Y
X
Date
C
B
A
2
d2
20
−0.707
956.00
181920
34567891011121314151617
1
F
1696425811001211169254112512149
1−6* F18/B19/(B19ˆ2−1)
111142349157865101213
Rank
E
Table 2.3 Example of calculating Spearman’s ρ in Excel. The variables X and Y are the daily percent change in gold and the dollar indexrespectively from 8 December 2006 to 29 December 2006.
Correlation
23
1600
S&P VS. FTSE-100 15 Year Scatterplot
1400
1200
S&P-500
1000
800
600
400
R Sq Linear=0.909
2002000
3000
5000
4000
6000
7000
FTSE
Figure 2.1 Scatterplot of the S&P 500 and the British FTSE 100, for the last 15-year period.The relationship is approximately linear, as the points fall generally along a straight line.
A chart of the two indices in Fig. 2.4, however, reveals the true reason of discontinuity of the linear relationship: a decoupling of the two indices which started inthe middle of 1998, with the Nasdaq outperforming the S&P until the bubble peakof March 2000, and its subsequent devastating collapse which happened to coincidefor values of the Nasdaq greater than 1200