StockFetcher Forums · Filter Exchange · HOW TO DESIGN A SYSTEM (NOT JUST A FILTER)<< 1 ... 18 19 20 21 22 ... 43 >>Post Follow-up
mahkoh
1,065 posts
msg #103277
Ignore mahkoh
11/9/2011 5:51:56 PM

Fetcher[
Average Volume(30) above 200000
market is etf

corr(SPY,30,Close) is above 0.85
corr(SPY,60,close) is above 0.85
add column corr(SPY,30,Close)
and compare with SPY



/*FIRST DETERMINE HISTORICAL RATIO OF S&P STOCK TO THE SPY OVER THE LAST 16 DAYS*/
SET{PRICERATIO, CLOSE / IND(SPY,CLOSE)}
SET{RATIOMA16, CMA(PRICERATIO,16)}
SET{RATIOSTD16, CSTDDEV(PRICERATIO,16)}
SET{DIFF16, PRICERATIO - RATIOMA16}
SET{ZSCORE16, DIFF16 / RATIOSTD16}
SET{THRESHOLD16, RATIOSTD16 * 2}

/*NEXT, SET CRITERIA NECESSARY TO TRIGGER A PAIR TRADE*/

SET{UPPERBAND16, RATIOMA16 + THRESHOLD16}
SET{LOWERBAND16, RATIOMA16 - THRESHOLD16}

DRAW LOWERBAND16 ON PLOT PRICERATIO
DRAW UPPERBAND16 ON PLOT PRICERATIO
DRAW BOLLINGER BANDS(16,2)
ADD COLUMN ZSCORE16 {Z-score}

DRAW ZSCORE16 LINE AT 2
DRAW ZSCORE16 LINE AT -2
DRAW ZSCORE16 LINE AT 0
sort column 6
]




Pick a couple of etf's with the lowest z score and open a pair trade against those with the highest z score. My theory is that those with extreme z-score values should at some point reverse to the mean. Difficult to backtest but looking back by offsetting the date seems to generate positive results. Probably shouldn't use leveraged etf's.
Any thoughts?

Kevin_in_GA
4,599 posts
msg #103284
Ignore Kevin_in_GA
modified
11/10/2011 11:25:42 AM

The "long-short" pair trading you are describing here needs some tweaking. I (of course) looked at both long and short versions of this, but in the end the long version was by far more profitable than the combined system. Could be the settings, but this approach is best validated through backtesting and selection of a limited set of ETFs that have shown historical mean-reversion against EACH OTHER, rather than the SPY.

In concept this makes sense and should work fine. In practice there are other more statisitically rigorous ways to do this that I personally would be more comfortable doing.

Kevin_in_GA
4,599 posts
msg #103286
Ignore Kevin_in_GA
11/10/2011 12:51:43 PM

Intraday BUY signals:

AAPL - Zscore16 at -2.48, W %R at -97.8. Currently at 383.11

GME - Zscore16 at -2.25, W %R at - 99.5. Currently at 24.46

duke56468
683 posts
msg #103302
Ignore duke56468
modified
11/11/2011 12:06:54 PM

GME crossed above the -1 z-score intraday, you may want to exit or place a close stop since it was only on intraday that it was discovered

GME - GAMESTOP CP 25.26 2.68 873,374 +0.25

Kevin_in_GA
4,599 posts
msg #103342
Ignore Kevin_in_GA
11/14/2011 6:17:52 PM

End of day BUY signal for AAPL.

Kevin_in_GA
4,599 posts
msg #103356
Ignore Kevin_in_GA
11/15/2011 11:09:56 AM

Intraday BUY signal for GME. Currently at 23.99.

Kevin_in_GA
4,599 posts
msg #103370
Ignore Kevin_in_GA
11/16/2011 9:55:38 AM

AAPL - intraday exit signal (zscore is at -0.62). Currently, AAPL price is 389.91.

This trade netted just over 2% in 2 days. Not astounding, but this happens all the time from this filter and over time this consistency adds up.

jackmack
334 posts
msg #103371
Ignore jackmack
11/16/2011 10:19:20 AM

Very nice Kevin - very nice.
Thank you for sharing this
jackmack

Kevin_in_GA
4,599 posts
msg #103379
Ignore Kevin_in_GA
11/16/2011 6:57:25 PM

End-of-Day BUY signals

TSO
CMG
MPG

I also got a hit on ACE, but at the very last minute it closed a hair over the lower BB so it dropped off the BUY signal list. Still a possible play if you are not a purist on this filter.

AAPL confimred a SELL signal at end of day today, but was below my intraday call at 389. I like the intraday approach.

GME was a laggard today, closing down -4.4%, with a Zscore at -2.85.

duke56468
683 posts
msg #103383
Ignore duke56468
11/16/2011 9:32:28 PM

ACE did show up again at -2.12

StockFetcher Forums · Filter Exchange · HOW TO DESIGN A SYSTEM (NOT JUST A FILTER)<< 1 ... 18 19 20 21 22 ... 43 >>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 2026 - 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


This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.