Investmentbanks found that many institutions such as insurance companies preferred thesezero coupon instruments, and so they began to offer them as products. Of course,
CHAPTER 1 Introduction to Quantitative Trading
31
if we sum the value of these stripped coupon bonds, it must equal the value of thenonstripped bond. The parts must sum to the whole. Smart bond traders wereoften able to sell the coupon strips at a price higher than the original bond, profiting the difference in buy and sell values without any risk. Such true arbitragedid not last long, as technology became widespread to determine the fair valuesof these strip instruments.Call and Put ContractsAs stock option contracts became popular in the early 1980s, there were dramaticdifferences in listed call and put contracts of the same security. Options are derivative instruments that provide the buyer with the right, but not the obligation, tobuy or sell a stock at a specified price within a specified time frame. For example,with XYZ trading at $100, I might pay $2 for the right to buy the stock at $100within the next month. If the stock is above $100, I will exercise my right and buythe stock. If the stock finishes below $100 (whether $98 or $50), I simply walkaway and allow my option to expire.Options are popular with retail investors and hedge funds as a means tochange their profit and loss profile. Some use options for leverage, while othersuse them as a means to hedge financial risk. Options come in two forms: calls andputs. A call option is the right—but again, not the obligation—to buy a stock at aspecific price with a specific expiration. A put option is the right, but not the obligation, to sell a stock at a specific price with a specific expiration. The cost for thisright is paid up front and is often referred to as the option premium.A paper written in 1974 by Fisher Black and Myron Scholes detailed the relative equivalence of a call and put contract and hence the relationship between callpremiums and put premiums. Using the Black-Scholes equation this paper madefamous, traders were able to buy one instrument, sell the other, and hedge theresulting risk with underlying stock. Traders could make $0.25 to $1.00 per sharein the process—without any risk! In fact, in the early days, the equivalence of callsand puts was so misunderstood that call and put options even traded in separateparts of the option exchange floors, with separate brokers and market makers foreach instrument. But again, technology caught up and this arbitrage opportunityeventually disappeared from the market.Futures ContractsIn the mid 1980s, Salomon Brothers’ Bond Arbitrage Group (members of whichlater became the core of Long Term Capital Management) bought governmentbonds in the cash market while shorting the 30-year bond future. Futures contractshave a definitive life. At expiration, buyers will receive physical delivery and sellers are required to physically deliver assets subject to the terms of the contract. Inagricultural products, the delivery is subject to a certain quality grain. In financialproducts, delivery is either cash or a specific pool of bonds. The 30-year Treasury
32
PART 1 Structural Foundations for Improving Technical Trading
bond future, traded on the Chicago Board of Trade, calls for delivery of U.S.Treasury bonds that are not callable for at least 15 years. With over 30 bonds thatmeet these specifications, the CBOT publishes a conversion factor table detailinghow much of each bond would be needed to fulfill delivery requirements. Thedaily mismatch between bond prices and the conversion factors leads to one bondbecoming cheaper to deliver than any other bonds.In the early 1980s, bond futures would sometimes trade expensive comparedto the underlying cheapest-to-deliver bond. Salomon Brothers sold bond futures andsimultaneously purchased the cheapest bonds deliverable into the correspondingfutures contract, profiting from the relative mispricing of the futures contract. Atmaturity, they would deliver the cheapest bonds held in inventory against their shortfutures positions. This left the firm with no position and a bankload of profits. Butlike all other examples, the technology and the models for these cheapest-to-deliverbonds became widespread and the inefficiency disappeared from the marketplace.Options PricingEven more recently, sophisticated stock option traders could buy options on individual stocks and sell stock index options to create a profitable risk-free payoffbased on the diffusion of individual stock returns. The primary driver in optionspricing is volatility. Unlike stock price, interest rates, and dividends, volatility is theonly variable either unknown or unhedgeable in the Black-Scholes option pricingformula. There exists a specific relationship between the volatilities of stocks thatcomprise an index (such as the components of the S&P 500) and the volatility ofthat index (such as options on the S&P 500).For example, if the volatility of Intel, General Electric, and Exxon rise,chances are that volatility on the S&P 500 will also rise. Sophisticated optionstraders often trade the difference in volatility between individual stock options(such as INTC, GE, and XOM) and index options (such as the S&P 500). Fair pricing between the stock and index options is based on the correlation of stocks toother stocks in the index. At times during the late 1990s, this correlation waspriced in the options markets above +1.0, a theoretical impossibility. Quantitativetraders were able to exploit profits. But as pricing systems improved and othertraders noticed the inefficiency, these profit opportunities also disappeared.The constant theme throughout these stories is that traders with the bestquantitative analysis are able to capitalize on market inefficiencies when theyappear. Because these money-making opportunities do not last forever, tradersmust always continue research efforts to discover new techniques. Inefficienciessimilar to those mentioned above do exist in the markets today, and we will attemptto identify these opportunities elsewhere in the book.Are there inefficiencies in the stock and futures markets? Yes. I believe thatinefficiencies are always present and that the notion of truly efficient markets is an
CHAPTER 1 Introduction to Quantitative Trading
33
impossibility. If markets were perfectly efficient, traders would stop research and nolonger continue to look for profitable trading strategies or undervalued companies.As soon as this research stopped, inefficiencies would reappear as traders disappeared from the market place. With the reappearance of these inefficiencies, traderswould slowly begin to exploit them again, bringing the market back to efficiency.Think of market efficiency as a rubber band. If it stretches too far away fromefficiency, then forces (traders entering the market) will snap the rubber band backtoward efficiency. If efficiency is stretched the other way, toward perfect efficiency,forces (traders exiting the market) will push markets away from efficiency.Regardless of how tight or loose the rubber band, traders with the best modelsbased on statistics and mathematics will always be able to make money.
MERITS AND LIMITATIONS OF FUNDAMENTAL ANALYSISIf there are profits in quantitative trading, should we bother studying fundamentalanalysis as well?I believe there is money to be made on the fundamental side. But like thequantitative side, the fundamental side has grown quite efficient. As hedgefunds have become more popular and their numbers and assets have grown, better independent fundamental analysis is being performed on companies’ balance sheets and earnings streams. A hedge fund might have a single analystcovering each industry or sector. As analysts break these companies apart, theynote their customer base, geographic breakdown of revenues, technology on thehorizon, and competitive advantages or disadvantages. Their wealth of knowledge and expertise creates their advantage when evaluating a firm’s operatingperformance.At the same time, fundamental analysis could learn some lessons from thequantitative side. Over the past five years, I have seen numerous methodsemployed to value technology stocks. I’ve seen the same analyst value the samecompany using price-to-earnings, price-to-sales, and price-to–earnings growth allin one five-year period. Because corporate earnings can be very volatile, fundamental analysts have had trouble refining their valuation techniques. Take, forexample, the stock price, trailing year earnings, and price-to-earnings ratios forIntel, General Electric, and General MotorsIn the case of Intel and General Electric, prices actually topped before earnings per share hit their high. Intel’s highest quarterly close was made in July 2000,while its highest trailing 12-month earnings per share topped six months later withthe quarter ending December 2000 (Figure 1.16). The same instance occurred withGeneral Electric, whose quarterly high price peaked in April 2000, while 12-monthtrailing earnings per share was still rising at the end of 2001 (Figure 1.17). GeneralMotors price peaked in April 2000, which followed its earnings peak, occurring inthe quarter ending December 1999 (Figure 1.18). Despite the fact that 12-month
PART 1 Structural Foundations for Improving Technical Trading
34
trailing earnings held in a range of $8 and $10 between December 1999 andDecember 2000, GM’s stock price fell from 93 to 53 over that same time frame.My point is, while earnings do drive stock performance, they are not the onlyfactor. Even if you knew the next year’s exact earnings numbers for these threestocks, it may not have helped your trading performance. Stocks often fall despiteincreases in earnings. This can happen due to changes in business outlook, valuations that exceed earnings potential, or products that become obsolete or are subjectto fierce competition. While there’s no substitute for solid fundamental analysis, Ibelieve that using quantitative trading strategies can detect factors that affect stockprices more quickly than waiting for earnings announcements and company conference calls. The old adage, “Prices move first and fundamentals follow” holds true.While there are good fundamental analysts performing very rigorous work,when analyzing companies’ earnings potential, even the best analysts are subjectto the market’s underreaction and overreaction. One such example is the Nasdaq100, an index comprised of the 100 largest nonfinancial companies traded on theNasdaq. This index is very heavily weighted in technology, telecommunications,and biotechnology. Figure 1.19 details its price action during 2000. Markets arenot necessarily as efficient or as rational as one might expect. The Nasdaq 100 rallied from 1008 at the start of 1998 to a high of 4708 in early 2000. That corresponds to a return of 367 percent in just over two years.
Intel’s Share Price and Earnings1.8
70
1.4Share Price
50
Earnings
1.2
40
1.0
30
0.80.6
20
0.410
Trailing Four QuarterEarnings
1.6
Share price
60
0.2
FIGURE
12/28/2001
Date
1/26/2001
1/28/2000
1/29/1999
1/30/1998
0.01/31/1997
0
1.16
Intel’s Share Price and Earnings. While share prices can be driven by earnings, often a price will leadchanges in earnings by a year or more.
CHAPTER 1 Introduction to Quantitative Trading
35
GE’s Share Price and Earnings60
1.6
1.2Share Price
40
1.0
30
0.8
Earnings
0.6
20
0.410
Trailing Four QuarterEarnings
1.4
Share price
50
0.2
FIGURE
12/28/2001
1/26/2001
Date
1/28/2000
1/29/1999
1/30/1998
0.01/31/1997
0
1.17
GE’s Share Price and Earnings. While share prices can be driven by earnings, often a price will leadchanges in earnings by a year or more.
This irrational exuberance can be hard to exploit using fundamental analysis,since irrationalities have a habit of stretching well beyond reasonable valuations.As ridiculously overvalued as many of the dot-coms were, with no legitimate business plans, let’s focus on the survivors with real revenues. Two good examples areCisco Systems and Amazon.com. For those unfamiliar with each, Cisco sellshardware and software for computer networking, and Amazon.com is a largeonline retailer of books, electronics, and computer software.Caught up in the Internet revolution, Amazon and Cisco saw their shareprices rise to astronomical heights between 1998 and 2000. Prevailing valuationmeasures such as price-to-earnings and price-to-sales were thrown out the window. We were entering an entirely new period, where technology would supplantthe rest of the economy in terms of growth and future earnings. Prominent stockanalysts such as Henry Blodget of Merrill Lynch and Mary Meeker of MorganStanley were able to move share prices dramatically by issuing favorable comments in their research reports. In a bold move, Blodget, then at CIBCOppenheimer, raised his price target on Amazon.com from $150 to $400 pershare on December 16, 1998. The stock responded with an 20 percent rise, from$243 to $289.There is no doubt that the technology stock bubble of 1998 through 2000 ledto unbelievable valuations. But even if your analysis concluded in 1999 that these
PART 1 Structural Foundations for Improving Technical Trading
36
GM’s Share Price and Earnings10.0
100
8.0
70
7.0
60
6.0
50
5.0
40
4.0Earnings
30
3.0
DateFIGURE
12/28/2001
0.01/26/2001
1.0
01/28/2000
101/29/1999
2.0
1/31/1997
20
Trailing Four QuarterEarnings
80
1/30/1998
Share Price
9.0
Share price
90
1.18
GM’s Share Price and Earnings. While share prices can be driven by earnings, often a price will leadchanges in earnings by a year or more.
stocks were overvalued, short positions would have been at best frustrating and atworst dangerous. Markets can become overvalued and remain overvalued formany years. Likewise, periods of relative cheapness can persist until a catalystsparks investor interest.Most investors think of the technology bubble as one large rally from 1997through 2000, followed by a slow, steady decline. In fact, moves in individualstocks saw many up and downs during that time frame. Split adjusted, Amazonbegan 1998 around $5 per share. From 1998 to 2001, the stock ran up to $92, soldoff to $45, rallied back to $105, sold off back down to $43, rallied to $106, andthen declined to a low of $6 per share in September 2001 (Figure 1.20). Those aremoves of +1700, –52, +135, –59, +150, and –94 percent. Cisco began 1998 at $10per share. It, too, had very volatile moves. Cisco rallied to $17, declined to $11,skyrocketed to $80, sold off to $51, rallied back to $68, sold off to $11, and thenrallied to $22 in December 2001 (Figure 1.21). Those are moves of +78, –36,+630, –37, +35, –84, and +94 percent.The point is, even in bubbles and bursts, stocks do not move in straight lines.While changes in long-term fundamentals may not occur very often, this does notpreclude stocks from making spectacular rises and devastating declines. Amazonand Cisco have produced enough movement up and down over the past five years
FIGURE9/2/01
11/2/00
9/2/00
7/2/00
5/2/00
3/2/00
1/2/00
11/2/99
9/2/99
7/2/99
5/2/99
3/2/99
1/2/99
11/2/98
9/2/98
7/2/98
5/2/98
3/2/98
11/2/01
0
11/2/01
257/2/01
50
9/2/01
755/2/01
100
7/2/01
Amazon.com (AMZN)3/2/01
125
5/2/01
Nasdaq 100. The Nasdaq 100 rose extraordinarily between 1998 and 2000.1/2/01
1.19
3/2/01
Date
1/2/01
11/2/00
9/2/00
7/2/00
5/2/00
3/2/00
1/2/00
11/2/99
9/2/99
7/2/99
5/2/99
3/2/99
1/2/99
11/2/98
9/2/98
7/2/98
FIGURE
5/2/98
1/2/98
500
3/2/98
1/2/98
CHAPTER 1 Introduction to Quantitative Trading37
Nasdaq 100
5000
3500
2000
Date
Amazon.com (AMZN). Amazon.com was very volatile between 1998 and 2001.
1.20
PART 1 Structural Foundations for Improving Technical Trading
38
Cisco (CSCO)100
75
50
9/2/01
11/2/01
7/2/01
5/2/01
3/2/01
1/2/01
9/2/00
11/2/00
7/2/00
5/2/00
3/2/00
1/2/00
11/2/99
9/2/99
7/2/99
5/2/99
3/2/99
1/2/99
9/2/98
11/2/98
7/2/98
5/2/98
3/2/98
0
1/2/98
25
DateFIGURE
1.21
Cisco (CSCO). Cisco, a maker of computer networking software and hardware, also saw amazing pricegains between 1998 and 2000.
to make any trader excited with opportunity. The beauty of quantitative analysis isthat we can capture these moves without a change in underlying fundamentals. Ourmodels should be able to determine changes in price trends and allow us to profitfrom volatility instead of suffering from it.The problem with fundamental analysis is that the underlying fundamentalsof companies change very slowly, making it difficult to capitalize on volatile priceswings in the equity market, which are typically caused by investor sentiment andperception. Employing fundamental analysis successfully requires that marketsreturn to rationality and efficiency sooner rather than later—a property that oftendoes not occur. There are very talented and bright fundamental analysts, but totake advantage of the short-term swings in the markets—whether it be stocks,futures, or other markets—we will focus on the quantitative side and use past market prices to generate trading signals.
CHAPTER
2
An Introduction to StatisticsUsing Scientific Methods to Develop Cutting EdgeTrading Strategies
MEASURING THE MARKETS USING STATISTICSWhile mastery of statistics is not an absolute necessity in becoming a successfultrader, knowing the mathematics and principles behind price action will give you anupper hand when it comes to trading. To that end, this section introduces statisticalproperties that relate to financial markets, such as the concepts of mean, standarddeviation, and correlation of returns.Descriptive statistics are tools that allow traders to better understand and comprehend data in an easy and effective manner. Instead of presenting the height measurements of 100 men, I could instead offer that the average height of these 100 menis 5 feet 8 inches. By providing one descriptive statistic (the mean), I have characterized a quality of the entire sample of height measurements. I can take this process further by revealing that the standard deviation of heights is 3 inches (as we will explorelater, standard deviation is a measure of the dispersion of data within a group). Now,with only two pieces of information—the mean and standard deviation—I can makeaccurate deductions regarding the distribution of the heights among all 100 men,including the shortest and tallest.Similarly, by calculating descriptive statistics on market prices, marketreturns, and market volume, we can learn much about the nature of recent pricemovement. These descriptive statistics will become the building blocks for ourquantitative trading systems.39
Copyright 2003 by Lars Kestner. Click Here for Terms of Use.
PART 1 Structural Foundations for Improving Technical Trading
40
Understanding the statistics behind markets can help when creating newtrading ideas. A market’s expected movement is very important for the quantitative trader to determine the difference between random and significant pricemovement. These properties can also aid in developing risk management strategiesfor a portfolio of trading strategies.
MEAN AND AVERAGE OF RETURNS AND PRICESThe mean of a series, more commonly referred to as the average, is a measure ofcentral location. The mean is the sum of the values in a distribution divided by thenumber of data points in the distribution. The mean is defined as:
∑x␮=ᎏN
where ␮ is the formulaic definition of mean, ∑ is a mathematical procedurewhich means to sum over all values, and N is the number of data points inthe series
In the sample data in Figure 2.1, the mean is 5.4.
MEASURING THE DISPERSION OF RETURNSThe mean of a series is a very important descriptive statistic because it determinesthe central tendency of a series. Often, however, we need to understand more abouta data set that just the mean. We may wish to measure how widely values spreadacross a distribution. Do the values clump closely around a central point or arethey distributed widely? The most popular methods used to measure the dispersionof values are variance and standard deviation.
Data point12
Data53
345SumNMean
FIGURE
7842755.4
2.1
Calculating the mean. The average of a series is calculated by summing all the data points and dividingby the number of data points.
CHAPTER 2 An Introduction to Statistics
41
Variance is defined as the average squared deviation around the mean and isrepresented by the following formula:∑ (x ⫺ ␮)2Variance = ␴ 2 = ᎏᎏN
Variance, often represented by ␴ 2, measures how wide the spread of valuesspan from the mean. Using the same sample data as above, we calculate that thevariance of the values is 3.4 (see Figure 2.2).We will also calculate the variance using the weekly returns for the S&P 500and Nasdaq 100 during 2001. The mean of the S&P 500 is –0.20 percent, and themean of the Nasdaq 100 is –0.47 percent. The variance of weekly returns is 0.10for the S&P 500 and 0.48 for the Nasdaq 100.Notice that the Nasdaq 100 has a larger variance than the S&P 500. The variance calculation tells us that the returns of the Nasdaq 100 vary more widely andare more volatile than the returns of the S&P 500. We confirm this graphically byplotting a frequency distribution of the returns of the S&P 500 and Nasdaq 100. Afrequency distribution of a series graphs the number of occurrences within a rangeof values, as can be seen in Figure 2.3.Note that the returns of the Nasdaq 100 vary more widely than that of theS&P 500. This is because it’s comprised of riskier companies, those that focus ontechnology, telecommunications, and health care. Where the S&P 500’s largestmonthly gain was 7.8 percent and its largest loss was 11.6 percent, the Nasdaq 100managed to gain 18.4 percent and lose 17.5 percent in its best and worst months.The variance calculation quantifies the dispersion of values. However, in thepractical world, we use standard deviation more often than variance. We take thesquare root of variance to arrive at standard deviation. The standard deviation hassome wonderful properties that we can apply toward our data for further analysis.We will investigate these properties later in this chapter.
Datapoint
Data
Differencefrom mean
Differencesquared
12345SumNMean
537842755.4
⫺0.4⫺2.41.62.6⫺1.4SumNVariance
0.165.762.566.761.9617.2053.44
FIGURE
2.2
Calculating the variance. Variance is the average squared deviation from the mean.
PART 1 Structural Foundations for Improving Technical Trading
42
Weekly Return Distributions25%S&P 500
Occurrence
20%
15%
10%NDX 1005%
20%
16%
12%
8%
4%
0%
–4%
–8%
–12%
–16%
–20%
0%
Return
FIGURE
2.3
Weekly Return Distributions. Being less volatile, the S&P 500’s returns are more closely spread than themore volatile Nasdaq 100.
Standard deviation = ␴ = Variance