StockFetcher Forums · General Discussion · SOME PAIRS TO CONSIDER<< 1 2 3 4 5 >>Post Follow-up
drew9
171 posts
msg #112281
Ignore drew9
3/16/2013 11:54:09 PM

Hey Kevin, really great work AGAIN! Just wondered if you are aware of possible ways to get alerts for when these pairs close outside the Bollinger Bands? Not sure if there is anyway to code something for this in SF and then use their email alerts?

mahkoh
891 posts
msg #112282
Ignore mahkoh
modified
3/17/2013 5:44:49 AM

If it is possiible without running into filter restrictions you would still need a seperate filter for each pair. A better option is to create a google docs or excel file and caculate the ratios and sd's there.

Kevin_in_GA
4,542 posts
msg #112284
Ignore Kevin_in_GA
modified
3/17/2013 10:23:55 AM

You could do something like this (example for HES:FLR)

Fetcher[

SET{HES_FLR, IND(HES,CLOSE) / IND(FLR,CLOSE)}
SET{HES_FLRMA, CMA(HES_FLR,12)}
SET{HES_FLRSTD12, CSTDDEV(HES_FLR,12)}
SET{HES_FLRDIFF, HES_FLR - HES_FLRMA}
SET{HES_FLRZ, HES_FLRDIFF / HES_FLRSTD12}

ADD COLUMN HES_FLRZ {HES:FLR}
ADD COLUMN BOLLINGER %B(12,2)
ADD COLUMN RSI(2)

SYMLIST(HES,FLR)

DRAW BOLLINGER BANDS(12,2)
DRAW BOLLINGER BANDS(12,1)
DRAW HES_FLRZ LINE AT 2
DRAW HES_FLRZ LINE AT -2
]



This adds the current position of the ratio relative to the BB(12) - if it is below -2 go long HES and short FLR, and if it is above 2 go short HES and long FLR. Close out the pairs trade upon reversion back below 1 SD.

Now copy this code and modify for the remaining 49 pairs. The will generate a single email for each pair where the score for can be seen each night.

Kevin_in_GA
4,542 posts
msg #112285
Ignore Kevin_in_GA
modified
3/17/2013 10:26:56 AM

NOTE ADDED IN PROOF - Given some of the limitation for numbers of columns in a filter output, I have revised the filter strategy above.

mahkoh
891 posts
msg #112288
Ignore mahkoh
3/17/2013 1:21:45 PM

Fetcher[



SET{HES_FLR, IND(HES,CLOSE) / IND(FLR,CLOSE)}
SET{HES_FLRMA, CMA(HES_FLR,12)}
SET{HES_FLRSTD12, CSTDDEV(HES_FLR,12)}
SET{HES_FLRDIFF, HES_FLR - HES_FLRMA}
SET{HES_FLRZ, HES_FLRDIFF / HES_FLRSTD12}

ADD COLUMN HES_FLRZ {HES:FLR}
ADD COLUMN BOLLINGER %B(12,2)
ADD COLUMN RSI(2)

SYMLIST(HES,FLR)

DRAW BOLLINGER BANDS(12,2)
DRAW BOLLINGER BANDS(12,1)
DRAW HES_FLRZ LINE AT 2
DRAW HES_FLRZ LINE AT -2

set{trig1,count(hes_flrz above 2,1)}
set{trig2,count(hes_flrz below -2,1)}
set{trigger,trig1 + trig2}
trigger above 0.5
]



Using this filter you will only receive emails for pairs that trigger

Kevin_in_GA
4,542 posts
msg #112290
Ignore Kevin_in_GA
3/17/2013 2:26:53 PM

Not exactly - you'll still get the email every night but it will be empty unless the pair triggers.

mahkoh
891 posts
msg #112292
Ignore mahkoh
3/17/2013 4:33:26 PM

Hmm. Well, in that case I would definitely choose the spreadsheet solution.

drew9
171 posts
msg #112316
Ignore drew9
3/18/2013 11:31:03 PM

Hey Kevin, your expertise never fails to amaze me. Great work once again! Just wondered if you backtested these with entries at the close or next open? It appears after reviewing a few that entering before the close may be best but I will have to study more of them. I really like this low risk approach and it also has a fair amount of hits for each pair. Just wondered if you are currently or plan to trade this method for your funds? I know your previous thoughts on stop losses but if you plan to trade them, will you plan on using one? Thank you!

Kevin_in_GA
4,542 posts
msg #112317
Ignore Kevin_in_GA
3/19/2013 8:35:42 AM

Hey Kevin, your expertise never fails to amaze me. Great work once again! Just wondered if you backtested these with entries at the close or next open? It appears after reviewing a few that entering before the close may be best but I will have to study more of them. I really like this low risk approach and it also has a fair amount of hits for each pair. Just wondered if you are currently or plan to trade this method for your funds? I know your previous thoughts on stop losses but if you plan to trade them, will you plan on using one?

1. These were identified and backtested using PairTradeFinder, so I'm not exactly sure if they were at the close or the open of the next day. Either way, they were 100% winners. As to this being a "low risk" approach, this may or may not be the case.
2. The classical arbitrage approach is lower volatility, but usually the stock pairs are from the same industry so that anything that might affect them from the larger economic environment is compensated for by holding both a long and short position. In these pairs, however, they are not typically from the same industry. I looked at keeping to the same industry for pair selection but it is limiting in the number of good pairs found.
3. I do not plan to trade this approach because I trade out of a 401k brokerage account and I cannot take short positions in any stocks. I like the strong statistical underpinning of this approach but will not practice it right now.
4. I would suggest doubling down rather than using stop losses - these are high probability trades but with smaller profit for the amount at risk (typically you make $300 but are betting $10,000 long and $10,000 short, so the return is only about 1.5%). Rather than use a stop loss, if you double down when the ratio goes to 3 SD you are likely to make more money.

Another note - in my opinion it is always better to enter the trade once the ratio crosses back below 2 SD rather than crosses above. That way you do not get hung out on a strong move by one stock that drives the ratio against you. Just my opinion. Unfortunately, PTF signal you on the cross above rather than the cross below (I emailed Jared at PTF to see if this could be changed but never got a response).


mahkoh
891 posts
msg #112451
Ignore mahkoh
3/26/2013 9:20:29 AM

Kevin,

After looking a bit closer at the first post of this thread I have come up with a few remarks:

ABI is present in 7 different pairs. It is likely that all 7 will trigger if ABI makes a substantial move. Would that not be putting a lot of eggs in one basket? Sidenote: ABI is the safety first trust 2009 which I do not believe to be part of the SP500.

TIE is no longer a valid symbol as it was bought out in mid November.

ORCL/RRD and PBR/WIN appear twice in the list.

StockFetcher Forums · General Discussion · SOME PAIRS TO CONSIDER<< 1 2 3 4 5 >>Post Follow-up

*** Disclaimer *** StockFetcher.com does not endorse or suggest any of the securities which are returned in any of the searches or filters. They are provided purely for informational and research purposes. StockFetcher.com does not recommend particular securities. StockFetcher.com, Vestyl Software, L.L.C. and involved content providers shall not be liable for any errors or delays in the content, or for any actions taken based on the content.


Copyright 2016 - Vestyl Software L.L.C.Terms of Service | License | Questions or comments? Contact Us
EOD Data sources: DDFPlus & CSI Data Quotes delayed during active market hours. Delay times are at least 15 mins for NASDAQ, 20 mins for NYSE and Amex. Delayed intraday data provided by DDFPlus