Part 7 (1/2)

When the data are aligned by date and one market is closed, it is necessary to enter a zero in the cell if that cell represents returns, or copy down the previous cell if the stream is the c.u.mulative profits/losses.

Step 3: Target Volatility and Investment Size To generate the daily returns, we need to decide on an investment size and a target volatility. For example, we will invest $100,000 but only want a 2.5% chance of losing 24% of the investment. We choose 2.5% because it represents one side of a 2 standard deviation distribution. Because it is 2 standard deviations and the annualized volatility is based on 1 standard deviation, we know that a target volatility of 12% will satisfy our needs.

If we know what our target volatility should be, then we can arrive at these results with a few steps. We use 12% annualized volatility as the industry standard for risk.

To find the investment size needed to have 12% volatility, Find the standard deviation of the profits and losses for the entire performance period.

Multiply that value by the square root of 252 to get the annualized volatility in dollars.

Divide the annualized volatility by the target volatility (0.12) to get the investment size for this market (the market investment).

Repeat the process for each market.

Add the market investments to get the portfolio investment.

Scale all values to your actual investment size.

Alternatively, if you know your investment size, you can adjust all the returns to your target volatility: Convert c.u.mulative profits to daily profits and losses for each series by subtracting the value on day t 1 from the value on day t.

Calculate the returns, rt, by dividing the daily profits and losses by the investment.

Find the standard deviation of the returns for the entire series.

Multiply that value by the square root of 252 to get the annualized volatility in dollars.

Divide the target volatility (12%) by the annualized volatility to get the volatility adjustment factor, VAF. Note that we must always lag the use of VAF by one day to replicate trading.

Calculate NAVs starting at 100, with each subsequent All NAV series are now adjusted to 12% volatility. You can now combine them into a portfolio using your allocation percentages.

Table 4.8 shows the steps using the first set of rules. The three daily profit streams are in the columns under the heading ”Daily Profits/Losses.” They begin on January 1, 2000. Below those columns are three additional values marked ”Annualized volatility,” calculated as shown in the previous steps. The market investments based on the target volatility of 0.12 are shown below that. The sum of the three market investments is $4,331,319, but remember that this is based on trading 10 contracts of crude all the time. The investment could be smaller if the number of crude contracts is reduced, but we lose the ability to accurately balance the risk of both legs. In the long run, that might not matter, but then it might.

TABLE 4.8 Calculation of market investment and portfolio investment (on left) and market returns, portfolio returns, and portfolio NAVs (on right).

Step 4: Calculate the Portfolio Returns The next panel shows the market returns, which are the daily profits or losses divided by the total portfolio investment. The daily returns for the three markets are added to get the portfolio returns, shown in the last panel.

Finally, the portfolio NAVs are calculated in the same way as before, starting with 100, and then each subsequent value for day t is Next, calculate the annualized returns through day t (which begin with 100) as The result is a return of 6.73%. We then calculate the annualized volatility of portfolio returns and get 10.19%, lower than the target of 12% due to a modest amount of diversification. The information ratio, which is the annualized return divided by the annualized risk, is then 0.66. Most traders would like this ratio to be greater than 1.0, but then the S&P pa.s.sive ratio is closer to 0.10 over the past 10 years. When we combine energy pairs with other sector pairs, these results will improve.

In addition to being directionally neutral on price moves, a benefit of pairs trading is that most pairs are in the market less than 50% of the time, often closer to 25%. That means you are less exposed to price shocks and general market risk. No matter how good the system, the only way to avoid price shocks is to be out of the market. It's an important benefit.

Figure 4.7 shows the final portfolio NAVs as calculated using the steps just explained. The method gains steadily over the 10 years, but as we have discussed before, choosing the right time to trade will make a difference. With higher oil prices, volatility is likely to remain high and opportunities will be better.

FIGURE 4.7 Returns for the three natural gas energy pairs and the equally weighted portfolio, at 10.2% volatility, 10 years from 2000.

Energy Summary Although we found only three pairs that we would trade, it is a good sign that we accomplished that using the exact same method and could have used the same parameters as the original examples using stocks. Not many trading methods hold up across different markets, especially moving from stocks to futures. However, we needed to explain how we could justify removing the three pairs that included only crude and its products.

Market experience must play a role. The relations.h.i.+p between crude oil and its products, heating oil and gasoline, is called the crack spread. It is intended to simulate the process of cracking crude oil (breaking its hydrocarbon chain) into its products. Based on the amount of product that can be extracted from crude oil, crack spreads are most often done in the ratio 3:2:1, buying 3 contracts of crude and selling 2 gasoline contracts and 1 heating oil contract. It is also done in the ratio 5:3:2. To be done properly, the products should be traded one or two months out from the crude contract to give the correct delivery relations.h.i.+p, for example, February crude oil produces products that are ready for delivery in March or April. Trying to arbitrage the crack spread using our pairs trading method is the same as an amateur competing with professionals. It's a difficult game to win. Figure 4.4 showed how closely heating oil prices tracked crude oil, and Table 4.3 showed the long-term correlations, with crude and heating oil at .90, crude and gasoline at .86, and gasoline and heating oil at .84. There is no percentage for us to trade those relations.h.i.+ps. We need to look at markets in which there is a fundamental relations.h.i.+p, or a psychological one, and the correlations are less than 0.80.

Heating Oil and Natural Gas When we began looking at energy pairs, our choice would have been heating oil and natural gas because they both serve the home heating market. In the end, that pair was very profitable, but not nearly as good as the crudenatural gas pair, which had higher average profits per contract, as well as a higher information ratio, shown in Table 4.5.

We can conclude after the fact that a sloppy correlation in markets that are fundamentally related can result in more opportunity. Figure 4.6 also shows that returns are much better when prices and volatility are higher, which we've seen since mid-2007, when the oil crisis began. In fact, returns prior to that period were very small.

If we could only limit our trading to periods with exceptional moves, our returns would be outstanding. That leads us to our next main topic, trading inflation pairs, those markets that get the most attention from the financial news networks and newspapers under the headline of inflation.

THE INFLATION PAIRS: CRUDE, THE EURUSD, AND GOLD.

If only we could trade during the extreme market moves and avoid the other times. It's possible that volatility is the key to identifying price regimes, but the reality is that it takes time to recognize a change in the market structure. With a lag at the beginning and a lag at the end, we've usually given up more than we gain by regime switching. One good example is trend following. The key to profits in trend following is the fat tail, the occasional very large profit from an extremely long trend that offsets many small losses that came before. If you use a stop-loss with a long-term trend, you exit the trade with expectations of saving money, but the trend is not over; that is, it hasn't changed direction, and it may only have taken a mid-trend correction. If you're wrong and the trend stays intact and eventually becomes one of the few big winners, you've lost your chance at net profits. Many of these strategies win by diversification and persistence. The performance doesn't look perfect because it's not perfect, but it will make money if you play by the rules.

Another opportunity seems to be in those markets perceived as causing inflation, representing inflation, or being a hedge against inflation, namely, crude oil, EURUSD, and gold. Although the U.S. government measures inflation without food and energy, energy prices have an impact on everything we buy. Because the price of energy is embedded in many other costs, the government thinks it would be double-counting to include raw energy prices in inflation calculations.

We'll take a simpler approach. Everyone knows that doubling the price of crude oil would have a material effect on all commodity prices, as well as disposable income. It also seems clear that the relations.h.i.+ps between these three markets become stronger when inflation is in the news. Perhaps someday we will measure the number of square inches devoted to inflation on the front page of the New York Times or Wall Street Journal to determine when the time has come to trade the inflation pairs.

FIGURE 4.8 Components of inflation. EURUSD, crude oil, and gold prices using back-adjusted futures.

The U.S. dollar started to weaken against the euro at the beginning of 2006 and so far has moved from 1.20 to 1.50, a loss of about 25%, before recovering back to 1.20. Futures prices in Figure 4.8 show the relations.h.i.+p between the euro, crude oil, and gold, although it is somewhat different from the cash prices that we see on the news each day because they represent both future expectation, the cost of carry, and backward adjustment. But we will trade futures, so it's best to look at that data. All three markets peak in mid-2008, drop quickly, and then rally through the end of 2009. We won't try to decide if the relations.h.i.+p is led by crude oil or by the expectation of large U.S. debt, the result of the financial market bailout, diluting the dollar. Is there enough of a relations.h.i.+p to profit from trading these as pairs?

To find out if we should trade these markets, we need to answer some basic questions: Would pairs created from these three markets have made money using our strategy during the past three years?

Could we have known when to start trading them?

What parameters would we have used?

Different Values, Different Volatility Remember that these three markets have very different contract sizes and, therefore, different risk. A futures contract in the EURUSD has a face value of $125,000, crude oil is 1,000 bbls $80 = $80,000, and 100 troy ounces of gold $1,200 = $120,000 at the current price in May 2010. The volatility, expressed in dollars per day (the easiest way to put them all into the same common terms), must be used to determine the position size in order to equalize the risk on both sides of the pairs trade. Table 4.9 shows the imbalance between crude oil and gold in September 2008 during the subprime crisis. Both markets were volatile, but crude was more so, as shown by the smaller position, 10 contracts, compared with 17 gold contracts. The Net PL column also points out the very large equity swings from day to day, even though this trade netted a profit. Be sure to remember that these prices are the result of continuous back-adjusting of data, so they will not be the same as either the cash prices or futures prices on those days.

TABLE 4.9 Trade in the crude-gold pair during high volatility.

Different Holidays When we discussed trading futures at the beginning of this chapter, we pointed out that these markets can have different hours and may not be open on the same days. Because this is a systematic program, we need a rule that tells us not to trade when one market is open and the other is closed. This can be done in two ways: 1. If the data are omitted, that is, one date does not appear in one of the markets.

2. If today's data are identical to yesterday's data, we a.s.sume it was forward filled because there was no trading. Some data services will repeat the data on a holiday.

When either of these situations occurs, no trades are entered or exited. If only one market is closed, then the profit or loss is calculated for the market that is open.

Results from 2007 through 2009 We've been consistently looking at results that use similar momentum periods and entry thresholds. If we continue to do the same, we get the results shown in Table 4.10.

TABLE 4.10 Test results in terms of the information ratio for three inflation pairs: (b) Crude-EURUSD, (c) crude-gold, and (d) EURUSD-gold, plus (a) the average of those pairs.

These tests include the range of momentum calculations from 14 to 5 days, but only one entry threshold, 50. Our previous tests included 50 as the middle of the 4060 range, but here we will look at varying the exit threshold. An exit threshold greater than zero means that we exit shorts sooner. For example, if the crude-EURUSD pair shows a stochastic difference of 55, we sell crude and buy EURUSD. If the exit threshold is 20, then the stochastic difference needs to drop only below 20, not to zero as in our previous tests, to exit the trade. The trade-off is that we exit sooner and avoid the risk a.s.sociated with holding a position longer, but we will also have smaller profits. However, we might get more trades because the stochastic value can then increase again to above 50, generating a new signal. We would be taking advantage of market noise.

To avoid too much complication, only the entry of 50 is used. If the results of using 50 are poor, then it's not likely that we would be trading these pairs. In addition, Table 4.10 includes a breakdown of the results of each pair, as well as the average of all three.

Normally, we use the average of all pairs to decide the success of a group of related markets, but with these inflation pairs, it's not clear that they are related in the same way as, for example, energy markets. We have chosen three very different markets that we believe are used as an inflation hedge. The results will tell us how closely they track each other.

If we base our decision on the average of all pairs, shown in Table 4.10a, we find there were 15 of 18 profitable tests, and all the losing combinations used the longest calculation period of 14 days. Longer calculation periods imply longer holding periods for the trade, which decreases the advantage of noise; therefore, it is consistent with our concept. Our initial thought is that these pairs are good. The best ratios are at the faster end of the test, a 5-day calculation period. The exit threshold of 10 is very good, with a ratio of 0.728, but the exit of 20 is marginally lower and would get us out sooner. Therefore, we expect to trade these pairs with a momentum of 5, an entry of 50, and an exit of 20.