Part 9 (1/2)

Risk-Adjusted Spreads Not all trading that removes directional risk is mean reverting. There are times when two related markets move steadily apart, with one product more desirable than another or one company doing better than another. There are many examples in the stock market. One cla.s.sic case was Dell and Compaq. Compaq was the early success story in personal computers and the first company to use MS-DOS (the first product of Microsoft) in the early 1980s. In a sign of the evolution of small computers, Compaq acquired Digital Equipment Corporation in 1998, the most prestigious minicomputer company. In another turn of the tables, Dell's new business model, selling computers with no retail outlets, rapidly overwhelmed other manufacturers, and by 2002 Compaq was forced to merge with Hewlett-Packard. Even the Compaq name didn't survive for long.

DELL AND HEWLETT-PACKARD.

For the past 10 years, Dell and Hewlett-Packard share prices have flip-flopped, with Dell leading for the first five years and HP overtaking Dell in 2006, as shown in Figure 5.1. An investor normally takes advantage of these broad moves by studying the fundamentals of both companies. If they are clever enough to realize that Dell's business model worked brilliantly when profit margins were high but would suffer as price compet.i.tion became more intense, they could have sold Dell short and bought Hewlett-Packard, netting a hefty gain. But our focus is on systematic, algorithmic trading.

FIGURE 5.1 Dell and Hewlett-Packard share prices from 2000.

A basic way to track these markets is to use the standard 200-day moving average. The only thing special about the 200-day moving average is that many traders watch it and it has taken on the role of a significant indication of market trend. We might have expected a 250-day, a 125-day, or a 63-day average to be more interesting because they are multiples of calendar quarters (in business days), and stocks report earnings quarterly. However, it's never a good idea to fight the market, so we'll stay with 200 days. Figure 5.2 shows the 200-day averages for Dell and HP from 2000. The trends are very clear and remain intact for months and years at a time. Simply buying when the trend turns up and selling short when the trend turns down would have been a successful strategy.

FIGURE 5.2 The 200-day moving averages applied to Dell and Hewlett-Packard.

However, following the trend of these two stocks independently means that from 2003 through mid-2005, you would have been long both companies and, during 2001 and from 2008 through mid-2009, you would have been short both. During those periods, amounting to about half the data, you would be exposed to directional risk. The purpose of this book is to avoid directional risk; therefore, we'll only look at positions where we are short one stock and long the other.

If we're patient, we could trade only when the two trends are going in opposite directions. That would actually give us hedged positions, some of which would be held for a long time. It also would create a lot of small trades, many of which will be losses. Even though the moving averages look smooth, and we take our positions from the direction of the moving average, the eye can deceive us. During the sideways period in 2002, the Dell trend wiggled up and down, causing false signals. Figure 5.3 shows the spread trades by posting a +1 when we are buying Dell and selling short HP, a 1 when we are selling Dell short and buying HP, and a 0 when we have no position (both trends are moving in the same direction). We want the chart to have continuous horizontal lines at +1 or 1, which means that we held the trade for a long time, as we did from about September 2005 through April 2007. Unfortunately, that is the only sustained position. From mid-2001 through April 2005, the lines going up and down indicate positions that have been closed out and reset. When more positions are reset, there are more losses.

FIGURE 5.3 Dell-HP trades when their trends are going in the opposite direction.

The better way to look at the Dell-HP trade is by using the ratio of their prices, in this case Dell divided by HP. Some a.n.a.lysts use the difference in prices, but that creates a very different picture. For example, when Dell and HP were both $25, the ratio would be 1.0 and the difference would be zero. If Dell moved to $50 while HP remained at $25 then the ratio would be 2.0 and the difference $25. The ratio indicates that Dell is twice the price of HP, even if Dell was $100 and HP was $50. At that point, the difference would be $50. We would need to remember the starting value of $25 to know that we had doubled the difference. As prices got higher, the differences would also get larger, reflecting higher volatility. But the ratio remains a percentage measurement and offers more consistency.

FIGURE 5.4 The Dell/HP ratio with a 200-day moving average.

FIGURE 5.5 The Dell-HP difference with a 200-day moving average.

Figures 5.4 and 5.5 show the ratio and difference, each with a 200-day moving average. Both of the trends are smoother than the trends of the two stocks separately, as seen in Figure 5.2. The ratio shows a few sustained, smooth trends, while the trend of the differences has two periods where it reversed direction numerous times, during 2003 and 2004 and then again in 2008 and 2009. Strictly from a practical view, the ratio performs better. To show this clearly, we calculated the number of trades for each method, where a trade is based only on the direction of the moving average line and not triggered by the price penetrating the moving average. The trend of the ratio had only 6 trades based on the changing direction of the 200-day trend line, while the trend of the differences had 60 trades over the same period, of which 17 were reversed after only one day. Without calculating the performance of the differences, the net returns using differences are likely to be a large loss.

To trade the ratio, we buy Dell and sell HP short when the trend of the ratio is up, and sell Dell short and buy HP when the trend of the ratio is down. As we did for pairs trading in the previous two chapters, the positions must be balanced according to their volatility. This maximizes diversification and reduces risk. In this case, the volatility was calculated using the average true range over the past 120 days, and the size of the positions were not changed during the length of the trade. Table 5.1 shows the six individual trades for the Dell/HP ratio. In 2001, HP was more volatile than Dell; consequently, it has only 79 shares compared with Dell's 100. During the next few years, as Dell showed more success than HP, it shows more volatility and smaller positions than HP. Overall, the percentage returns over less than nine years were greater than 11% per annum. More important, the big picture satisfies our general concept of when we would go long and short these two stocks, given a strategic approach to trading. And, of course, there is no directional risk.

TABLE 5.1 Trades for Dell and HP using the 200-day moving average of the Dell/HPQ ratio.

TRADING BOTH LONG-TERM (HEDGED) TRENDS AND SHORT-TERM MEAN REVERSION.

The trades in this chapter focus on the long-term divergence of two stocks or futures markets. This divergence can occur even while there are short-term opportunities for statistical arbitrage. The reason for this can be found in Chapter 2. If we look at prices over a very short time interval, we see more noise, but over the longer period, the trend is dominant. We can then be arbitraging Dell and HP over 3-day intervals but be long HP and short Dell for the longer-term trade.

In general, any calculation period under 10 days is targeting market noise, and those over 30 days are looking for the trend. Macrotrend strategies typically use trends in the range of 60 to 80 days, but those periods could be longer rather than shorter. In the previous example we used a 200-day average to base our technical version of a fundamental, or value, trade in order to emphasize the trend and minimize noise.

Balancing Fundamentals and Technicals There is constant debate over which is better, fundamental (or value) trading or technical a.n.a.lysis. The reality is that both can be good or bad. With fundamental a.n.a.lysis, you take a long position because the stock is undervalued, and if it goes down but there is no new information to say that fundamentals have changed, you simply own the stock at an even better price. Then the risk of a value trade can be very large, and there is no way to put a limit on it by using the same fundamental data.

Technical traders have a different problem. Because they may be following a long-term trend, they could go long Eurodollar interest rates when the price is 99.75 (a yield of 0.25%). The return is severely limited because prices can only go to 100, but the risk can be much greater (understanding that there can also be carry profits). The trend calculation does not know that yields are at historic lows and that the risk/reward of the trade is very unattractive. Some traders would call going long simply stupid and following every system trade naive.

Why not use the best of both methods? If you have an opinion on the direction of a stock or futures market, then use the technicals for timing. For example, if you have decided that the U.S. dollar is going to decline because of debt and relative Asian economic strength, then you would want to buy the EURUSD or sell the dollar against the Korean won, USDKRW. But you would do this only when the trend of USDKRW signaled a turn down. Then, if you're wrong, the trend will turn up, and you can exit. As long as you believe the dollar will weaken, you don't go long but wait for another short signal. This way, you've put a risk management plan on top of a calculated decision to sell the dollar and buy Asia.

GOLD, PLATINUM, AND SILVER.

The relations.h.i.+ps between gold, platinum, and silver have been studied for many decades. The gold/silver ratio was traditionally considered normal at 35:1, but then gold was fixed at $35 per ounce and silver was $1 per ounce. It was also said that you could buy a pound of meat for an ounce of silver, but times change. With gold at more than $1,200 per ounce and silver at reaching new highs of $20 per ounce, the relations.h.i.+p seems to have broken down and now sits at 64:1. Is it simply adjusting to a new level, or is it a false concept?

These next comments should be prefaced by saying that everything is clear after the fact. If you don't like this explanation, you can subst.i.tute your own. You'll find that the financial news commentators, who are indeed very smart, always sound brilliant when discussing the issues that made the market go up or down yesterday. But these reasons are only clear afterward and never seem to be the same. Our problem is to decide on a profitable position in advance.

Many things have changed, perhaps evolved, during the past 50 years. With regard to gold and silver, some countries still hold a store of gold to back their currency, but it is not as formal or as common as in the past. The value of a currency floats based on the perception of the country's economic strength, with only a slight help from an above-average holding of gold reserves. Yet most people still value gold as an internationally recognized store of value. In addition, the consumption of gold has increased with new electronic uses. Gold turns out to be very good for conducting electricity and has been used as a contact point on high-end circuit boards. Reclaiming that gold is a difficult and highly regulated process, so much of it is lost.

Some history of gold trading is also necessary to understand the changes. Gold was fixed at $35 per ounce until the decision at Bretton Woods on August 15, 1971, to allow gold to float and allow Americans to own gold. The impact of that decision was that the value of a country's currency would be determined by its economic strength and not by its store of precious metals that served to back the currency. Following that decision, gold moved steadily higher, settling near $150 an ounce.

In 1970, the Hunt brothers decided to corner the market in silver, and by 1979, they had effectively accomplished that goal. From 1979 to 1980, silver moved from $11 per ounce to $50, peaking in January 1980 before starting one of the greatest collapses in history. Because of the gold-silver relations.h.i.+p, gold paralleled the silver move, peaking at about $800 per ounce and then plunging along with silver. At the peak, the gold:silver ratio was 16:1, indicating that silver was the driving force.

In the same way investors joined the great tech rally in the 1990s, they also kept buying gold and silver during the run-up to 1980. The general public always seems to have the largest position at the worst time. A large number of companies offered to help investors acquire gold to diversify and improve their personal portfolios. Even now, with gold above $1,200, there are firms saying the same thing. When gold and silver collapsed in 1980, investors were badly hurt-not quite as badly as the tech collapse, because gold and silver have an intrinsic value, but still losses that exceeded 75%.

Silver, which for investment purposes is considered the poor man's gold, never recovered. Those investors had long memories. Even gold prices remained low and very quiet for 20 years, until September 2000. Along with the decline in the economy that paralleled the tech bubble, people started buying gold. It is not surprising that investors would choose hard a.s.sets after losing badly in the stock market. But they did not go back to buying silver. Once seems to have been enough.

For those still considering trading the gold/silver ratio, Figure 5.6 shows the wide fluctuations and occasional volatile s.h.i.+fts. This is not what we would consider a tight relations.h.i.+p. There seem to be large intervals where the ratio trends up or down, making it difficult to put rules in place. Some traders may think of this as a challenge, but we will look for markets that are less risky.

FIGURE 5.6 Gold/silver ratio using nearest futures, from August 1983 through August 2009.

THE PLATINUM/GOLD RATIO.

Unlike silver, platinum is a precious metal, so the relations.h.i.+p between gold and platinum should be more stable. However, the uses for platinum have also changed over the years, with platinum, or platinum group metals, now the key component in catalytic converters. That increases the similarity between gold and platinum because both have industrial uses and both are still a very desirable store of value, but gold remains more popular as an investment. Figure 5.7 shows gold and platinum continuous futures prices from 2000. We use continuous futures because we will be trading futures. There are significant differences in the delivery months, with gold trading in February, April, June, August, October, and December, and platinum trading in January, April, July, and October. Even with these differences, we have no choice but to use the ratio of the nearest delivery. The main difference will be the carry, or interest rate cost as well as storage, both based on the number of days until delivery of the contract. That makes the carry different for both metals except when we trade October.

FIGURE 5.7 Platinum and gold prices from January 2000 (from continuous futures). Movement is similar except for the drop in platinum in 2001 and again in 2008. Gold has been more stable in its rise.

As you can see, prices moved in a very similar pattern most of the time, with notable exceptions in mid-2001 and the relative collapse of platinum in mid-2008. Nearly all commodities dropped precipitously in reaction to the U.S. bailout program and expectations of bad times to come. Because gold only dropped a much smaller amount in 2008, while platinum reflected an antic.i.p.ated drop in consumer spending for jewelry and automobiles, the platinum/gold ratio collapsed to par.

FIGURE 5.8 The traditional platinum/gold ratio, as well as the gold/platinum ratio.

Is the platinum/gold ratio any better than the gold/silver ratio? We think so. Figure 5.8 shows both the platinum/gold ratio and the gold/platinum ratio. Traditionally, the higher-priced market is divided by the lower-priced one because values over 1.0 have better resolution and are not limited as when the ratio approaches zero. The chart shows that the variation in the platinum/gold ratio is greater. We prefer the gold/platinum ratio because gold is the primary market, and the difference in the ratios, when used for systematic trading, will be minimal. Nevertheless, we will include the results of both gold/platinum and platinum/gold to show that computers don't really care as long as the numbers have enough decimal places.

The ratios show that, while there are periods where one market gains over the other, there are also three years when the ratio went sideways. The highly volatile period beginning in November 2007 will be our biggest concern. Will spread trading survive the disaster during August and September of 2008?