StockFetcher Forums · Filter Exchange · HOW TO DESIGN A SYSTEM (NOT JUST A FILTER)<< 1 ... 4 5 6 7 8 ... 43 >>Post Follow-up
fortyfour
189 posts
msg #101243
Ignore fortyfour
modified
6/14/2011 2:51:54 AM

Tradeoff........ Maybe this (or any other ?) "market weakness" test wouldnt kill the performace
by too much.......reduce drawdowns......maintain a decent sharpe ratio and allow
more individuals (with lower risk tolerances) to trade the system at all times.

There is an area where the market is weak (walking lower bb's) yet leaders have a long way to fall to ma(200)..
that may produce many consecutive losses? or ... Maybe not. I know it hurts equity but I dont know how well
it reduces drawdown...



Fetcher[symlist(spy)
set{c1, count( roc(3) < cema(roc(3),13),1)}
set{c2, count( williams %r(20) < -70,1)}
set{csum, c1 * c2}
set{SPYtest, ind(SPY,csum) }
spytest < 1
SPYtest below .5 /*below 1 means market ok to trade*/
draw c0
draw williams %r(20)
draw roc(3)
]



PS: Try this::: user Stockfetchers backtester for Kevins filter from 5/15/2008 - 7/15/2008 ( Downtrend where SP500 lost
about 4%) . The system made about $3000 on an initial 100K during that 2 month period. That is indeeed surprising !
Make a filter of just "symlist(spy)" and use HISTORICAL to look at that period before the meltdown.
I



shainadir
25 posts
msg #101246
Ignore shainadir
6/14/2011 1:48:10 PM

Kevin,

Great work by the way.

Not sure if this is considered curve fitting, but using the highest correlation instead of lowest z-score in my backtests on stockfetcher have been producing slightly better equity results. I use the statement, select by corr(^spx,10,Close) descending" for the selection method. Can anyone test this on Stratasearch? Thanks.

Kevin_in_GA
4,599 posts
msg #101247
Ignore Kevin_in_GA
6/14/2011 4:24:25 PM

shainadir:

I can check this tonight. Odds are that the differences will be small over the 10 year period tested.

I cannot use StrataSearch to put together a pair trade for these stocks (with SH as the other half). It's not really set up to do that type of analysis. Obviously that strategy would be useful, but would probably result in a lower overall profit since much of the time the market went up (slowly) versus down (rapidly).

novacane32000
331 posts
msg #101260
Ignore novacane32000
6/15/2011 7:27:09 PM

Does anyone know what the time delay is on the SF filters?

At 4:40 pm the Zscore filter showed 6 or 7 stocks. Now at 7:20pm it only shows 3 ??

Same with the exit filter. None at 4:40pm ,at 7:20 pm it shows one.

duke56468
683 posts
msg #101261
Ignore duke56468
6/15/2011 8:17:29 PM

- Ignore novacane32000 6/15/2011 7:27:09 PM
Does anyone know what the time delay is on the SF filters?
++++++++++++++++++++++++++++++++++++++++
SF offers 2 e-mail times 6PM and 9PM(to allow for corrections and final data)

saico
59 posts
msg #101300
Ignore saico
6/20/2011 3:00:39 PM

Hi Kevin,

first of all thanks for the great work! I wonder if its possible to imply to the exit filter a code that gives an exit signal after the 20 days maximum holding time passed by?

saico

Kevin_in_GA
4,599 posts
msg #101302
Ignore Kevin_in_GA
6/20/2011 7:47:18 PM

Saico:

Unfortunately this cannot be done in SF. You would have to track this manually.

Kevin

lvainik
52 posts
msg #101304
Ignore lvainik
6/21/2011 11:02:03 AM

Kevin:

I had a question

could you email me at TWEETss (at)dashover.com

Thanks!



duke56468
683 posts
msg #101305
Ignore duke56468
modified
6/21/2011 5:04:07 PM

Backtesting seemed to show less success in an up trending market than in a down trending one, for Kevins original filter so I tried this SHORT version. It seems to work for SHORTs with some modification (removed w%r). Any thoughts?

(edit AFTER FURTHER BACKTESTING IT DIDN'T WORK AS WELL)
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)
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 DESCENDING
CHART-TIME IS 6 MONTHS
]



Kevin_in_GA
4,599 posts
msg #101333
Ignore Kevin_in_GA
6/23/2011 9:42:36 PM

Update on this filter performance - I backtested from 2/23/11 through today's close. All positions closed at the end of the backtest.

Here is this week's performance:

06/20/11
06/20/11 sold (Trigger #) 474.73 shares ($11312.81) of CBG at 23.83 for a loss of $47.47
06/20/11 bought 152.54 shares ($11266.63) of CTXS at 73.86, remaining cash: $67599.78
06/20/11 bought 46.58 shares ($11266.63) of NFLX at 241.86, remaining cash: $56333.15
Transaction Summary
Daily Losses : $47.47
Running Gain/(Loss) : $13027.06
# Stocks held at end of day : 5

Summary
Invested In Stock: $56693.91
Market Value of Stock: $56310.76
Market Value - Invested: - $383.16
Available Cash: $56333.15
Total (Cash + Market): $112643.91



--------------------------------------------------------------------------------

06/21/11
No Transactions
Transaction Summary
Running Gain/(Loss) : $13027.06
# Stocks held at end of day : 5

Summary
Invested In Stock: $56693.91
Market Value of Stock: $58147.13
Market Value - Invested: $1453.22
Available Cash: $56333.15
Total (Cash + Market): $114480.28



--------------------------------------------------------------------------------

06/22/11
06/22/11 sold (Trigger #) 260.89 shares ($11450.53) of ALTR at 43.89 for a gain of $10.44
06/22/11 sold (Trigger #) 406.01 shares ($11632.31) of IP at 28.65 for a gain of $272.03
Transaction Summary
Daily Gains : $282.47
Running Gain/(Loss) : $13309.53
# Stocks held at end of day : 3

Summary
Invested In Stock: $33893.54
Market Value of Stock: $34662.79
Market Value - Invested: $769.25
Available Cash: $79415.99
Total (Cash + Market): $114078.78



--------------------------------------------------------------------------------

06/23/11
06/23/11 bought 159.41 shares ($11345.14) of BA at 71.17, remaining cash: $68070.85
06/23/11 sold (Trigger #) 395.69 shares ($11312.80) of CHK at 28.59 for a loss of $47.48
06/23/11 sold 152.54 shares ($11768.49) of CTXS at 77.15 for a gain of $501.86
06/23/11 sold 46.58 shares ($11912.27) of NFLX at 255.72 for a gain of $645.64
06/23/11 sold 159.41 shares ($11357.89) of BA at 71.25 for a gain of $12.75
Transaction Summary
Daily Gains : $1160.25
Daily Losses : $47.48
Running Gain/(Loss) : $14422.30
# Stocks held at end of day : 0

Summary
Invested In Stock: $-0.00
Market Value of Stock: $0.00
Market Value - Invested: $0.00
Available Cash: $114422.30
Total (Cash + Market): $114422.30

Net gain over the last 4 months was +14.4% (unfortunately SF does not take out commission costs - at $8.95 per trade the commission costs were $2183.80, so the actual gain was more like 12.2%).

There were 122 total stocks entered. Of those, 122 or 100.00% were complete and or 0.00% were open.
Of the 122 completed trades, 78 trades or 63.93% resulted in a net gain.
Your average net change for completed trades was: 1.12%.
The average draw down of your approach was: -2.76%.
The average max profit of your approach was: 2.82%
The Reward/Risk ratio for this approach is: 2.65
Annualized Return on Investment (ROI): 55.97%, the ROI of ^SPX was: -7.14%.


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