StockFetcher Forums · General Discussion · Does this exist??<< 1 2 >>Post Follow-up
duke56468
683 posts
msg #104389
Ignore duke56468
1/14/2012 9:44:57 AM

Kevin...Did you get this to work? I have a program that I think will test this back 12 months at 5 min bars. Not sure it will get exactly what you want in the histogram.

Also is there a syntax that will get "Market is 2x ETF" in SF?

miketranz
956 posts
msg #104400
Ignore miketranz
1/14/2012 4:57:01 PM

Run a basic program off the SPY.Go back 1 year.Appx. 85% of all stocks traded will run in sync with this index.The other 15% will either be diverging up or down from it.I'll almost guarantee you that if you could buy in at some kind of 10,30,or 90 day low reversal,hold till it hits a 10,30,or 90 day high,you will out perform the SPY,most money managers,investment advisers,even Cramer.It's so basic of a system,it's ignored by most.The reasoning behind it is,you're buying the lows out,when everyone else is "selling out".You're buying into negative hype,bad news.Most investors aren't emotionally prepared or market conditioned to put on a trade in total contradiction.That's why they're always losing money,buying the good news,highs out,then turning around and selling out at the lows.I'm not talking about catching a falling knife.That's a fools game.It has to be set up with some kind trend reversal,coupled with strict money management.Another good idea is to set up a system the finds stock diverging the SPY,on the up side,for a long side trade,that would be another money maker.Very interested to see what you can come up with on this one.Hope it's not to "basic" for everyone...

fortyfour
189 posts
msg #104401
Ignore fortyfour
1/14/2012 5:32:32 PM

" if you could buy in at some kind of 10,30,or 90 day low reversal,hold till it hits a 10,30,or 90 day high"

Stockfetcher and stratasearch reject the above enty and exit conditions.....and I am not happy with this.
I have e-mailed both parties and futher requested that they accept " buy low and sell high" as input/output
conditions.



BarTune1
441 posts
msg #104402
Ignore BarTune1
modified
1/14/2012 5:54:58 PM

Kevin had a filter that measured SP500 stocks that were divergent from the SPY's mean. We were looking at potential pair trades. I ended up deleting the filter - he probably still has it. What wasn't in it - as Mike suggests is necessary - is something that would have indicated/confirmed a trend reversal. There were some really good results with the orginal filter but some horrible results too.

I'm not exactly how you prefer to confirm trend reversal .... but I have done so in the past by filtering on a change of either a positive or negative slope as the case may be on a MACD fast/slow line .... (i.e., slope > 0 would confirm an uptrend).

SAFeTRADE
630 posts
msg #104403
Ignore SAFeTRADE
1/14/2012 7:53:06 PM

Check out this filter based on Kevin's work. I made a few adjustments. It may be what you are talking about.
It does not hit very often but look for the days with many hits. For instance: 11/25, 11/23/, 11/22, 11/21, 11/17,
10/03, 9/22, 8/19. There are some days with a few hits maybe 3 or 4 etc. The days with big I think are the key
and look at Since%. The hits correspond to 10 and 20 day lows.


Fetcher[
/*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{SnP500, count(index equals s&p500,1)}
set{20low, count(low reached a new 20 day low in the last 1 day,5)}
set{10low, count(low reached a new 10 day low in the last 1 day,5)}

/* PRICE POSITION Display */

/* enter your Upper Limit criteria */
set{UpperLim , upper bollinger band(16)}

/* enter your Lower Limit criteria */
set{LowerLim , Lower bollinger band(16)}

set{ Dynamic_Range , UpperLim - LowerLim }
set{PPDiff, close minus LowerLim}
set{PPDiv, PPDiff / Dynamic_Range}
set{BallOn, PPDiv * 100}

set{box, count(ballon < 25,1) + count(williams %R(16) below -94,1)}
set{box2, count(zscore16 below -2,1) + count(close above MA(200),1)}
set{trigger, box + box2}
add column box
add column box2

close > 3
volume > 100000
box equal to 2
zscore16 > 0
snp500 > 0

draw ballon line at 25
draw Williams %R(14) line at -75
Draw bollinger bands(16,2)
ADD COLUMN ZSCORE16 {Z-score}
add column snp500
add column 20low
add column 10low

DRAW ZSCORE16 LINE AT -1
DRAW ZSCORE16 LINE AT -2
DRAW ZSCORE16 LINE AT 0
draw 20low on plot 10low
draw low 20day low
sort column 5 descending
]



BarTune1
441 posts
msg #104406
Ignore BarTune1
modified
1/15/2012 12:09:54 AM

Well, that wasn't the exact filter that I was thinking about. If you go back to 11/25, the "since(%)" looks impressive on some of the hits at first glance ..... however, the average gain is around 10.84%. At the same time, I have the SPY advancing approximately 11.26% since that date.

If you experiment with the exits, you will find that the filter you posted makes for a good mean reversion trade.

If you use a dynamic exit - which is what I use when I trade - say using an exit trigger only upon a "close above MA(10)" - you get very, very impressive results on a backtest through the last 4 months of 2011:

Test started on 08/31/2011 ended on 12/29/2011, covering 83 days

Trade Statistics
There were 105 total stocks entered. Of those, 105 or 100.00% were complete and or 0.00% were open.
Of the 105 completed trades, 103 trades or 98.10%resulted in a net gain.
Your average net change for completed trades was: 4.19%.
The average draw down of your approach was: -1.31%.
The average max profit of your approach was: 4.36%
The Reward/Risk ratio for this approach is: 37.78
Annualized Return on Investment (ROI): 316.51%, the ROI of ^SPX was: 12.27%.

Exit Statistics
Stop Loss was triggered 0 times or 0.00% of the time.
Stop Profit was triggered 0 times or 0.00% of the time.
Trailing Stop Loss was triggered 0 times or 0.00% of the time.
You held for the maximum period of time (0 days) 0 times or 0.00% of the time.
An exit trigger was executed 105 times or 100.00% of the time.


The results are not as impressive for the May - August period. However, the January - April period batted around a 87% win rate.


SAFeTRADE
630 posts
msg #104409
Ignore SAFeTRADE
modified
1/15/2012 9:24:04 AM

I don't know if this filter fits in this thread. I was thinking of this as a long term filter. Kevin mentioned 100 stocks.
I don't know if he means all at once or a basket do buy as conditions are met. There are about 120 stocks returned
on dates 11/22 thru 11/25. Some are duplicates. What I was thinking was buy all 120 at $500 a piece. based on
BarTune1 numbers I would be up about 6 Grand so far. I would still be in a majority of those stocks. My exit
would be a new 20 day low. I would be buying at the lows so my loss on those that hit a new 20 low shouldn't cause
a large drawdown. I would only buy when the hits are as large over the 3 days in November. Don't know if I have
enough balls to buy that large a stake in that many stocks. Just a thought on this filter, anyway. I was going to toss
this filter until I started going back and looking at the results.

I edited this message to add this thought. I could wait for another 2 or 3 day span when 100 or so stocks show up
on the screen and just buy the SPY. It is still up about 10% since the Nov 22 thru Nov 25 lows. Something to think
about anyway....

BarTune1
441 posts
msg #104410
Ignore BarTune1
1/15/2012 10:03:21 AM

Well, I would toss it as a long term filter ..... but have added it as a short-term filter .....

My trading style is short-term reversion to the mean. And, I can't argue with the backtest results .....

I have 3-5 main filters that trigger ever so often when the market is oversold or overbought ..... the filter you posted seems to be getting as good results as any (some of the other filters I have get similar results) ..... if there are too many picks on the few days a filter like this hits ..... I will usually choose particular plays based on liquidty and %change, normally investing 10K a play and no more than 5 plays a day ....

If you were concerned with risk, you could hedge your positions with a short position in the spy, or a 7 to 15% position in the VXX.

I have a number of really good filters with similar backtest results, but they dont hit very often. Thats because I usually have them written so that they wont trigger unless the overall market is very oversold or overbought as the case may be (as 80-85% of all stocks follow the market or are dragged up or down by overall market action).

I use about 3 measures to determine whether the market is overbought / oversold based on the VIX and RSI and some of the filters that Kevin has writtten based on previous discussions we have had on the topic (i.e., there is a VIX variance signal when the VIX <> 5 to 10% the 10dma for 3 days or more, the VIX BB(9,2) signal (i.e., you can set this with a B% <> 0 or 1) and a cumulative RSI signal that he wrote on the major indexes).




SAFeTRADE
630 posts
msg #104419
Ignore SAFeTRADE
1/15/2012 9:53:23 PM

BarTune1, I agree. When I say long term I mean about 20 days as compared to 4 or 5 days. I ran this
filter on the Dow 30, it found about 10 or 11 stocks. A more manageable number for sure. I set two exits
a 120 day high and or stop. The "stop" is the 20 day low + atr(20) *2. One could just let the stock run
until it craps out on the "stop". I am not sure though that this filter fits the theme of this thread so I will start a new one.

StockFetcher Forums · General Discussion · Does this exist??<< 1 2 >>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.