Tuesday, February 22, 2011

Learning Spread Trades: Update

In my previous post I outlined my trading plan for a stock spread: Long 12*UNH, Short 7*WLP.  I said I wanted to buy the spread for under $40 and sell around $53.

Well, I got in at $38.94 on 2/18, using a limit order at $39. I sold 2/22 for 61.14, using a $53 limit order. Both the long and short side of the trade were green.


The spread is looking a little overbought. I may even consider shorting it soon, maybe above $64. But for now, I can sit back and smile at a well executed plan.

Thursday, February 17, 2011

Learning Spread Trades

First off, I barely know what I'm doing here. I had never really thought about spread trades until I began following Michael Bigger (@biggercapital). The guy really seems to have a passion for spreads, and it's kind of contagious. Credit is also due to Aris David (@fledglingtrader) and @biggercapitalnw for posting some spread trades for me to study. Dynamic Hedge is really good with these too, so I thank him for some education too.

The spread I'm looking at is UNH - WLP.  Below is a graph of the spread. I'll explain further.


The top graph is the price of UNH 42.59 / WLP 67.21 = 0.63.
Red line = 30 day linear regression line
Blue dotted line =  2 standard deviations away from the red line
Fuchsia line = 3 standard deviations away from the red line

The bottom graph is simply the price of a dollar neutral (almost) spread: 12*UNH - 7*WLP [Long 12 shares UNH, short 7 shares WLP]. I need this bottom chart so I can analyze the actual prices of my desired spread.

Reasons for Identifying this Spread

1.  Both stocks are in the same industry
2. They are highly correlated 96.45% over the last year. Correlation  = A statistical measure of how two securities move in relation to each other.
3. They are highly co-integrated 99.50%.  Cointegration = the statistical confidence that a pair will revert to the mean. I think cointegration is the most important. High correlation means that over a given period of time, two stocks will move up or down in synchrony. But high cointegration means the two prices cannot wander too far off in opposite directions for very long before they eventually come back to a mean distance. Unfortunately, my Amibroker cannot calculate cointegration, so I rely of this nifty website Catalyst Corner. I run a trade report (see bottom of post) that confirms some of the things I'm reading on the charts.
4. It is over two standard deviations away from it's 30 day linear regression line. You can see at the beginning of 2011 the spread touched the bottom 3 STD line, then snapped back. It hit the upper range then came down to where it is today. I'm expecting similar action.
5. WLP is short term overbought in my book, RSI(2)>99.

 

Using Interactive Brokers, you can create the 12*UNH - 7*WLP spread and enter a limit order; they handle the price execution on each stock. That spread closed at 40.63 today, so I might place a limit order below that. I would be buying a price that is statistically very far from it's mean, and likely to revert back.

Exit Strategy

I'm still trying to figure this part out, but I think I'll look to exit when the spread price gets back to it's 30 day regression line, which it $53. I don't know though; I may just use discretion. I'm treating this as a short term trade, so I'd like to get out in a few days.

UNH and WLP are slow movers and I don't really expect fast action, so I think they're good to learn on. When I get more comfort with spreads, I'll look to more volatile stocks. They're not even going to make me big $$, but that's OK. If I got in at $40 and exited at $53, buying/selling $10K of each stock, it would be about $260 profit.

Difficulties I've Encountered

Finding trades on a daily basis! I wish I could just write a code in Amibroker that would scan stocks and give me the spread ideas. I can't though. I think I need to just pick a few spreads that are highly coointegrated and watch them all the time. I'd look for similar scenarios I see with UNH - WLP.

Backtesting -  I haven't figured out how to code this in Amibroker. Being a quant (albeit Simple), I feel more comfortable making trades that have some backtested results. I need to work I my coding skills, but in the meantime, I'll really on my human brain and real time trades to figure this out.

Why I'm Trying These

To do something new and expand my trading repertoire. If I can sprinkle a spread strategy with my other strategies, it can benefit my bottom line.

Most importantly, I view a spread trade differently that just a regular 'go Long' or 'go Short trade'. Sure, I want UNH to go up  and WLP to go down; that would be ideal. But the way I really look at it: I want UNH to go up faster than WLP or I want WLP to go down faster than UNH. I'm not trying to be green on each stock, just green on the spread. So I'll probably have one winner and one loser, but overall net positive. Also, there's less anxiety about market direction.

So there it is. This spread stuff is a work in progress. I'm just glad I found some cool people in twitterland that introduced me to the idea. I know I'm not considering many factors like half life or Pearson correlation, but in due time. Let me know if I am on the right track.

Cheers!

-----------------------------------------------------------------------------------------------------------------------

This is the Catalyst Corner report, click to enlarge.

Tuesday, February 15, 2011

Taxes, Beer and Perspective

I'm sure many of you have seen this before, but here it is again. I agree with the message bigtime.
-----------------------------------------------------------------------------------------------------------------------
Suppose that every day, ten men go out for beer and the bill for all ten comes to $100.

If they paid their bill the way we pay our taxes, it would go something like this;

The first four men (the poorest) would pay nothing.
The fifth would pay $1
The sixth would pay $3
The seventh would pay $7
The eighth would pay $12
The ninth would pay $18
The tenth man (the richest) would pay $59

So, that's what they decided to do.

The ten men drank in the bar every day and seemed quite happy with the arrangement, until one day, the owner threw them a curve ball.

"Since you are all such good customers," he said, "I'm going to reduce the cost of your daily beer by $20". Drinks for the ten men would now cost just $80.

The group still wanted to pay their bill the way we pay our taxes.

So the first four men were unaffected.

They would still drink for free. But what about the other six men - the paying customers?

How could they divide the $20 windfall so that everyone would get his fair share?

They realised that $20 divided by six is $3.33.
But if theysubtracted that from everybody's share, then the fifth man and the sixth man would each end up being paid to drink his beer.

So, the bar owner suggested that it would be fair to reduce each man's bill by a higher percentage the poorer he was, to follow theprinciple of the tax system they had been using, and he proceeded to work out the amounts he suggested that each should now pay.

And so the fifth man, like the first four, now paid nothing (100% saving).

The sixth now paid $2 instead of $3 (33% saving).

The seventh now paid $5 instead of $7 (28% saving).

The eighth now paid $9 instead of $12 (25% saving).

The ninth now paid $14 instead of $18 (22% saving).

The tenth now paid $49 instead of $59 (16% saving).

Each of the six was better off than before. And the first four continued to drink for free. But, once outside the bar, the men began to compare their savings.

"I only got a dollar out of the $20 saving," declared the sixth man.

He pointed to the tenth man, "but he got $10!"

"Yeah, that's right," exclaimed the fifth man. "I only saved a dollar too. It's unfair that he got ten times more benefit than me!"

"That's true!" shouted the seventh man. "Why should he get $10 back, when I got only $2? The wealthy get all the breaks!"

"Wait a minute," yelled the first four men in unison, "we didn't get anything at all. This new tax system exploits the poor!"

The nine men surrounded the tenth and beat him up.

The next night the tenth man didn't show up for drinks, so the nine sat down and had their beers without him. But when it came time to pay the bill, they discovered something important. They didn't have enough money between all of them for even half of the bill!

And that, boys and girls, journalists and government ministers, is how our tax system works.

The people who already pay the highest taxes will naturally get the most benefit from a tax reduction..

Tax them too much, attack them for being wealthy, and they just may not show up anymore.

In fact, they might start drinking overseas, where the atmosphere is somewhat friendlier.

Wednesday, February 9, 2011

Dow Jones Industrials: Up 8 Straight Days and Extended, Not So Bearish


The Dow Jones Industrial Average may be somewhat obsolete in today's trading world. These are big, boring companies that usually move too slow (except around earnings) to entice traders on a regular basis. But when it comes to a broad market gauge, all eyes turn to the Dow.  It has been on a tear lately, prompting some (me included) to call it 'overextended' and 'due for a pullback'. Let's look.

Conditions

RSI(2)>99 ---> Normally means short term overbought
Closed above Bollinger Band (50,2) for 2 consecutive days ---> Perceived as overbought
Up 8 straight days ---> Overbought according to most people

So we have 3 'overbought' events hitting the Dow on 2-9-11. This is an interesting confluence and rather rare, with the last occurrence in 1996. So I decided to test the entire the entire history of the Dow Jones to get enough samples [data from Premiumdata.net].  I realize that the market in 1904 vs 2011 is like comparing George Mikan to Dwight Howard. But bear with me, this is for fun.


Buy $DJI on the 3 conditions above; sell 'n' days later. $10,000 per trade; 1904 to present.
Exit 'n'
 days
Net Profit
# Trades
# of winners
% of Winners
Max. Trade % DD
Avg % P/L
W. Avg. Profit
L. Avg. Loss
Profit Factor
Payoff Ratio
1
         (323.67)
60
26
43.33
-1.69
-0.05
        51.05
         (48.56)
0.80
1.05
2
            646.49
49
26
53.06
-3.07
0.13
        88.58
         (72.03)
1.39
1.23
3
            953.53
48
26
54.17
-4.08
0.20
        98.51
         (73.08)
1.59
1.35
4
        1,526.35
47
32
68.09
-4.08
0.32
        97.47
       (106.19)
1.96
0.92
5
        1,885.20
46
29
63.04
-4.08
0.41
      110.72
         (77.97)
2.42
1.42



Doesn't look too bearish. Some weakness in the first couple days, but then it turns, gulp, bullish. So maybe we go down a bit tomorrow, but things look brighter after the first day.

Looking at an intermediate time frame of 3 months:


Buy $DJI on the 3 conditions above; sell 'n' weeks later. $10,000 per trade; 1904 to present.
Exit 'n'
 weeks
Net Profit
# Trades
# of winners
% of Winners
Max. Trade % DD
Avg % P/L
W. Avg. Profit
L. Avg. Loss
Profit Factor
Payoff Ratio
1
              1,885
46
29
63.04
-4.08
0.41
            111
               (78)
2.42
1.42
2
              3,756
46
30
65.22
-4.20
0.82
            200
             (140)
2.68
1.43
3
              4,429
45
29
64.44
-7.05
0.98
            244
             (166)
2.67
1.47
4
              5,743
45
34
75.56
-9.16
1.28
            281
             (346)
2.51
0.81
5
              5,850
45
30
66.67
-11.02
1.30
            349
             (309)
2.26
1.13
6
              5,914
44
27
61.36
-11.02
1.34
            379
             (254)
2.37
1.49
7
              6,891
44
27
61.36
-11.80
1.57
            419
             (260)
2.56
1.61
8
              9,342
43
32
74.42
-10.02
2.17
            404
             (327)
3.60
1.24
9
            12,867
43
33
76.74
-10.02
2.99
            515
             (413)
4.11
1.25
10
            15,110
42
32
76.19
-10.02
3.60
            602
             (415)
4.64
1.45
11
            16,903
40
29
72.5
-10.82
4.23
            704
             (319)
5.82
2.21
12
            16,370
39
30
76.92
-10.83
4.20
            650
             (347)
6.24
1.87


This looks bullish to me. In my own research, I've realized that when the indexes (DJI, SPX, COMP) go up for 7,8,9+ days in  a row, it is a sign of a very strong market. When we pierce the upper levels of a bollinger band (and other metrics), it may mean a slight pause (2-3 days) before we continue to trade higher.

I was also a little weary about the 100 year old data, so I tested the 8 straight up days and BB(50,2) from 1990. The results are nearly identical: slight potential for a  pullback in the first couple days, then up again.

Caveat: if the Dow was climaxing (up like 3+%) today, then I would re-evaluate these results. But it's not, so no need to concern with that.

Conclusion

The Dow is boring.
Perceived 'overboughtness' [multiple up days, upper BB piercings) is actually a bullish sign in an intermediate time frame.  There are decent odds for short term pullback, but bullish after a few days.

Cisco was down today in the after hours on earnings, so that may be the excuse to pull back tomorrow.  But it has a small weight on the Dow. No POMO tomorrow too (I think).

Remember, do your own research and consider all relevant factors.

Good trading out there.
----------------------------------------------------------------------------------------------------------------------
Random Facts

 # of times DJI has risen 'x' consecutive days:

 8 days - 102 occurrences
 9 days -   46 occurrences
10 days -  21 occurrences
11 days -   8 occurrences
12 days -   2 occurrences
13 days -   1 occurrence, 1/20/1987

Monday, February 7, 2011

VIX and Its Collection of ETF's: Forming a Tradeable Plan

I do my best to track and understand the VIX.  I can't explain the technicalities such as backwardation, contango or even skew. I just attempt to look at this volatility index from a broad, simple man's point of view. Can I use the historical, back-tested price action of the VIX to generate actionable trade ideas? As of right now, I haven't put it all together, but I'm trying. So here is a recap of some studies from the past months.

1/14/11: VIX closed below Bollinger Band (20, 2). The expectations were for an increase in volatility. Actual results below...

Ticker
Name
Date
Price
Ex. date
Ex. Price
% chg
MAE
MFE
^VIX
CBOE Volatility Index
1/14/2011
15.46
1/21/2011
18.47
19.47%
-0.58%
21.93%


So, yeah, the VIX shot up that week. Good, I predicted the correct direction of the VIX, but can I use that to make some money through VIX ETF's? Below is how a handful of ETF's performed that week.


Ticker
Name
Date
Price
Ex. date
Ex. Price
% chg
MAE
MFE
TVIX
Velocityshares Daily 2x Vix Short Term ETN
1/14/2011
45.3
1/21/2011
47.25
4.30%
-7.09%
10.04%
ZIV
Velocityshares Daily Inverse Vix Medium Term
1/14/2011
115.03
1/21/2011
118.7
3.19%
0.00%
3.19%
VIIX
Velocityshares Vix Short Term ETN
1/14/2011
68
1/21/2011
69.63
2.40%
-0.12%
3.26%
VXX
Barclays Bank iPath S&P 500 Vix Short Term F
1/14/2011
31.57
1/21/2011
32.23
2.09%
-3.42%
5.23%
CVOL
C-Tracks Exchange Trade Notes Based on The P
1/14/2011
53.55
1/21/2011
53.85
0.56%
-5.96%
3.66%
VQT
Barclays +S&P Veqtortm ETN
1/14/2011
110.01
1/21/2011
109.96
-0.05%
-0.39%
0.79%
VXZ
Barclays Bank iPath S&P 500 Vix Mid Term Fut
1/14/2011
60.34
1/21/2011
60.27
-0.12%
-2.22%
2.50%
XXV
iPath Inverse S&P 500 Vix Short-Term Futures
1/14/2011
34.05
1/21/2011
33.9
-0.44%
-0.76%
0.59%
XVIX
UBS AG E-Tracs Daily Long-Short Vix 2040 ETN
1/14/2011
25.47
1/21/2011
25.1
-1.45%
-1.61%
0.39%
VIIZ
Velocityshares Vix Medium Term ETN
1/14/2011
86.18
1/21/2011
84.64
-1.79%
-2.22%
0.00%
VZZ
IPath Long Enhanced S&P 500 Vix Mid-Term Fut
1/14/2011
20.34
1/21/2011
19.97
-1.82%
-6.10%
3.64%
XIV
Velocityshares Daily Inverse Vix Short Term
1/14/2011
142.09
1/21/2011
138.35
-2.63%
-5.56%
3.20%
TVIZ
Velocityshares Daily 2x Vix Medium Term ETN
1/14/2011
73.93
1/21/2011
71.17
-3.73%
-4.44%
0.00%


You can see how each ETF fared if you bought on the close 1/14/11 and sold on the close 1/21/11. The right columns show the highest run-up and the worst drawdown intraday. (i.e. if you bought TVIX, you would have closed with a 4.30% profit, but were down as much as -7.09% and up as much as 10.04% during that trade.) On a week where the VIX was up almost 20%, I could've made only 4+% using TVIX. I don't really like that correlation. Although not totally unexpected, a massive VIX move does not create an equal one via ETF's (even leveraged).
-----------------------------------------------------------------------------------------------------------------------

1/28/11: VIX Up 20% in One Day: Bearish Volatility, Bullish S&P 500. The expectations were for a decrease in volatility. Actual results below...


Ticker
Name
Date
Price
Ex. date
Ex. Price
% chg
MAE
MFE
^VIX
CBOE Volatility Index
1/28/2011
20.04
2/4/2011
15.93
-20.51%
-20.56%
0.20%


Again, fortunate to predict correctly and to get a huge VIX move (-20%). How did the VIX ETF's fare?


Ticker
Name
Date
Price
Ex. date
Ex. Price
% chg
MAE
MFE
XIV
Velocityshares Daily Inverse Vix Short Term
1/28/2011
137.5
2/4/2011
150.06
9.13%
-1.32%
11.29%
ZIV
Velocityshares Daily Inverse Vix Medium Term
1/28/2011
121.54
2/4/2011
128.81
5.98%
0.00%
5.98%
VQT
Barclays +S&P Veqtortm ETN
1/28/2011
109.43
2/4/2011
111.63
2.01%
0.00%
2.21%
XXV
iPath Inverse S&P 500 Vix Short-Term Futures
1/28/2011
33.94
2/4/2011
34.46
1.53%
-0.18%
1.53%
XVIX
UBS AG E-Tracs Daily Long-Short Vix 2040 ETN
1/28/2011
24.45
2/4/2011
23.96
-2.00%
-5.32%
1.43%
VXZ
Barclays Bank iPath S&P 500 Vix Mid Term Fut
1/28/2011
58.65
2/4/2011
54.94
-6.33%
-6.33%
0.36%
TVIZ
Velocityshares Daily 2x Vix Medium Term ETN
1/28/2011
65.3
2/4/2011
60.86
-6.80%
-6.80%
1.09%
VIIX
Velocityshares Vix Short Term ETN
1/28/2011
68.97
2/4/2011
64.14
-7.00%
-7.00%
1.35%
VIIZ
Velocityshares Vix Medium Term ETN
1/28/2011
84.64
2/4/2011
78.17
-7.64%
-7.64%
0.00%
VXX
Barclays Bank iPath S&P 500 Vix Short Term F
1/28/2011
32.1
2/4/2011
29.21
-9.00%
-9.41%
1.46%
CVOL
C-Tracks Exchange Trade Notes Based on The P
1/28/2011
50.77
2/4/2011
43.5
-14.32%
-14.32%
0.79%
VZZ
IPath Long Enhanced S&P 500 Vix Mid-Term Fut
1/28/2011
18.86
2/4/2011
15.63
-17.13%
-17.13%
0.11%
TVIX
Velocityshares Daily 2x Vix Short Term ETN
1/28/2011
46.11
2/4/2011
38.13
-17.31%
-17.31%
2.65%


Interesting to see how those inverse VIX ETF's perform. Shorting (available shares?) TVIX could've been an option. Or just buying XIV was a decent choice. I'm slowly starting to figure these ETF's out.  When the VIX drops, those ETF's seem to track the action better than when the VIX rises. (I'm sure a technical explanation exists, but not from me.) Average trading volume is still really low for most them, so I'll probably wait before I venture into some of the newer ETF's.  My VIX explorations will be ongoing...