On the next trade, the stress indicator jumps to 100 on December 11, 2008, and we sell 10 crude at 76.70 and buy 11,400 shares of XOM at 77.94. On December 16, the indicator value drops to 37.16, and the trade exits at 72.56 for crude and 81.06 for XOM. In this trade, we were short crude for more than a $5 profit and long XOM for more than a $3 profit. The total return on the pairs trade was $76,758.
FIGURE 6.12 XOM (top panel), crude oil (middle panel), and the stress indicator (bottom panel), along with the momentum indicators for the two legs. 20012008 TradeStation Technologies, Inc. All rights reserved.
Visualizing the Pairs Trade It is always a good check of your work to see the trading signals on a screen. Many careless errors are avoided that way. You can plot the stress indicator, the individual momentum indicators for the two legs, and the corresponding buy and sell points for the trade. Figure 6.12 is a Trade Station Securities chart with the signals given in the top panel along with prices for XOM. Crude oil prices are in the second panel, and the indicators at the bottom. TradeStation is a good candidate for programming this indicator and generating live signals or end-of-day signals. Table 6.2 showed some of the trading signals that appear in Figure 6.6. For each trade, there is only one crude contract traded, and the XOM shares represent the number needed to volatility-adjust the two legs.
A Reminder about Trading Hours When trading two very different markets, you will find that they often do not close at the same time, although they are both open at the same time for many hours. The crude oil market closes in New York at 2:30 P.M. each day, while the stock market is open until 4:00 P.M. Crude continues to trade in the after-hours market and can be traded 24 hours, although volume is much thinner throughout the evening and night.
The prices used in these examples are captured at two different times. If you wait until after the stock market closes, then calculate the values, you will be using the same prices. But then you would need to trade stocks and crude at about 4:30 P.M. That's not too bad for stocks, but you may start to see low volume for crude.
A professional systematic trader will capture both crude and stock prices shortly before the close of the stock market, run the numbers, then trade on or near the close of the stock market, when most other markets are still reasonably active. For these pairs trades, the best approach is to capture prices before the crude close, when both crude and the stock market are open and trading actively. And it is more likely that a distortion will occur intraday than based on the closing prices. It doesn't matter what time of day you calculate the stress indicator and generate a signal. If prices are distorted at 11 A.M. or at 1 P.M., and the stress indicator is above 95 or below 5, then the timing is good for a trade.
Tracking the Trades While entries must be executed promptly, exits are not as critical. We enter the trade when the distortion is unusual (and therefore less frequent), but there are many more opportunities to exit when prices return to normal, the most common situation. However, during volatile markets, which have become more frequent, exiting the first time the price moves back to equilibrium (a stress indicator value of 50) removes unnecessary risk.
Other Petroleum Companies While the crude-XOM pair has shown very good performance during the past three years, it is even more important that the exact same strategy works for other petroleum companies. There is no doubt that companies in the same business will show high price correlation to one another; therefore, if this method doesn't work for other petroleum companies, we can say that we overfit the data. We have already applied this method to mining and one agribusiness company with exactly the same rules, so we have hopeful expectations.
Table 6.8 shows the results applied to nine major petroleum companies listed on the NYSE, with ExxonMobil repeated at the top. These companies were chosen simply because of their capitalization and the availability of data. They are: XOM ExxonMobil SUN Sun VLO Valero EP El Paso COP ConocoPhillips MRO Marathon Oil APA Apache APC Anadarko CVX Chevron On the left are the results from January 2000 through March 2010, and on the right from January 2007 through March 2010. First, we can see that the results are uniformly profitable and consistent with expectations. None of the pairs lost money, and only El Paso had a losing stock market leg. During the most recent three years, there were about 35 trades per pair per year, and the unit returns of $462 per contract and $0.26 per share are well above our threshold for success. We can see from the jump in average values that successful performance was concentrated in the last three years.
TABLE 6.8 Performance of petroleum companies, from 2000 through March 2010.
Removing the Low-Volatility Trades Even with good results, we want to look further at what happens if we remove the trades that are taken when price volatility is low. Taking fewer trades means being out of the market more, and that avoids unnecessary risk.
Using the ATR to measure the risk and then converting that to a percentage of price was our way of generalizing a volatility filter. For the mining and agricultural pairs, we found that a filter of 3.0% seemed to yield a consistent improvement; therefore, the same method was applied to the petroleum pairs over both the longer and shorter test periods. The results are shown in Table 6.9.
TABLE 6.9 Results of oil company pairs using a low-volatility filter.
The averages show that filtering trades improved results in both periods. While the ratios went up about 10%, the unit profits jumped considerably, showing that the trades made during a low-volatility scenario returned smaller profits. The best result would have been that the filtered results of the longer period were as good as the unfiltered results of the shorter time period, but that isn't the case. The period from 2000 to 2010 gave an average ratio of 0.701, still lower than the 2007 to 2010 unfiltered period, which gave 1.060. Because the filtered method does not use hindsight, it is more likely to be realistic.
Comparison of Energy Profits There are four cases that have been under the microscope with regard to energy pairs: 1. January 2000 through March 2010 with no filters.
2. January 2000 through March 2010 with a low-volatility filter.
3. January 2007 through March 2010 with no filters.
4. January 2007 through March 2010 with a low-volatility filter.
FIGURE 6.13 (a) Comparison of c.u.mulative profits for energy companies, January 2000 through March 2010, no filters, and (b) comparison of c.u.mulative profits for energy companies, January 2000 through March 2010, with a 3% low-volatility filter.
Of these combinations, performance from 2007 was far better because it isolated the biggest moves in the history of the energy markets. Visualizing the results are always useful, and Figures 6.13a, 6.13b, 6.14a, and 6.14b show combinations 1 through 4. Figure 6.13a shows the long period of sideways, slightly positive performance into 2006, followed by more volatile, highly profitable returns through 2008 and mixed results afterward. ExxonMobil is the best performer, followed by Chevron, with the low end held up by Valero and Anadarko. Figure 6.13b used the same test period but applied a low-volatility filter of 3%. Total profits are lower because there are fewer trades, but those trades had higher unit returns and a better average information ratio. Using a filter was better than taking all trades.
FIGURE 6.14 (a) Comparison of c.u.mulative profits for energy companies, January 2007 through March 2010, no filters, and (b) comparison of c.u.mulative profits for energy companies, January 2007 through March 2010, with a 3% low-volatility filter.
The more recent three years are shown in Figures 6.14a and 6.14b. Even though the pairs strategy had an outstanding performance during this period, the filtered results were even better. This is easier to see in the individual profit streams than in the previous tables. While many of the returns start to decline in the last three to six months in the unfiltered performance, many more continue to be profitable when the low-volatility filter is used.
PORTFOLIO OF CROSS-MARKET ENERGY PAIRS.
Performance looks different when it's combined into a portfolio. No matter how similar the markets and trades, there are always differences that offset risk. When using futures, that risk reduction allows you to leverage up the trading, but with stocks that's not the case. With stocks, you can only bring the leverage down. Still, diversification will lower that risk, which may lower your investment, freeing up capital for other investments.
For pairs trading in energy, we always took a position of 10 contracts in crude oil and then found the number of shares of the stock that would make the risk the same as crude oil. Once we calculate the shares, we know the total exposure, the cost of the position. For this example, we will use the results from February 2010.
To trade one contract of crude oil, we need to deposit a margin amount of $9,788. For those who don't trade futures, margin is a good-faith deposit. If the position goes the wrong way, you may owe more. Margin is roughly 10% of the contract value, so with crude at $75 per barrel, a 1,000-barrel contract is worth $75,000. Margin tends to lag prices because it is set by the exchange based on its board's perception of market risk. Even at this level, your leverage is 7.6:1, which is far better than the stock market, which is 1:1.
TABLE 6.10 Daily profits and losses trading energy pairs, February 2010.
The daily profits and losses from trading both futures and stocks are shown in Table 6.10. The pattern of positions should be a surprise. Although the momentum for the crude leg is identical for each of these stocks, the positions are remarkably different. There are only three days in which five stocks had a position, February 8, 9, and 10, and on those days, the stocks did not have all profits or all losses, as we might expect from a highly correlated group. Fewer signals at the same time might mean that you need less capital than the worst-case scenario, and different profits and losses tell you that there will be a much greater benefit from diversification than originally expected.
To calculate the portfolio investment size, we recorded the largest position size and the corresponding entry price, then calculated the exposure for each stock, shown in Table 6.11. The largest position is multiplied by the price at the time of entry, and the total cost is the exposure. Not all positions were taken at the same time, so the table shows the worst-case scenario. It also shows the total margin needed to trade 10 contracts of crude for each of the nine pairs, where the margin for one contract is $9,788. The total investment needed is then $964,504, or $96,450 trading one contract of crude and a tenth the size for stocks.
TABLE 6.11 Exposure for each stock based on 10 contracts of crude oil, February 2010.
TABLE 6.12 Daily returns and portfolio returns, with annualized volatility at the bottom.
Using the investment of $964,504, the daily profits and losses can be converted to daily returns, r(s)t, for stock s, The daily returns for each of the nine pairs are shown in Table 6.12, with the average return (the portfolio return) in the rightmost column. The average implies that each pair was equally weighted. The bottom line, marked volatility, is the annualized volatility. Note that the lowest volatility is 6.99% and the highest 18.5%, but the volatility of the portfolio returns is only 5.75%, showing exceptional diversification. It is also important to realize that the standard deviations of the returns of each pair have more days with zero than with actual profits or losses. This reduces the standard deviation so that the volatility of the individual pairs does not reflect the risk on a day when you are trading, but the long-term risk. It may be more accurate, and more descriptive, to include only the days when positions were held (usually nonzero values) in the standard deviation calculation. However, the financial industry doesn't do it that way; therefore, we'll use the traditional method here.
Finally, we can calculate the NAVs for the month of February using the standard formula where Rt is the average daily return of all pairs. Table 6.13 shows the returns and the final NAVs, and Figure 6.15 shows the corresponding NAVs. Even a successful pattern of performance has both profitable and losing days. The returns for February show a drawdown of 1.18%, even while the month finished up 1.65%. Although this example showed only one month, a volatility of 5.75% is quite conservative, and there is no way to leverage that higher other than to borrow money, a tactic not generally recommended. In Chapter 7, we see that when trading only futures, leveraging up is a simple process. Implementing this strategy using options may also allow more flexibility.
OTHER OPPORTUNITIES.
Good traders and good technicians are constantly searching for new opportunities. Many of these come when prices or volatility moves to extremes, attracting partic.i.p.ation from the mainstream investor. It is well known that volatility attracts volume. Oil and gold are just the examples used here. It's not possible to say how long these opportunities will last, but there will be others to follow.
During 2007 and 2008, the profits of the airlines seemed to be inversely related to the price of crude oil. Also, the price of gold appeared to be reacting to the drop in the U.S. dollar, in particular the EURUSD. Gold is also attractive when investors feel threatened. The grain markets even began to react to the loss of value of the dollar and were gathered together TABLE 6.13 Portfolio returns and NAVs for February 2010.
Date Portfolio Return NAV 1/31/2010 100.
2/1/2010 0.00452 100.452.
2/2/2010 0.00365 100.086 2/3/2010 0.00185 99.901 2/4/2010 0.00513 100.414.
2/5/2010 0.00904 101.322.
2/8/2010 0.00212 101.536.
2/9/2010 0.00177 101.357 2/10/2010 0.00326 101.687.
2/11/2010 0.00022 101.710.
2/12/2010 0.00168 101.880.
2/16/2010 0.00271 101.604 2/17/2010 0.00190 101.410 2/18/2010 0.00432 100.972 2/19/2010 0.00098 100.873 2/22/2010 0.00093 100.779 2/23/2010 0.00107 100.887.
2/24/2010 0.00186 100.700 2/25/2010 0.00603 101.306.
2/26/2010 0.00343 101.654.
FIGURE 6.15 NAVs for energy pairs, February 2010.
into commodity funds to protect investors against rampant inflation. The most popular of these is the Goldman Sachs Commodity Index (GSCI).
Even if these opportunities last only six months, they are sources of trading profits. The next ones may come when the equity market begins its next rally or the U.S. dollar weakens due to the inflation that will inevitably follow the government bailout and recovery program. We might suddenly realize that the demand on energy far exceeds the supply, or investors again feel that gold is no longer a convenient inflation hedge. And while this program uses only closing prices, there are many more intraday opportunities if this method is applied to 15-minute or hourly data.
SOME FINAL NOTES.
All trading methods benefit from diversification, and short-term strategies tend to show differences more often than longer-term approaches because they are more sensitive to smaller changes in price moves, resulting in more frequent entries and exits. The cross-market strategy can produce different signals when crude oil is measured against different petroleum companies, but it is far better to incorporate both oil and metals combinations in the same portfolio. Agribusiness pairs or airlines can also be added. If the commodity markets differ, then the portfolio will gain important diversification.
As with any mean-reverting method, trading at different times of day will increase the opportunities. Markets are more likely to be out of line during the day and come back together on the close. They are also likely to diverge after economic reports or earnings reports. Those are valuable opportunities.
The limiting factor in the cross-market pairs is the inability to increase leverage. This is not the case when using only futures. Other than borrowing funds or using options, selecting more volatile periods to trade seems to be the best alternative.
1. This method was first introduced in the January 2009 Futures magazine, "Crossover Relative Value Trading," by Perry Kaufman.
Chapter 7.
Revisiting Pairs Using the Stress Indicator Having introduced the stress indicator in the previous chapter, we would like to look at the most important pairs that were discussed in Chapter 4, "Pairs Trading Using Futures," this time using the stress indicator to generate signals. These are equity index and interest rate futures, both very liquid sectors offering good opportunities for pairs trading. We will find that the results using the stress indicator are very different from the original momentum difference calculations.
FUTURES MARKETS AND THE STRESS INDICATOR.
In Chapter 4, we used the difference between two stochastic momentum indicators to generate pairs signals for pairs in equity index and interest rate futures markets. The results were successful but showed that a combination of U.S. and European markets is necessary to produce sufficient profits, rather than just U.S. markets. The correlation between most U.S. markets in either sector is too high, and few trades are generated. Those signals that were produced did not have enough profit to overcome normal commission costs.
In Europe, there is enough difference between the economies, especially if you include Britain, to produce profitable pairs trades in most equity markets, but there is less choice and higher correlations with interest rates. That still leaves a large number of pairs in markets that are highly liquid and have virtually no counterparty risk. Unlike a stock, which can surprise you any day with an announcement of gross mismanagement or fraud, a stock futures index or 10-year government bond doesn't have that problem. The failure of a single stock in the S&P 500 is not a disaster, and the clearing corporation for the Chicago Mercantile Exchange or Eurex has never had a default and has substantial funds and contingency plans to avoid investor losses due to nondelivery or other forms of counterparty risk.
The stress indicator is a simple manipulation of the two momentum values calculated for leg 1 and leg 2 of the pair. By taking the difference in the two values and using those numbers to create a third momentum indicator, we change the dynamics of the trading signals. Essentially, the signals are more uniform and the concept is more generalized, perhaps more robust. However, just like the original momentum values, the stress indicator does not consider volatility. In fact, all sense of volatility is lost during the process. This means that we might need to add a volatility filter in order to take only those trades with the potential for larger returns; otherwise, during a low-volatility period, we could be trapped taking many trades without the possibility of profits exceeding costs.
The following sections compare the original method using the momentum difference with the more generalized stress indicator. A detailed description of the calculations needed to create the stress indicator can be found in Chapter 6.
EQUITY INDEX FUTURES.
We had considerable success using the momentum difference for index markets, but a more generalized solution is always best. By converting the final momentum differences using the stochastic formula, we know that any value near 100 is overbought, and values near zero are oversold. The stress indicator will also handle relative changes in volatility differently.
We ran a few simple tests using the stress indicator, shown in Table 7.1. The first test used a calculation period of 4 because that was found to be the most effective for the momentum difference method, and because the shorter calculation periods capitalize on market noise. After $25 costs were applied, the results were quite good, showing small net returns per contract for leg 1 and larger returns for leg 2. An information ratio of 1.521 and annualized returns of 18% were very acceptable.
TABLE 7.1 Stress indicator tests for equity index futures. The top four tests vary the calculation period but leave the entry levels the same. The bottom test uses a volatility filter to find trades with larger per contract returns.
However, the average number of trades per pair, 347, was much higher than expected. Over the 4.5-year test period, November 2005 through March 2010, that comes to 77 trades per year, or a new trade every 3.25 days. That seems fast although not necessarily wrong. Still, it would be better if there were fewer trades and larger profits per contract. Note that this is a very different problem than with stocks, when we couldn't get enough trades with sufficient profits.
To accomplish this, tests were run with longer calculation periods: 5, 7, and 10. When selecting these numbers, we keep in mind that the percentage difference in the calculation periods that we test is important, even with a small sample. Moving from 4 to 5 is a 25% increase, 5 to 7 is a 40% increase, and 7 to 10 is a 42% increase. While these are large gaps, going from 9 to 10 is an 11% increase, which is disproportionately small. Given the small numbers and simple test, increasing the s.p.a.ce between periods gives the best representation of the method's performance profile.
The next three tests show a steady decline in the number of trades and a comparable increase in the returns per contract. The fourth test, using a period of 10 days, shows a 55% drop in the number of trades but an increase in per contract returns from an average of $140 to $151, a gain of only 7%. While increasing the calculation period showed that the results were stable, or robust, it did not accomplish our goal of significantly increasing the profits per contract.
Volatility Filter Another way to reduce the number of trades is to apply the volatility filter that was used in Chapter 3. It simply calculated the average true range over the same period as the momentum calculation, divided by the price to get a percent, and then ignored all trades that had volatility below that threshold on the day of entry. Once the trade was filtered out, it could not be entered at another time; the program waited for a new signal to enter.
We previously found that 3% was a good threshold number; therefore, we applied only that one condition to the best of the results, the 7-day stochastic calculation period. As shown in Table 7.1, the filter did much better, drastically reducing the number of trades from the original 213 to 83, a reduction of about 61%, and increasing the profits per contract from an average of $155 to $208. Instead of trading nearly every 5 days, using a filter reduced new signals to once every 13 days.
Comparative Results It's important to compare results using all pairs, not just the best ones. An improvement in a strategy should improve the losing pairs as well as the profitable ones, even if the losing ones still remain negative. Otherwise, you are focusing on a smaller and smaller set of results, making it far easier to overfit the data.
Table 7.2 compares the results of the momentum difference method from Chapter 4, the basic stress indicator, and the stress indicator filtered with a 3% volatility entry threshold. As seen in the averages on the bottom, the basic stress strategy had the highest ratio and annualized returns, but more trades than we wanted. When we added the filter, the number of trades dropped and the returns per contract increased substantially, while the ratio dropped a relatively small amount, as shown in the panel on the right. In some cases, the filter turned losses into profits, as with the SP-DJIA pair, but it also turned profits into losses, as with the SP-DAX. It may look as though the numbers are jumping around, but Figure 7.1 shows the ratios of each pair grouped together for the three methods. A fast glance shows that the profitable pairs are all similar for the three systems; that is, when one method posted a ratio of about 2, all methods did about the same. The results that changed from plus to minus were all marginal returns in the first place. There are no cases where the stress method shows a ratio of 1.0 and the momentum a ratio of 1.0, a complete reversal. It shows that we are dealing more with subtleties than with structural changes in the strategies. Both are mean reverting, and both are based on similar indicators. Still, we want to trade the strategy that gives us the best chance of success.
FIGURE 7.1 Comparison of index pairs performance ratios using momentum, stress, and filtered stress.
TABLE 7.2 Comparative results for index pairs using momentum, stress, and filtered stress.
Correlations and Returns In Chapter 4, we showed the relationship between the correlations of index pairs and their return ratios. That relationship is repeated in Figure 7.2. It shows a very clear inverse relationship between correlation and returns; that is, as the correlation declines, the returns increase. Naturally, that is not a relationship that exists normally, but it does when the pairs are fundamentally linked to each other. The lower correlation shows opportunity, and none of the pairs would have a correlation of zero. The lowest correlation is about .40.