StockFetcher Forums · Filter Exchange · HOW TO DESIGN A SYSTEM (NOT JUST A FILTER)<< 1 ... 15 16 17 18 19 ... 43 >>Post Follow-up
mahkoh
1,065 posts
msg #102039
Ignore mahkoh
modified
8/6/2011 3:49:23 PM

Thanks for the note on SPY- SPX, Kevin. It does indeed make a difference when checking intraday.

I have, like Duke earlier, been looking at an inverse version for short.

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 above 2
CLOSE above upper BOLLINGER BAND(16,2)

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)

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

SORT ON COLUMN 5 deSCENDING
CHART-TIME IS 6 MONTHS


close below ma(200)
]



and exit at when zscore is below 1

Like Duke I let go of Williams %R as it did not seem to do this short version any good.

This performs excellent when the market is in selloff mode but horrible otherwise.
In order to formulate "selloff mode" I looked at the 50 SMA of SPY.
In general, when SPY is below the 50 SMA and the slope of this trendline has turned down this short version gives quite remarkable results.

It needs further backtesting for optimization but it might be something worth looking at.

cracken
2 posts
msg #102072
Ignore cracken
8/8/2011 10:26:54 AM

Kevin, I hope you are enjoying your vacation. I did look at adding a filter to keep out of this during a down market...(below 200 dma). As you know the S&P dropped below this last Monday as the carnage began.

set{spx,ind(^SPX, close)}
set{spxMA200, cema(spx,200)}
spx above spxMA200

Another thought is the slope S&P for some shorter timeframe. This could be used to allow for only trading in an uptrend. Just some thoughts.

Now I am trying to decide if I should hold my positions in this selloff or get out of them. I have been putting on 5 to 8% stops but decided not to do that for this system recently. I have a few positions that are down 15-20%...

Long XIV...

Jeff

duke56468
683 posts
msg #102082
Ignore duke56468
8/8/2011 11:50:13 AM

cracken... The backtests that I did showed that a 10% stop loss did not hurt results much during most tiime frames and does add peace of mind.

fortyfour
189 posts
msg #102316
Ignore fortyfour
8/17/2011 8:06:31 PM

To those using stratasearch ( and possibly new at it like myself)....
I have begun to learn how to set up a search for sector and market tests
that may help kevins strategy in bad markets...
I have a search running on 465 of the sp500 stocks from 1/1/2007 to present
and will focus on the 2008 and APR29 2011 to present for improvement.

Here is how..

Run Kevins strategy then "right click" the results of the run and
select "make trading rule"...and name it "Kevin".
Select "Setup" and select "Autosearch" and "ADD" to create a new autosearch.
Name it "Kevin's entry rules as the only PRIMARY trading rule and Kevins Exit rulses as the only Primary exit rule"
Select the tab for primary trading rules and make all rules "NEVER"
Then scroll down and select the trading rule "Kevin" as "ALWAYS"
Repeat for the Primary exit rule.(setting Kevin to the only allowed primary exit rule)
Set all supporting entry and exit rules to "Random"

Run the autosearch on your target dates and sector....
I allow for 2 supporting entry and exit conditions( 1 is default)

jackmack
334 posts
msg #102320
Ignore jackmack
8/18/2011 8:31:24 AM

Fourtyfour
I am so new to this - any way to make this selectable by adding fetcher?
Thank you
Also - I am waiting to see if Kevin is able to notify us of the most current
"correct" scan (I love his work) since this has gone through many changes.
Let me know
Thank you
jackmack

Kevin_in_GA
4,599 posts
msg #102363
Ignore Kevin_in_GA
8/19/2011 7:43:05 AM

jackmack:

In this thread, the only filter I have used is found in the first post. While others have looked at variations, the best performer to date has been the original version. You are likely thinking about the 401k filter thread. I have posted the filter I personally use for this, now slightly modified to add in a rank column (see the recent thread i posted called "ANY THOUGHTS ON WHY THIS ISN'T WORKING?").

FortyFour: Saw your recent posts on the SS - glad to see others using this software, as it is quite powerful. I might suggest that you use the z-score as the primary trading rule, and allow SS to find other indicator combos that could be better. Do not necessarily get locked into what I have done already, because you do not want to overfit the data (and make sure that you use a time window that has both bull and bear periods, and leave several years afterwards for OOS test validation). I liked 12/31/1999 until 12/31/2009 since it covered two recessions and two strong recoveries. It is important for and all-long strategy to maintain a high Sharpe ratio during these times (if possible ...)

Kevin


ray0817
1 posts
msg #102529
Ignore ray0817
9/2/2011 7:39:38 AM

When I run this "system scan" nothing ever shows up. What am I missing?

duke56468
683 posts
msg #102530
Ignore duke56468
9/2/2011 8:46:39 AM

Market conditions determine that. Run the scan and offset one month and you will find results.

Kevin_in_GA
4,599 posts
msg #102531
Ignore Kevin_in_GA
9/2/2011 12:23:29 PM

Duke is correct - the last trade was BIIB (BUY on 8/10, when it closed at 85.03, and SOLD 2 days later at 90.98).

Right now no stocks are meeting the requirements, in many cases because of the "close above MA(200)" criterion.

Kevin_in_GA
4,599 posts
msg #102640
Ignore Kevin_in_GA
9/20/2011 9:12:49 PM

Finally a new BUY signal from the Z-score filter.

CF Industry Holdings (CF).

StockFetcher Forums · Filter Exchange · HOW TO DESIGN A SYSTEM (NOT JUST A FILTER)<< 1 ... 15 16 17 18 19 ... 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 2022 - 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.