back start next


[start] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [ 11 ] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22] [23] [24] [25] [26] [27] [28] [29] [30] [31] [32] [33] [34] [35] [36] [37] [38] [39] [40] [41] [42] [43] [44] [45] [46] [47] [48] [49] [50] [51] [52] [53] [54]


11

2 Pair Trading

ExitLong("Acme P LX +") This Bar on Close Else If Spread <= StandardDeviations * LowerBard Then ExitLongCAcme P LX -") This Bar on Close;

If Spread crosses below UpperBard Then

Sell("Acme P SE") N Shares This Bar on Close;

If Spread crosses below Then

ExitShortCAcme P SX +") This Bar on Close Else If Spread >= StandardDeviations * UpperBand Then

ExitShortCAcme P SX -") This Bar on Close;

(Log Trades for Spreadsheet Export)

Conditioni = AcmeLogTrades(LogTrades, LogFile, "P");

To see both legs of the pair trade executing sunultaneously, the TradeStation workspace must be set up to have two charting windows stacked horizontahy, one window configured as shown in Table 2.4 and the other configured as shown inTable2.5.

Table2.4. Pair Configuration for Chart Window 1

Datal

Stock A

Intraday

Data2

StockB

Intradav

Data3

Stock A

Dailv

Data4

StockB

Daily

Data?

Acme Spread

Indicator

uration for Chart Window 2

Datal

StockB

Intradav

Data2

Stock A

Intraday

Data3

StockB

Dailv

Datal

Stock A

Dail

Data5

Acme Spread

Indicator

With the windows configured in this manner, the trader will receive the long and short signals ofthe pair simultaneously. For a Long A-Short pair, the long signal will trip in Chart Window 1, and the short signal will fire in Chart Window 2 For a Short A Long pair, the short signal will be displayed in Chart Window 1, and the long signal will appear in Chart Window 2.

26 Examples 51

2.6 Examples

The following examples fllustrate how to trade the Acme P System. Each example uses anEquityvalue of$100,000, a Percent VolatflitjModel with a risk value of2>o, and the number of Standard Deviations is two. Because each leg uses the Percent Volatility Model, the number ofshares is austed to each stocks ATR.

2.6.1 Actlvislon-THQ Incorporated

Figure 2.4 is an example ofa Short A-Long entrj. Stock A (AT\I) has become overvalued relative to StockB (THQI) because the Spread has risen above the upper SpreadBand. As soon as the Spread crosses backbelow the upper SB, we short 1400 shares ofATVI at aprice of26.70 at 1:40 pm and buy 600 shares ofTHQI at 54.10 (note that TradeStation does not show simultaneous signals in different plots, so the symbols have to be reversed to show the long signal in THQI-seeFigiiiB2.5).

The Spread croases below zero right at :35 am the next day, at which point tiie ATVI short trade is covered at 26.07 for a profit of 0.63 pcdnts. ShnuHane-oiisly, we seh THQI at 55.96 for a profit of i£6 jxiinls on tiie Iote side ofthe pair. Together, the pair trade nets a total profit of $1,998, not including shppage and commissions.

1 NASDQ

,1. p.....i,.»

rHQI-Smin NASDQ

l<iKi"t-2--*- . 1 -.1..11 .) hi.<>t]><>i.>i<-.l Im



2.6.2 THQ-Activlsion

this is the reverse leg ofthe atvi-thql jjair trade sliownin fieiire 2.4 andis a long a-short entry. note the sj-mmetr} ofthe spread banda in the acme spread indicator. essentially, this spread is a mirror image ofthe spread shown in the previous example, but the sb value is the same (0.1025).

fure 25. thqlnco orated-actlvislon pair

tables 2.6 and 2.7 show the results oftrading both legs ofthe atvl-thql pair from november 6*, 2000 through march 22nd, 2002. the average trade netted $285 for the atvi leg and $ 462 for the thql leg, totaling $747 for the stod: pair net of commissions and slippage, the average trade for this accoimt size would fall in the range of $500 to $600. this example is a tjpical scenario for a pair trade: one profitable leg and one unprofitable leg. the goal is to capitalize on the price difference with proper position sizing.

some ofthe most effective pair trades occurwhen one stock m the parr gaps disproportionately to the other stock. for example, iftwo stocks with the same atr but different prices gap up one point, e.g., the stock futures are up, then the gap creates a pricing disparity. if one stock closed at 30 and the other at 40, then the pair apread is (31 / 30) 1.033 minus (41 / 40) 1.025 equals +0.008. hence, theformerstockisovervaluedrelativeto the latter, settingup apossible short a long pair trade.

table2.6.tradestationstrateg5performancereport-acmeps5stematvi-5min

total net profit

$9.114.00

open position p/l

$0.00

gross profit

$22,39200

gross loss

($13.278.00)

total # oftrades

percent profitable

59.38>o

numberwinnltig trades

number losing trades

largest winning trade

$3.159.00

laigest losing trade

($2880.00)

average winning trade

$1.178.53

aveie losing trade

($1,021.38)

ratio awjwin/avg loss

1.15

avg trade (wm & loss)

$2st.81

max consec. winners

max consec. losei

a\g # bars in winners

avg #bars m losei

max intraday drawdown

($5,149.00)

profit factor

1.69

max # contracts held

3,600

table27. tradestation strategjperformancereport-acmepsjbtemthqi-s min

total net profit

$14,797.00

open position p/l

$0.00

gross profit

$27,628.00

gross loss

($12831.00)

total # oftrades

percentprofltable

6250°o

number winning trades

number losing trades

largest winning trade

$3,360.00

largest losing trade

($3,500.00)

average winning trade

$1,381.40

aveie losing trade

($1,069.25)

ratio awjwin/avg loss

1.29

avg trade (win & loss)

$16241

max consec. winners

max consec. losers

avg # bars in winners

avg # bars in losers

max intraday drawdown

($3,971.00)

profit factor

max # contracts held

2600



2.6.3 Apache-Anadarko

The New York Stock Exchange is an excehent 1 for trading correlated pairs, especiahy among the oil service companies. The APA-APC pair usually has a correlation above 0.9 and exhibits smooth multi-day swings between the spread banda.

[n Figure 2.6, becomes relativaly expensive to APC as the spread nicks the upper spread band. This is an example ofa Short A-Long Entrj. As soon as the Spread crosses backbelow the upper SB, we short 1400 shares of at a price of 57.98 at 1:00 pm and buy 1400 shares of APC at 58.00. Two hours later at 3:00 pm, the spread crosses bebw zero; the short is covered at 57.48 for a profit of $700, and the APC long is sold at 58.10 for aprofit of $140. In this case, the total apread profit is $840, with one leg offhe pair making most of the profit.

Be skeptical of exceedingly narrow Spread Banda for stock pairs with high correlations. This is probably an indication that the correlation perbd is too smah. Use 30 dajs at a minimum-we recommend at least 90 ds to factor in the quarterly eamings cycle. The problem with narrow Spread Bands is that fhey are sensitive to smah changes in the stock price, and too many signals wih be generated. Moreover, iffhe stocks do not have high ATRs, then overcoming the slkmage and commissions wih be difficult.

WA-Smin NYSE 03/21/2002

-5 min NYSE 03/21/2002

Mbii.i.l«4t

,.....,.1..- "lll..rf*j"""

ftcmeSpcWKHCIose ol Data3,Close ol Dat»l.2.30(JI.00130 0.01074 0.00000 -0.01074

15:15 / 10:45 11:25 lZ:05 12:45 13:25 1:05 l4.45 lS:25 / 1

; > -2. . Al....l.< ,. 1. .. I...

2.6.4 Allstate-Progressive

An advanced pair trading strategy uses acorrelatedpair ofaleader and alaard in a specific stock sector. One ofthe srocks is a growth stock, and the other stock is avalue stock or blue chip stock with htde volatilit}. Typically, the behwefher sitock starts moving before the other, and the lag in price action creates a spread opportunity. Here, two insurance companies have been chosen, conservative Allstate(ALL:NYSE)andmomentumfevoritePrcgressive(PGR:NYSE).

In Figure 2.7, ALL starts declining at 11:45 am and by 1:00 pm has become undervalued relative to PGR. When the spread crosses above the lower SB, a long ALL signal is generated, and thus PGR is a short; the spread is covered at tiie end oftiie day. For the period 11/06/2000 through 03/01/2002, eachleg of this spread had profit factors of2.32 and 3.24, respectivaly. With so many traders on the information highway, it pays to go off-road and pl a niche strategy.

When scanning for stock pairs, look for the behavior demonstrated in the chart below. Whhe Ahstate was declhiiog. Prcgressive managed to stay up for several hours before fehing. Essentiahy, we are looking for a phase shift between two stocks, so we recommend keeping a quote table of ah pairs to quicklyjudge which pairs are showing price discrepancies.

ALL-Sniin NYSE

1S00 " 40.60

R-Smin NYSE

.......u-vv--.....-----------"""x

ln-1,..

. ..5 ««1 ».« . ... : : 4: . 5

"••v""-

W.50 -96.50 «.50

152S 4/06 10:15 10:55 11:35 12:15 12 55 13:35 14 15 14-55 4/09 10:25



[start] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [ 11 ] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22] [23] [24] [25] [26] [27] [28] [29] [30] [31] [32] [33] [34] [35] [36] [37] [38] [39] [40] [41] [42] [43] [44] [45] [46] [47] [48] [49] [50] [51] [52] [53] [54]