StockFetcher Forums · Filter Exchange · HOW TO DESIGN A SYSTEM (NOT JUST A FILTER)<< 1 2 3 4 5 ... 43 >>Post Follow-up
Kevin_in_GA
4,599 posts
msg #101086
Ignore Kevin_in_GA
6/5/2011 12:39:26 PM

Sean:

That is not my example - StockFetcher just shows you three of the returned stocks. You need to click on the filter and pick the top ranked stocks (I have them ranked by lowest Z-score16 at the top).

seanban
22 posts
msg #101089
Ignore seanban
6/5/2011 2:45:16 PM

Kevin,
I must be making a mistake somewhere; when I click on the filter indicated in this thread (msg #101013), I get 11 symbols listed, three of which are those listed by you. See below.

Am I missing some extra filter here?

Thanks - Sean



FMC 79.68 -2.16 682100 -2.86
LEG 24.27 -2.53 1434500 -2.62
AMD 7.97 -3.28 21264700 -2.49
SAI 16.76 -2.61 3422400 -2.34
SWY 22.28 -1.76 8320900 -2.27
SNA 57.07 -1.86 339500 -2.26
PKI 26.4 -2.19 810400 -2.25
ESRX 56.73 -2.26 4701700 -2.23
TER 14.93 -3.37 4014000 -2.19
DD 50.29 -1.72 6056500 -2.12
COST 77.81 -1.51 3377400 -2.11
WU 19.8 -2.7 4911500 -2.11
MOLX 25.92 -2.7 720800 -2.03
PDCO 32.77 -1.77 895200 -2.01


Kevin_in_GA
4,599 posts
msg #101091
Ignore Kevin_in_GA
6/5/2011 4:30:05 PM

If you want to paper trade this, you are going to need to set up a separate filter to tell you when to exit.

Example: My entry filter is this:

Fetcher[

S&P500

/*FIRST DETERMINE HISTORICAL RATIO OF S&P STOCK TO THE SPY OVER THE LAST 16 DAYS*/
SET{PRICERATIO, CLOSE / IND(^SPX,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}

zscore16 below -2
williams %R(16) below -94
close below lower Bollinger Band(16,2)
close above MA(200)

DRAW LOWERBAND16 ON PLOT PRICERATIO
DRAW UPPERBAND16 ON PLOT PRICERATIO
Draw bollinger bands(16,2)
ADD COLUMN ZSCORE16 {Z-score}
add column williams %R(16)
and add column corr(^spx,10,Close)


DRAW ZSCORE16 LINE AT -1
DRAW ZSCORE16 LINE AT -2
DRAW ZSCORE16 LINE AT 0


SORT ON COLUMN 5 ASCENDING
CHART-TIME IS 6 MONTHS
]



From Friday's data I choose the top 10 stocks with the lowest zscore16 values. They are:

FMC 79.68 -2.86
LEG 24.27 -2.62
AMD 7.97 -2.49
SAI 16.76 -2.34
SWY 22.28 -2.27
SNA 57.07 -2.26
PKI 26.4 -2.25
ESRX 56.73 -2.23
TER 14.93 -2.19
DD 50.29 -2.12

OK. Now I create a watchlist with these stocks in them, called "zscore_portfolio", put in my entry prices. I would run this filter toward the end of each day (after 3:30 PM, sunce the stocks are less volatile then), so you could just use the close and update any paper trades with EOD data.

Now to make sure you know when to exit (since we exit at zscore(16) > -1) you simply use the following filter:

Fetcher[

watchlist(zscore_portfolio)

SET{PRICERATIO, CLOSE / IND(^SPX,CLOSE)}
SET{RATIOMA16, CMA(PRICERATIO,16)}
SET{RATIOSTD16, CSTDDEV(PRICERATIO,16)}
SET{DIFF16, PRICERATIO - RATIOMA16}
SET{ZSCORE16, DIFF16 / RATIOSTD16}
SET{THRESHOLD16, RATIOSTD16 * 2}

zscore16 above -1

]



This filter won't work here on the forum because there is no such watchlist, but it will work on your machine. Each night have both filters emailed to you. When one of your current holds crosses above -1, it will show up in the second filter - sell it and buy the stock from the first filter with the lowest zscore. Remove the sold stock from your watchlist and replace it with the new pick.


Kevin

novacane32000
331 posts
msg #101092
Ignore novacane32000
modified
6/5/2011 4:59:22 PM

Kevin
I used a 7% stop loss along with your zscore exit and had excellent backtest results dating back to 2002 .

I also through in exit after 5 days and improved results further.

I do not know much about curve fitting-maybe I am guilty of that here.

Hope this link works to the backtest results.

https://spreadsheets.google.com/spreadsheet/ccc?key=0Aunlddkvv9P5dHJuLXJ2UkVuaGJzYmFNdWh2OGIycHc&hl=en_US#gid=0

seanban
22 posts
msg #101120
Ignore seanban
6/7/2011 4:44:46 PM

Kevin,
Started paper tradin as of yesterday based on both filters provided earlier (entry and exit). What I noticed is that during certain times of the day, exit signal list varies. At EOD, we have one signal - DD. But earlier, there were several. Just wondering, performance wise, is it best to exit when the signal is given or to wait as suggested until 30 mins. before markets close?

Thanks - Sean

Kevin_in_GA
4,599 posts
msg #101123
Ignore Kevin_in_GA
6/7/2011 9:06:21 PM

I see two signals today - DD and ESRX. I did not check intraday. Both closed at modest profits.

Four new picks were signaled from the entry filter. The top two are Lorillard (LO) and Ryder (R). I would replace the closed trades with these using the open price tomorrow morning.

Let's see how this plays out ...

Kevin

calhawk01
135 posts
msg #101125
Ignore calhawk01
6/7/2011 9:36:26 PM

Kevin, I just want to say that you are awesome! Thanks for sharing your ideas and thoughts. Very helpful!


Kevin_in_GA
4,599 posts
msg #101130
Ignore Kevin_in_GA
6/8/2011 10:20:59 PM

Close out PKI at the open price tomorrow. Purchased at 26.40, closed today at 26.35. Hopefully will get a slight bounce.

Normally I would replace this one with ANF (Abercrombie and Fitch). The stock is more than 3 SD from it's normal relationship with the ^SPX, and dropped more than 5% today - was earnings driven.

I like the second place stock (WM) as well. A smaller move and a lower W %R. Either would be a good play, so I'll go with the system and choose ANF. Will use open price tomorrow as entry.

novacane32000
331 posts
msg #101143
Ignore novacane32000
modified
6/9/2011 3:56:51 PM

"Kevin,
Started paper tradin as of yesterday based on both filters provided earlier (entry and exit). What I noticed is that during certain times of the day, exit signal list varies. At EOD, we have one signal - DD. But earlier, there were several. Just wondering, performance wise, is it best to exit when the signal is given or to wait as suggested until 30 mins. before markets close?

Thanks - Sean "
*************************************************************************************************************************************

Sean
I am also paper trading this filter and see the same thing you do.

To mimic the backtest results from SF you would want to sell as close to the close as possible or at the open the next day. My SF backtest was set up to sell at the open of the next day but you know it is rare to be able to get that exact sell price at the open. Slippage is gonna happen.

I took a look at setting a stop at the open of the next day after a sell trigger but that will not improve results-With the small sample size I looked at most times I got a worse fill with the stop than I would have by just selling at the open.

As far as which is best all depends on which way the market and your stock is headed when you sell.

Either way ,very excited at the potential here. Big thanks to Kevin for his work.



jkinghome
7 posts
msg #101146
Ignore jkinghome
6/9/2011 8:55:28 PM

Hi all, I am new to SF and loving it.

I am also paper trading this system.

I must say that as a newbie, and going through most of the historical forum posts, I have learned more from Kevin's posts than anyone. Kevin's posts ard filters are well thought out and very well communicated to the readers. Some of the posts here are just so cryptic! Thank you for helping the SF community, Kevin!

I am looking forward to this strategy.

Kevin, I have just joined Stratasearch as well. I am having problems trying to get the custom forumla to work. But I will try some other ways.

Jacqueline

StockFetcher Forums · Filter Exchange · HOW TO DESIGN A SYSTEM (NOT JUST A FILTER)<< 1 2 3 4 5 ... 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.