StockFetcher Forums · Filter Exchange · pairs trading filter<< 1 2 >>Post Follow-up
Kevin_in_GA
4,553 posts
msg #94225
Ignore Kevin_in_GA
6/23/2010 5:25:20 PM

Another profitable day trading these pairs:

XLY (long) down $0.01 to $1.47 (down 0.03%)
XLF (short) down $0.06 to $14.51 (up 0.4%)

Net = (0.4% - 0.03%) / 2 = +.18%

XLF Z score is 0.99, so it needs to be closed soon. XLY still has a low Z score of -1.56. Will most likely close these out tomorrow and trade the new top/bottom pair (XLK now has the top Z score at 1.69 and XLU the low Z score of -2.25).

Kevin_in_GA
4,553 posts
msg #94252
Ignore Kevin_in_GA
6/24/2010 6:03:01 PM

Losing day today, but only by a bit:

XLY (long) down 0.75 to 30.72 (a loss of 2.38%). Still ranked as the lowest Z score at -1.82, so will hold for now.

XLF (short) down 0.26 to 14.25 (a gain of 1.79%).

Net for the day of (1.79 - 2.38) / 2 = -0.3%. For comparison, S&P 500 lost 1.68% today.

1. Hold XLY as long position
2. XLF Z score now at -0.13, so it is sold at the close.
3. Short XLV (currently at 28.88 and has the top Z score of 2.17). Maintain dollar neutrality.

Kevin_in_GA
4,553 posts
msg #94317
Ignore Kevin_in_GA
6/26/2010 12:21:24 PM

A quick recap of this week trading this filter strategy versus the overall market (SPY as proxy):

This weeks trades:

Short XLE at 55.45, covered at 53.87 - a gain of 2.93%
Short XLF at 14.57, covered at 14.25 - a gain of 2.25%
Short XLV at 28.88, still holding at 29.01 - a loss of 0.45%

Long XLY at 32.21, still holding at 30.81 - a loss of 4.34%

Net performance (assuming equal dollar investments) = (2.93 + 2.25 - 0.45 - 4.34) = 0.39%

Net performance using dollar neutrality is a little less, because the short positions had to be smaller in dollar value to match the losses in value of the XLY long position over the course of the week, but would still be net positive for the week.

Net performance of SPY - Monday open at 113.12, Friday close at 107.87 (107.87/113.12) = -4.64%.

Will stay in the current trades for the moment, until one crosses over the Z score line or if both are relpaced by better options.

XLF is once again the highest Z score (at 3.17!) after its big move up on Friday. Might be a good short play at the open on Monday. XLY still has the lowest Z score, at -1.58.



joda
4 posts
msg #94542
Ignore joda
7/4/2010 11:43:36 AM

kevin, the idea is excellent, but we have no way to know whether the parameters are profitable year on year

try to write an excel program for that and test it over the last 10 years..

if then, each year is >+30%, then we have a hedge fund worthy system (which at that point you won't share with the mortals anymore, but at least you'd definately deserve the riches..:))

J

roock
4 posts
msg #114973
Ignore roock
modified
8/20/2013 4:46:26 AM

Hi, and it was not without a correlation?
For example, in excel:
Column B - price A
Column C - price B
Column F - Price A / price B (Ratio)
Column G - Average (15) column F
Column H - St. dev column G + 2
Column I - St. dev Column G - 2
Column J - If column F18> H18 then price A short and price B long
Column M - If F24 < I24 then price A long and price B short

If anyone knew convert to SF, it would be super. Hopefully if Kevin?

Thanks

Screen

sorry for my english


roock
4 posts
msg #115108
Ignore roock
8/27/2013 12:11:46 PM

Kevin_in_GA, or someone please help me make a filter for pairs trading.
for example:
A-Stock A
B-Stock B
C-Ratio (Stock A / Stock B)
D-Average Ratio (15)
E-Average Ratio + 2 * StDev (D)
F-Average Ratio -2 * StDev (D)

visualization
Short Signal if C> E and exit if C Signal Long D

Thank you very much

roock

Kevin_in_GA
4,553 posts
msg #115110
Ignore Kevin_in_GA
8/27/2013 1:46:54 PM

You can start with this:

SET{PRICERATIO, IND(,STOCK1,CLOSE) / IND(STOCK2,CLOSE)}
SET{RATIOMA, CMA(PRICERATIO,15)}
SET{RATIOSTD15, CSTDDEV(PRICERATIO,15)}
SET{DIFF215, PRICERATIO - RATIOMA}
SET{ZSCORE15, DIFF15 / RATIOSTD15}

From here you will need to explicitly declare the individual stocks for each pair as a separate filter.

Entry is when the ZSCORE15 is either above 2 or below -2. Exit would classically be the cross above/below ZSCORE15 = 0.

roock
4 posts
msg #115112
Ignore roock
8/27/2013 2:36:48 PM

Kevin thank you, but I can not advise further, I understand making filter. For me as filters still something missing ...?
E.g. Stock1 = Yahoo, stock2 = Goog, but does not filter any results??
Thank you Kevin for help

Kevin_in_GA
4,553 posts
msg #115114
Ignore Kevin_in_GA
8/27/2013 3:50:23 PM

Fetcher[
SYMLIST(YHOO,GOOG)
SET{PRICERATIO, IND(YHOO,CLOSE) / IND(GOOG,CLOSE)}
SET{RATIOMA, CMA(PRICERATIO,15)}
SET{RATIOSTD15, CSTDDEV(PRICERATIO,15)}
SET{DIFF15, PRICERATIO - RATIOMA}
SET{ZSCORE15, DIFF15 / RATIOSTD15}
SET{2SD, 2 * RATIOSTD15}

SET{UPPERBAND, RATIOMA + 2SD}
SET{LOWERBAND, RATIOMA - 2SD}

DRAW LOWERBAND ON PLOT RATIOMA
DRAW UPPERBAND ON PLOT RATIOMA
DRAW PRICERATIO ON PLOT RATIOMA

ADD COLUMN ZSCORE15
]




roock
4 posts
msg #115118
Ignore roock
8/27/2013 5:05:12 PM

Kevin, EXCELLENT thank you

StockFetcher Forums · Filter Exchange · pairs trading filter<< 1 2 >>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