StockFetcher Forums · Filter Exchange · HOW TO DESIGN A SYSTEM (NOT JUST A FILTER)<< 1 2 3 4 5 ... 43 >>Post Follow-up
novacane32000
273 posts
msg #101078
Ignore novacane32000
modified
6/4/2011 11:07:35 PM

OK,Thanks for explain that. It seems to be the magic exit point.

I tried exits after 4 days ,5 days and 10 days.

Also used RSI(6) > 60 and >70 as exits.

All had very good results beating the market during 2 year stretches going back from 2000 to present day but none were as good as your zscore exit.

My results using your exit filter were actually better for the last 4 months than what you posted !!

I used a 10% stop loss which was only triggered twice.
Max trades /day = 2
Max open positions = 7

Trade Statistics
There were 77 total stocks entered. Of those, 70 or 90.91% were complete and 7 or 9.09% were open.
Of the 70 completed trades, 51 trades or 72.86%resulted in a net gain.
Your average net change for completed trades was: 1.54%.
The average draw down of your approach was: -2.88%.
The average max profit of your approach was: 3.29%
The Reward/Risk ratio for this approach is: 3.32
Annualized Return on Investment (ROI): 76.50%, the ROI of ^SPX was: 2.48%.


Gain for the portfolio over the 4 months was 12.81%

I will continue checking different time periods but this looks like a winner .

seanban
22 posts
msg #101079
Ignore seanban
6/5/2011 6:45:53 AM

Kevin,
Would like to paper trade this approach as of June 6th. with the limitations applied in your back testing. Am I correct in assuming the following:

- initial capital - $100K
- max 10 open trades
- filter run daily if less than 10 open positions
- select stocks with highest z-score

With these assumptions, here is the list on the Monday buy list:

FMC
LEG
AMD
SAI
SWY
SNA
PKI
ESRX
TER


Thanks again for your many contributions.

Sean

Kevin_in_GA
4,553 posts
msg #101080
Ignore Kevin_in_GA
6/5/2011 8:39:22 AM

LOWEST Zscore - remember that these are long plays, and that they need to be BELOW the normal relationship with the SPX. Think Bollinger Bands.

Rick67
64 posts
msg #101082
Ignore Rick67
6/5/2011 10:15:56 AM

Great work Kevin...

RE: "So in a single massive optimization"

You have a very smooth equity line over a long period of time which is always a great sign.

Just want to throw this out there:

Optimization can be a trap since your are "curve fitting". It looks great on paper, but next month, the market's "curve" could be different and your system could fail.

Have you tried doing walk forward testing? Or testing different periods over the past as opposed to one large period?

I do appreciate your postings and like to follow what you do!!





seanban
22 posts
msg #101083
Ignore seanban
6/5/2011 12:05:32 PM

Kevin,
If your filter run example, you posted the results returned last Friday and selected just 3 stocks: AMD, SWY and DD. Is there some reason that the other 11 were not seleted?

Thanks - Sean

Kevin_in_GA
4,553 posts
msg #101085
Ignore Kevin_in_GA
modified
6/5/2011 12:36:21 PM

Rick:

Of course. Notice that I used the period from 12/31/1999 until 12/31/2009? That was so that I could use 1/1/2010 until today as my walk forward period. The goal is not so much to beat the market by the same percentage, but to keep a high Sharpe ratio and profitability.

For the period 12/31/2009 until 5/31/2011 the system gave a CAGR of 16.14% versus 14.6% for the ^SPX, a return on starting equity of 23.6%, and a Sharpe ratio of 1.56 (annualized). Average days held was 5, average return per trade was lower (0.62%, not nearly as good). However, you were only in the market an average of 53.40%, so your money was sitting safely in cash (or out of play, depending on your mindset).

Now one of the nice things about Stratasearch is that it can automatically update the filter as time moves forward to give you the "current" best settings, based on whatever look back period you choose. This keeps the filter updated for the most profitable settings as time progresses. Over the last 2 year look back period, the optimal settings have moved a bit ( now are at 15 days, -2 entry to 0 exit, williams %R(15) > -89, close above ma(150)).

This is an interesting capability (having your filter adapt and update, say every month). I have not used it or backtested to see if doing so would have been a better approach. I'm just not sure that this isn't curve fitting carried to the next level.

Kevin_in_GA
4,553 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,553 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
273 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

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 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