of time, represented in the form of a line on a stock’s chart.
Technical Analysis
31
There are two major SMAs that traders observe: the 50-day moving average(50-SMA) and the 200-day moving average (200-SMA). Both moving averagesare meant to serve as benchmarks around which individual stocks trade. A50-SMA tends to be more volatile than a 200-SMA because the 200-SMA simply incorporates more data and thus has a smoother average. Some technicians view the 50-SMA crossing above the 200-SMA as bullish confirmationof a trend and vice versa for 50-SMA dip below 200-SMA. Moreover, both the50-SMA and 200-SMA work as support and resistance for individual securities,sectors, and indices. Most charting programs are generally designed to addspecified moving averages for many different periods. Figure 4.10 illustratesan example of a 50-SMA and a 200-SMA, while also identifying how a stockcan bounce off the major moving averages as many different traders viewthe same benchmarks.The second type of moving average is the exponential moving average(EMA). The EMA is generally the same thing as an SMA, with the exceptionthat recent prices are more heavily weighted than the simple average of allprices. The resulting moving average tends to hover near a stock’s actualprice more closely than an SMA and can provide additional technical data tothe analyst. Regardless, the effectiveness of moving averages is really onlythe product of many people watching the same thing at the same time. InEnglish, moving averages are self-fulfilling prophecies because benchmarktime periods are observed by large groups of investors who may be thinking
FIGURE 4.10 Moving AveragesUsed with permission from Stockcharts.com.
32
TRADING PAIRS
the same thing at a similar moment. Though arguable, we might assume thatthe 50- and 200-SMAs hold more weight than the 50- and 200-EMAs because,most likely, a larger portion of the technical analysis investing public monitors SMAs instead of EMAs. What’s more, a 50-EMA would likely be a moreimportant level to watch than a 32-SMA, as more people will likely follow the50-EMA over the obscure 32-SMA. (Incidentally, 32 is an arbitrary numberused merely as an example.) Moving averages (much like a great proportionof technical analysis) come down to how many people are watching uniformnumerical parameters. Obscure moving average time periods will generallynot help when trying to predict future movements of a stock price.Beyond moving averages crossing over and under one another, the averages are also used as support and resistance when monitoring charts. A 200SMA is generally said to be a more significant benchmark of support (orresistance) than the 50-SMA. In addition, the 50-SMA typically stands asbolder support (or resistance) than a shorter-term moving average. When astock begins to near a major moving average, typically traders may look fora bounce off the moving average, before the stock moves though or turnsback. The theory is that many traders are watching the same average and(for an ascending stock) will sell their positions as the equity nears thebenchmark moving average. This causes a complete ricochet off the movingaverage, or will at least “shake out” weaker buyers before the stock pullsthrough. The bottom line here is to watch for support and resistance–fueledtrading activity when a stock nears a benchmark moving average.For references on moving averages, see Appendix II.
CHAPTER 5
TechnicalAnalysisIndicatorsStochasticsChaikin Money Flow OscillatorOn-Balance VolumeRelative Strength Index
etting into more complicated technical analysis, we will begin to lookat indicators as an additional way of examining the present stockprice, while deciphering historical price movements. Each of the indicators in this chapter can be applied to individual stocks, while also beingused in conjunction with actual pairs. However, not all technical analysisprograms offer the ability to track spreads or apply indicators to either adifferential or ratio. Therefore, later in the book we will discuss how tobuild indicators in Excel. What’s more, in Appendix II you will find a list oftechnical analysis programs that are pairs friendly, with a brief descriptionof each.
G
STOCHASTICSOur first indictor is called stochastics, which is an oscillator that is used todetermine overbought and oversold conditions. Stochastics are lines thatmove up and down in a horizontal oscillator and are intended to depict whena stock is receiving excessive buying or selling pressure. Most stochasticsconsist of two lines called the %k and %d. The stochastics oscillator rangesfrom 0 to 100, where a movement below 20 is said to indicate selling pressure possibly leading to oversold conditions, while a number above 80 isthought to point toward buying pressure potentially alluding to overboughtcircumstances. When stochastics are in the overbought region, they also33
34
TRADING PAIRS
FIGURE 5.1 Stochastics
mean that bullish momentum is very strong and may continue. Conversely,when stochastics are in the oversold region, bears are thought to be applying significant pressure to security, which may continue to see additionaldownside trading. Figure 5.1 displays how a stochastics indicator appears ona chart.Some technicians believe that when the actual %k and %d lines crossabove and below one another they are alluding to potential buy and sell signals. Because %d is a moving average of %k, the actual signal is triggeredwhen the %k line crosses above or below the %d line. Confirmation isthought to occur when the lower stochastics (that have just crossed up)begin to elevate out of the oversold region and vice versa for the overbought region. You will notice crossover and crossunder examples on thesubsequent chart.How are %k and %d calculated? The actual formula for a %k n interval is:100 ⫻ (C–Ll) / (Hh–Ll)Where:Ll ⫽ lowest low for the last n intervalsHh ⫽ the highest high for n intervalsC ⫽ close of the last interval
35
Technical Analysis Indicators
The %d line is a moving average or smoothed version of %k and is calculated as follows:%d ⫽ 100 * (HP/LP)Where:HP ⫽ n periods sum of (C ⫺ Ll)LP ⫽ n periods sum of (Hh ⫺ Ll)In addition to %k and %d, there are also slow %k and slow %d lines,which simply add more data into the equation in an effort to smooth outvolatility. Sometimes, more savvy traders do not actually use stochastics asa leading indicator; rather, use the indicator as confirmation of the researchand resulting thoughts that have already been constructed. For example, ifan investor conducts fundamental research and discovers that a stock trading at $50 should really be trading at only $15, and then sees that the dailystochastics are painfully overbought, he or she might then infer that bothtechnicians and fundamentalists may be seeking a pullback to bring thestock back to more sane levels.
CHAIKIN MONEY FLOW OSCILLATORTo begin, we will briefly discuss the Chaikin Money Flow Oscillator developed by Marc Chaikin. In theory, the indicator is based on summing of thevalues of the accumulation distribution line for n periods (usually 21), andthen dividing by the same number of periods. Overall, the indicator is meantto depict the strength of a stock movement. In general, a positive numberindicates accumulation (buying), while a negative number is said to alludeto distribution (selling). What’s more, some technicians feel that the fartheraway from the zero line the money flow line moves, the stronger the signal.In addition, the indicator may add confirmation to a breakout or breakdownif the money flow line is above or below the zero line in the actual directionof the stock’s contemporary move. Thus, if the stock breaks out above resistance and the money flow line is also above zero, technical bulls could verylikely continue buying the stock. Also, if a stock is consolidating (travelingsideways) and the money flow indicator is increasing, bulls may be silentlyaccumulating stock in hopes of a future breakout! Conversely, if the stock istrending laterally and money flow is decreasing, buying interest in the stockmay be dwindling. Figure 5.2 displays a Chaikin Money Flow Oscillator withaccumulation leading to a breakout.
36
TRADING PAIRS
FIGURE 5.2 Chaikin Money Flow
ON-BALANCE VOLUMEOn-balance volume (OBV) is an indicator developed by Joseph Granville thatattempts to unveil trends in share accumulation (through volume) over time.Basically, OBV is a running total of all shares accumulated in one directionor the other, displayed in a cumulative oscillator. Simply put, each tradingday’s volume is added to the indicator if the day closes up, and is subtractedif the day closes down. Much like money flow, OBV is a trend confirmationtool, and can allude to either breakouts or breakdowns when the oscillatordirection corresponds with stock price movement. If OBV is declining whilea stock is rising, the oscillator may be signaling underlying weakness, thuspotentially alerting technicians to hidden bearish pressure within the stock.Figures 5.3 and 5.4 display both OBV trend confirmation and negation.
RELATIVE STRENGTH INDEXIntroduced in 1978 by J. Welles Wilder, the Relative Strength Index comparesa stock’s recent ascending prices to its descending prices and converts thedata into an oscillator that ranges from 0 to 100. The Relative Strength Indexby Wilder is easily confused with other forms of relative strength thatcompare a company to its broader sector. Please do not confuse the two.
Technical Analysis Indicators
FIGURE 5.3 OBV Confirmation
FIGURE 5.4 OBV Negation
37
38
TRADING PAIRS
The actual formula for RSI is:RSI ⫽ 100 ⫺ (100 / 1 ⫹ RS)Where:RS ⫽ mean gain/mean lossMean gain ⫽ total stock price gains/n periodsMean loss ⫽ total stock price losses/n periodsMost technicians generally use 14 periods to compare data to, whileusing ⫹30 and ⫹70 as oversold and overbought settings on the actual oscillator. When the indicator drops below 30, the stock is said to be oversold andconversely overbought above 70. Though the actual use of the indicator differs from technician to technician, most agree that a move above 30 fromwithin the oversold region (below 30) indicates bullish momentum fueled bypossible short covering. When the oscillator falls beneath 70 from the overbought region, bears might begin adding supplemental pressure to the stock,and could bring additional sellers off the fence. Figure 5.5 displays bothoverbought and oversold conditions.
FIGURE 5.5 Relative Strength
Technical Analysis Indicators
39
At this point I would like to reiterate that it is very important to have astrong foundation of fundamental and technical information on which tobase your pairs knowledge. Once we begin to statistically uncover theopportunities of pairs trading, it will be important to double- and triple-checkall trades with fundamental and technical analysis. It is quite a bit of work,but the fact here is: If you don’t do it, someone else will. And that person mayuncover the one nugget of information that you don’t know. After all, thepoint of trading is to make money, and to do so effectively, we must workhard, while leaving no stone unturned.
CHAPTER 6
Basic PairsTerminologyUnderstanding the CorrelationSpread, Differential, and RatioSpread, Differential, Ratio,Divergence TradingConvergence Trading
efore we dive deep into the world of pairs, it is important to go oversome rudimentary concepts of pairs. You may find that pairs terminology will change from author to author, mostly because the subjecthas relatively little material written about it. Moreover, because pairs tradersseem to be a rare breed of their own, there isn’t much communicationbetween individuals. Thus, much of the lingo changes from person to personand office to office.This chapter will cover:
B
• Basic understanding of correlation and why it is important• Key terminology (differential, ratio, and intraday spread)• Divergence trading• Convergence trading
UNDERSTANDING THE CORRELATIONFirst, we must ask ourselves why the correlation itself is important. In short,the correlation is the glue of pairs; it is the measurement of relationship significance between equities (or other financial instruments). Later, we will getinto correlation formulas and how to map out a correlation, though for thetime being simply remember that ⫺1 equals a perfectly negative relationship,while ⫹1 should display a perfectly parallel liaison. By this I mean that two41
42
TRADING PAIRS
stocks with a ⫹1 relationship would have exactly similar charts directlymirroring one another. Equities with a correlation of ⫺1 would be comparableto positive and negative sides of a magnet. Even though they look similar onthe surface, when you try to put them together, they force themselves awayfrom one another. Sounds like a bad family reunion!When we think of correlations, we consider not only the main correlationbetween two stocks, but also the correlation among any number of equitiesand other financial vehicles such as indices. For example, if you are anAmerican, you have a relationship with not only the federal government, butyour state government as well. While you may feel a stronger affiliation withyour home state, everything that the federal government does likely affectsyou in one way or another. Thus, whether you like it or not, you have to payattention to broader federal activities that will have an impact on your life.This would be the same as relating a sector to its corresponding index. Evenif you believe that you have found the “perfect” pair in a relatively safesector, it is still a good idea to know what the correlation is between yourchosen stocks and the indices in which that they are listed. That way, if themarket begins to dump, you may have a good idea of how your stocks willreact. Another way of watching this may be to monitor beta, which will bediscussed later in the book.
SPREAD, DIFFERENTIAL, AND RATIOThe differential, ratio, and intraday spread are simply three distinct ways ofviewing and/or reading pairs. One point that often confuses people is the useof the term spread. All three terms used above describe a certain type ofspread and are each calculated using different (though basic) math. However, the term spread, as it will be used in this book refers to the intradayand closing pairs spreads only. Intraday spreads are generally known as thedifference between the bid and ask on an intraday basis. Thus, using theterm spread only on an intraday basis keeps our terminology consistent withthat of the broader market. (There are many circumstances in which theterm spread applies to EOD [end of day—closing prices] data, though generally in the context of equities, spread refers only to the intraday differencebetween the bid and ask.) Normal investors buy stock on the ask and sell onthe bid. If a stock were showing a spread of $1.20 by $1.40, then (if youentered a market order) you would buy the stock at $1.40 per share and sellit at $1.20. The spread would be $0.20 cents—and that, folks, is where market makers and specialists attempt to make their money. It is important to
Basic Pairs Terminology
43
remember that spreads in pairs trading are vastly different than the typicalbid/ask spread. Pairs spreads are described in the following paragraph. Onelast side note: With the exception of the term spread, when you hear eitherdifferential or ratio, assume that I am speaking about closing prices only.Other than the spread, any other data to be used on an intraday basis will bespecifically denoted using the term intraday in the description.
SpreadIn terms of pairs, an intraday spread equals the intraday change in Stock Aminus the change in Stock B. For example, Intraday change during the present session (how much a stock is up or down) of Stock A – Intraday Changeof Stock B ⫽ Spread. If last Monday, Stock A had gained $1.30 at the closeand Stock B had lost $0.40, then the closing change spread would have been⫹$1.70. Yes, I know that “closing change spread” is confusing, but, stick withme for a moment. In general, when you hear someone say “What’s thespread?”, they will most likely be asking you during market hours when bothstocks are live. Thus, you can look to see where both stocks are, quickly getout your abacus, and add or subtract the two numbers—then you will soundlike a pro! However, when we are asked about the closing change spread, weare considering how much a stock gained or lost within that particular session. Some people will simply ask you “What was the closing spread?” Youwill then likely want to reply, “Do you mean the closing intraday spread orthe differential?” It gets confusing, I know, but it is what it is.
DifferentialThe differential is simply one equity minus the other. For example, Closingprice of Stock A – Closing price of Stock B ⫽ Differential. The differential isdissimilar to the spread, as it uses the pure closing price of both stocks anddoes not directly consider how much either stock gained or lost during thesession. While a differential can be calculated for specified intraday periods,we will not do so in this book. The differential will primarily be used forEOD data and swing trading analysis.
RatioThe ratio equals either the closing price or intraday change of the first stockdivided by the second. For example, Intraday change of Stock A / Intradaychange of Stock B ⫽ Intraday ratio. The ratio is generally used to measurethe amount of one share needed to equal the value of another. Some traders
44
TRADING PAIRS
FIGURE 6.1 Three Examples of Tracking Pairs
FIGURE 6.2 Diverged Equities versus Converged Equities
feel that using a ratio is more accurate than a differential, though much ofthis is simply personal preference. Moreover, the ratio allows the pairstrader to incorporate different facets of value analysis into the pair. We willgo over the ratio in further detail in Chapter 13, where we will cover how toincorporate beta and earnings.All three examples are shown in Figure 6.1.
DIVERGENCE TRADINGWhen we believe two stocks will diverge, we are betting that the differential,or ratio will grow apart. We are gambling that the two stocks will move awayfrom one another.
Basic Pairs Terminology
45
Divergence traders are trading away from the statistical mean and/orbelieve that the fundamental valuation of two companies has changed. Thisbelief denotes that the stocks will no longer trade together (at least in theshort term) and will begin to separate. Imagine a rubber band expanding.
CONVERGENCE TRADINGConvergence traders believe that two stocks have already diverged to apoint where the rubber band is near or at its maximum threshold, and willnot grow apart any further. Thus, the convergence trader is betting that thetwo equities are going to come back together. Once again, equities reconverge for both technical and fundamental reasons, but can also simply havean independent event that sets one of the two equities in motion. No matterhow you slice it, divergence is the rubber band expanding and convergenceis the rubber band coming back together (see Figure 6.2).Now that you have a general understanding of what pairs are and howthey work, the most important concept to grasp is that of the rubber band.Pairs are simply a relationship of elasticity (not in the economic sense)where companies are bound by their correlations. As previously mentioned,correlations are the glue of pairs!
CHAPTER 7
Importing Datainto Excel
ou may be asking yourself: Why Excel? Well, my friend, even if youhave an advanced program that already calculates pairs, Excel will dowonders in helping you understand the internal workings of thestrategy. This chapter is meant only to assist investors in creating a basicExcel spreadsheet for pairs analysis and learn how to import free (yes,free) end-of-day data from Yahoo.com.The data we will be using is end-of-day (EOD) data. By this I mean that wewill only be using each individual trading day’s open, close, high, low, and totalvolume. This data is the same data used to make up daily charts for equities.Also, the reason for a brief chapter on Excel is that we will be doingmany of our calculations inside the spreadsheet program. In general, almosteveryone has access to Excel; thus, it serves as an easily accessible platformto convey the pairs subject.
Y
Step 1. Open Excel (any version will do) and create a new spreadsheet.Type “Main Spreadsheet 1” in cell A1, and then save the sheet as Example_pairs_sheet1. We will continue adding to this sheet as you workthrough the book, so by the end you will have your own spreadsheet.(As a side note, you will need Internet access to build your spreadsheet.)Step 2. Once you have your spreadsheet ready to go, label the three tabsat the bottom of the sheet (each indicates a different sheet within thegroup): Main, Stock 1, and Stock 2 (see Figure 7.1).Step 3. Once this is done, jump on the Internet and go to www.yahoo.com.Step 4. Click on “Finance,” or follow the link: http://finance.yahoo.com/?u47
48
TRADING PAIRS
FIGURE 7.1 Excel Spreadsheet Example
Step 5. In the stock ticker entry box, put in the ticker KLAC for the company KLA Tencor.Step 6. Next, look to the left of the screen and you will see a list of links.The fourth link down is titled “Historical Prices.”Step 7. Click on the link.Step 8. From here you will see a table displaying the stock’s closing EODdata, along with a date entry section at the top. In the date entry sectionuse a start date of January 1, 2002, and an end date of July 31, 2003. Thenclick “Get Prices.” Figure 7.2 shows what the screen should look like.Step 9. Scroll to the bottom of the screen and click on the link titled“Download to Spreadsheet.” You may have to save the data, but youshould be able to just open it from the current location. The sheet shouldopen an Excel spreadsheet with all of the historical data requested.
Importing Data into Excel
49
FIGURE 7.2 Historical Prices Screen
Highlight all of the cells that contain data. The easiest way to do this isto scroll all the way to the bottom of the sheet, click on the lowest righthand cell that contains a value, then scroll up.Step 10. Press Control C (Command C for Mac users) to copy the data(see Figure 7.3).Step 11. Click on the Stock 1 tab in your spreadsheet, highlight cell A2,and press Control V (Command V for Mac users)to paste the data intothe spreadsheet. Voila, you have just imported your first series of data.Step 12. Repeat the same process for Novellus Corporation (NASDAQ:NVLS) and paste the data in the spreadsheet titled Stock 2. Now, bothStock 1 and Stock 2 should have historical data pasted into them. If you
50
TRADING PAIRS
FIGURE 7.3 Data Highlighted
are having trouble, reference the spreadsheets located on the CD-ROM;however, I would highly recommend making sure you can build thespreadsheets yourself. Now that you know how to import historicalprices into Excel, your analytical power has been substantiallyincreased. We will get back to the spreadsheet in a little while, but firstwe will go over correlations.
CHAPTER 8
UnderstandingCorrelationsSteven Price
n investor looking to trade pairs may want a standardized method bywhich to compare the relationship between target stocks. Studyingthe recent spread or differential is one way to decide which stocks toplay; however, knowing just how well correlated those equities are over timeis a valuable tool that can contribute a historical perspective. Those thathave shown a strong positive correlation over some historical period aremore likely to do so in the future. Knowing this correlation may also open upa world of trading possibilities beyond simply stocks in related industries.For example, if a trader knew that two stocks were close to 100 percentcorrelated, would it matter whether one was American Airlines and theother was Wal-Mart? Probably not. What would matter is that those stocks,in addition to following other guidelines highlighted in this text, were alsostrongly matched with one another.The mathematical calculation used by many fund managers as a riskmanagement tool is the correlation coefficient. When a fund manager islooking for diversification, therefore reducing risk, he or she sometimeslooks for stocks that are not closely correlated. This helps to ensure that abad quarter for one of the fund’s holdings can be offset by a good quarter foranother holding. For a pairs trader, however, the reverse would be helpful.The more closely one stock is correlated to another, the more reliable is themovement in the same direction. The higher correlation also increases the
A
Note: If you find this chapter confusing, Chapter 9 simplifies the information using Excel; however,I highly recommend having a strong grasp of the correlation coefficient, as it is the foundation ofpairs.
51
52
TRADING PAIRS
likelihood that a spread relationship will remain consistent and not breakout beyond its historical value in opposing directions.The correlation coefficient can be calculated on a spreadsheet, such asExcel (shown in the following chapter); however, an understanding of howit is measured will teach a trader just what he or she is looking at. We beginthe search for a correlation coefficient by first looking at the activity of eachindividual stock.The first measure we calculate is the variance, which is the square of thestock’s standard deviation and a measure of how spread out the movementof the stock is. It is used as a measure of risk, but in our case, we will eventually use it as a standard of comparison between the two stocks. It is themeasure of the stock’s volatility from its mean, or expected return.Let’s say Stock A showed returns of 8 percent, 10 percent, 13 percent,and 17 percent over four periods. The first step in calculating the variance isto calculate the mean () of these returns.Step 1. ()Stock A 
8  10  13  17 124
The second step is to calculate the difference from the mean (return) ineach period. In our example, this is:Step 2. Calculate the deviation from the mean.Period 1: 8  12  4Period 2: 10  12  2Period 3: 13  12  1Period 4: 17  12  5The first hint a trader can look for is the direction these values take. Forinstance, they move consistently from lowest (4) to highest (5), suggesting a consistently increasing return. This will be important when we begin tocompare the two stocks.For those unfamiliar with statistical analysis, the next step, which is tosquare the deviations, is done to avoid the canceling-out effect whenattempting to define variance and standard deviation. If you look at the abovevalues, you will notice that summing them will equal zero. Since we cannotdivide zero by the number of terms in order to get an average deviation, wefirst square these values.Step 3. Square the deviations.(4)2  16(2)2  4
53
Understanding Correlations
(1)2  1(5)2  25We now sum these squared deviations and divide by the number of periods (n) minus one, or (n  1). The reason we divide by (n1), rather than (n),is to help get an unbiased estimator of variance and also because we cannotget the variance of a set of less than two numbers. This is the rule for sampledata. For those traders who would like to delve further into this rule, a lessonin statistics is in order, which is beyond the scope of this text. However, forour purposes, we will simply follow the rule.Step 4. Sum the squared deviations and divide by (n1).VarianceStock A 
16  4  1  2546 15.33413
We now have the variance, but we will also need the standard deviationto eventually calculate the correlation coefficient. The standard deviation isthe square root of the variance.Step 5. Take the square root of the variance to calculate standarddeviation.√15.33  Standard deviation Stock A  3.92We now have the basic mathematical components to calculate the correlation coefficient, but we need to first combine these to calculate thecovariance between the returns. The covariance is the statistic that gives usa numerical value that tells us the actual correlation. It tells us if the targetstocks are moving together, moving in opposite directions, or are unrelated.However, the covariance number is difficult to interpret, as it is inconsistentamong stocks with different values. What does a covariance of 54 mean?What about 65? In general, a large positive number for covariance suggeststhat the stocks have a strong positive correlation (stocks that move in thesame direction at the same time). A large negative number suggests a strongnegative correlation (stocks that move in opposite directions in the sametime period). Rather than trying to decipher the meaning of different covariance numbers that are based on differently priced stocks, we can convertthat covariance term into a standardized value that applies to all pairs ofstocks, known as the correlation coefficient.In order to calculate the covariance, we subtract each return of Stock Afrom its mean, and then we subtract each corresponding return of Stock Bfrom its mean and multiply the two values together. We then sum the resultingproducts and divide by (n1). An example will make this clearer.
54
TRADING PAIRS
Rather than duplicate the same steps as above, assume the returns forStock B are as follows: 1 percent, 2 percent, 4 percent, and 5 percent. Thisgives Stock B a mean () of 3 percent, a variance of 3.33, and a standarddeviation of 1.83.Covariance CalculationReturnsPeriod
A
B
(A  )
(B  )
(A  )  (B  )
12
810
12
8  12  410  12  2
1  3  22  3  1
4  2  82  1  2
3
13
4
13  12  1
431
111
4
17
5
17  12  5
532
5  2  10Sum 21
Hint: Notice the difference in returns from stock B’s mean also move fromlowest to highest.We take the sum of the products (21) and divide by (n1):21741Now let’s change some numbers around and look at another scenario.Suppose that instead of posting returns of 1 percent, 2 percent, 4 percent,and 5 percent in periods one through four, Stock B instead posted returns of5 percent, 4 percent, 2 percent, and 1 percent in those four periods.Covariance of Stock A and Stock B:
Period
A
B
(A  )
(B  )
(A  )  (B  )
1
8
5
8  12  4
532
4  2  8
2
10
4
10  12  2
431
2  1  2
3
13
2
13  12  1
2  3  1
1  1  1
4
17
1
17  12  5
1  3  2
5  2  10Sum  21
We take the sum of the products (21