StockFetcher Forums · Filter Exchange · Help requested for shorting filter<< 1 2 3 4 >>Post Follow-up
cegis
235 posts
msg #32738
Ignore cegis
8/2/2004 9:14:52 AM

Rob,

I'm glad you found my post helpful. I'm also pleased that you took it in the constructive manner in which it was intended. (That can be an issue with a medium like postings and e-mail...)

If you'll induldge me, let me make a few more observations:

- True, the test can use any value from 0.01 to 5.00 (not 1.00 <g>) and still filter out *some* stocks. However, since "z" is always going to be an integer, every value between 0.01 and 1.00 will produce the same results, as will every value between 1.01 and 2.00, and so on (adding 1 to both values).

- Re your comment "the lower the volume, the better the filter is going to be": Something you may wish to add to the filter is "set{ratio,volume / average volume(90)} add column ratio sort column 5", which will compute *how low* the volume was compared to the average, and sort the list by lowest ratio first. (The column number may change if you have other "add column"s in your filter, but you didn't show any.) Now, your "best" stocks (based on volume) will be listed first!

HTH (That's "hope this helps", not my name <G>),

C


robdavis
69 posts
msg #32749
Ignore robdavis
8/2/2004 11:27:08 PM

C,

I've used and implemented many of your good ideas (and a few good ideas from others). After many modifications, well, this is how the shorting filter looks at the moment. I feel it has improved, and is pretty good right now, but still could use some improvement. What do you think?

----- Filter starts -----

Show stocks where

/*PRICE AND VOLUME*/
close is between __ and __
and volume is above ______
and average volume(90) is above ______
and volume 30 day low is greater than ______

/*WANTED: STEADILY RISING PRICE*/
and close has been increasing over the last 3 days

/*PRICE SHOULD HIT THE UBB*/
and high is above upper bollinger band(20)

/*ATTITUDE QD SHOULD BE POSITIVE*/
and count(close below open, 3) is below 2.1

/*WANTED: LOW-LOW VOLUME*/
and set {v, average volume(90)*0.8}
and set {x, count(volume above volume 1 day ago, 1) * 2}
and set {y, count(volume above v, 3)}
and set {z, x + y}
and z is below 1

/*SORT BY RELATIVE VOLUME*/
and set{RelativeVolume, volume / average volume(90)}
and add column RelativeVolume sort column 5

/*7/30/04: Z USED TO BE BELOW 1.1, NOT BELOW 1*/
/*7/31/04: V IS A NEW VARIABLE, USED TO BE AVGE.VOL(90), NOT 0.8 * AVGE.VOL(90)*/
/*8/1/04: ADDED 30-DAY VOLUME*/
/*8/2/04: ADDED SORTING BY RELATIVE VOLUME*/

---- End of filter --

And C, sorry about the HTH.

I hope this helps.

Rob


cegis
235 posts
msg #32751
Ignore cegis
8/3/2004 9:18:49 AM

Rob,

I can't say I'm any kind of expert at short filters, but here are my thoughts:

- Not being familure with short setups, it looks pretty good. Might some additional tests, or at least display of data (add column), help in making picks? (Really guessing here:) Maybe BB width? Maybe high RSI (RumpledOne's favorite)? Maybe different length for BB? Other??? Maybe adding some columns, then using the technique that I posted in the thread "Backtesting" in General Discussion to see returns, you might find some correlation to improve filter quality.

- IMHO, the three volume checks is a bit overkill, but I guess it gives readers some ideas as to which they might want to choose.

- If you put a filter between "
Fetcher[" and "]

", it will become a hot link that readers can click on to run the filter. However, there are instances where this doesn't work: use of ">" or "<" (need to spell these out), and (I think) the use of comments (/* */)...

- No biggie on the HTH vs C! I am **terrible** at remembering people's names, so I cut others a **whole lot** of slack when it comes to mine!

HTH,

C


dducey
19 posts
msg #32758
Ignore dducey
8/3/2004 7:50:11 PM

Try this one on for size:
Fetcher[Show stocks where the rsi(2) above 99 and StochRSI(10) equal 1 and close is above upper bollinger band(20) and Average Volume(90) is above 100000 and close is above 5]




robdavis
69 posts
msg #32759
Ignore robdavis
8/3/2004 8:09:48 PM

C,

Using your fetcher[] idea -- hey, great idea! -- I'm posting another shorting filter; this one should work just as well... or maybe even better than the previous one (I posted):

Fetcher[Show stocks where

/*PRICE AND VOLUME*/
close is between 1 and 250
and volume is above 100000
and average volume(90) is above 100000
and volume 30 day low is greater than 100000

/*WANTED: STEADILY RISING PRICE*/
and close has been increasing over the last 3 days

/*PRICE SHOULD HIT THE UBB*/
and close is above upper bollinger band(20)

/*ATTITUDE QD SHOULD BE POSITIVE*/
and count(close below open, 3) is below 2.1

/*WANTED: HIGH VOLUME*/
and set {v, average volume(90)* 1.2}
and set {x, count(volume above volume 1 day ago, 1) * 2}
and set {y, count(volume above v, 3)}
and set {z, x + y}
and z is above 4.9
and z 1 day ago is above 4.9

/*SORT BY RELATIVE VOLUME*/
and set{RelativeVolume, volume / average volume(90)}
and add column RelativeVolume sort column 5

/*WANTED: HIGHEST RELATIVE VOLUME*/
and RelativeVolume is above 2.5

/*7/30/04: Z USED TO BE BELOW 1.1, NOT BELOW 1*/
/*7/31/04: V USED TO BE AVGE.VOL(90), NOT 0.8 * AVGE.VOL(90)*/
/*8/1/04: ADDED 30-DAY VOLUME, TOO*/
/*8/2/04: ADDED SORTING BY RELATIVE VOLUME*/
/*6/3/04: CHANGED Z TO 4.9, I.E. TO HIGH VOLUME*/
/*8/3/04: V IS NOW AVGE.VOL(90)*1.2, NOT AVGE.VOL(90)*/
/*8/3/04: ADDED "and RelativeVolume is above 2.5"*/
/*8/3/04: UBB: CHANGED HIGH TO CLOSE*/
]



Click on it... enjoy it.

I hope this helps you, as well as helps many other guys who read this post. Any comments? I do welcome your comments.

Rob



cegis
235 posts
msg #32766
Ignore cegis
8/4/2004 9:42:15 AM

Rob,

I haven't looked at the filter results, yet, but here are a few thoughts/observations:

- One of the things I don't like about filters is that some very good stocks get filtered out because they're close to, but not quite matching, a restriction. You might want to consider changing "sort column 5" to "sort column 5 descending", and then (possibly) eliminating the "RelativeVolume is above 2.5" from the filter (or lowering the threshhold). That way, you can see stocks that are "close" and decide for yourself if they might be a good short.

- Obviously, I was wrong about comments deactivating the Fetcher[] link. Good to know! Thanks...

- Why did you change the volume test from being low volume to high volume? I thought (and perhaps incorrectly, so please correct me if I'm wrong) high volume usually indicated follow-through, and low volume indicated reversals.

C


robdavis
69 posts
msg #32770
Ignore robdavis
8/4/2004 1:17:12 PM

C,

You're right about the fact that some very good stocks get filtered out because they're close to, but not quite matching, a restriction.

I changed "sort column 5" to "sort column 5 descending". And, I eliminated the "RelativeVolume is above 2.5", and this way, we might be able to see stocks that are "close". And now we can decide for ourselves if the stock might be a good short.

Yes, it is good to know that comments do not deactivate the Fetcher[] link. You're welcome.

Why did I change the volume test from being low volume to high volume? Good question! I did some back testing, and back testing indicated to me this relationship (i.e. low volume usually indicated reversals) was indeed true. I also believed high volume usually resulted in follow-through, and low volume usually indicated reversals.

But, upon more back testing, I found that surprisingly the other extreme (as to the volume) also worked! I.e. high volume also indicated reversals. And, what's more, I was surprised to observe that, over and over, how often high volume produced reversals even more predictably. Now, this has become a challenge. This is a set of condition that needs some more serious back testing.

Guys, we need to do some serious back testing. Guys, everyone who reads this, if you have a bit of time, help us out with back testing! Why? Because you, too, might benefit! In the next 12 months the market is likely to decline somewhat, thanks to interest rate hikes by the Fed. Interest rate hikes are very likely. Therefore, in the next 12 months, shorting filters are going to be highly useful. Do some back testing today, and you, too, will benefit!

Here's the improved shorting filter with all the above changes.

Test it, back test it, and enjoy the experience!

Fetcher[Show stocks where

/*PRICE AND VOLUME*/
close is between 1 and 250
and volume is above 100000
and average volume(90) is above 100000
and volume 30 day low is greater than 100000

/*WANTED: STEADILY RISING PRICE*/
and close has been increasing over the last 3 days

/*PRICE SHOULD HIT THE UBB*/
and close is above upper bollinger band(20)

/*ATTITUDE QD SHOULD BE POSITIVE*/
and count(close below open, 3) is below 2.1

/*WANTED: HIGH VOLUME*/
and set {v, average volume(90)* 1.2}
and set {x, count(volume above volume 1 day ago, 1) * 2}
and set {y, count(volume above v, 3)}
and set {z, x + y}
and z is above 4.9
and z 1 day ago is above 4.9

/*SORT BY RELATIVE VOLUME*/
and set{RelativeVolume, volume / average volume(90)}
and add column RelativeVolume sort column 5 descending

/*7/30/04: Z USED TO BE BELOW 1.1, NOT BELOW 1*/
/*7/31/04: V USED TO BE AVGE.VOL(90), NOT 0.8 * AVGE.VOL(90)*/
/*8/1/04: ADDED 30-DAY VOLUME, TOO*/
/*8/2/04: ADDED SORTING BY RELATIVE VOLUME*/
/*6/3/04: CHANGED Z TO 4.9, I.E. TO HIGH VOLUME*/
/*8/3/04: V IS NOW AVGE.VOL(90)*1.2, NOT AVGE.VOL(90)*/
/*8/3/04: ADDED "and RelativeVolume is above 2.5"*/
/*8/3/04: UBB: CHANGED HIGH TO CLOSE*/
/*8/4/04: DELETED "and RelativeVolume is above 2.5"*/
/*8/4/04: ADDED THE WORD "descending"*/
]




I hope this helps.

Rob



cegis
235 posts
msg #32771
Ignore cegis
8/4/2004 4:07:07 PM

Rob (et al),

Perhaps this will help with the backtesting:

Fetcher[
Show stocks where

/*PRICE AND VOLUME*/
close 25 days ago is between 5 and 250
and volume 25 days ago is above 100000
and average volume(90) 25 days ago is above 100000
and volume 30 day low 25 days ago is greater than 100000

/*WANTED: STEADILY RISING PRICE*/
and close 25 days ago has been increasing over the last 3 days

/*PRICE SHOULD HIT THE UBB*/
and close 25 days ago is above upper bollinger band(20) 25 days ago

/*ATTITUDE QD SHOULD BE POSITIVE*/
and count(close 25 days ago below open 25 days ago, 3) is below 2.1

set{RelativeVolume, average volume(3) 25 days ago / average volume(90) 25 days ago}

/* Only pick very high or very low volume stocks */
set{HighVol,count(RelativeVolume is greater than 1.25,1)}
set{LowVol,count(RelativeVolume is less than 0.75,1)}
set{VolLimit, HighVol + LowVol}

and VolLimit equals 1

set{rtn3, close 22 days ago - close 25 days ago}
set{rtn5, close 20 days ago - close 25 days ago}
set{rtn10, close 15 days ago - close 25 days ago}
set{rtn15, close 10 days ago - close 25 days ago}
set{rtn20, close 5 days ago - close 25 days ago}
set{rtn25, close - close 25 days ago}

set{HVrtn3, HighVol * rtn3}
set{HVrtn5, HighVol * rtn5}
set{HVrtn10, HighVol * rtn10}
set{HVrtn15, HighVol * rtn15}
set{HVrtn20, HighVol * rtn20}
set{HVrtn25, HighVol * rtn25}

set{LVrtn3, LowVol * rtn3}
set{LVrtn5, LowVol * rtn5}
set{LVrtn10, LowVol * rtn10}
set{LVrtn15, LowVol * rtn15}
set{LVrtn20, LowVol * rtn20}
set{LVrtn25, LowVol * rtn25}

add column close 25 days ago
add column RelativeVolume

add column HVrtn3
add column HVrtn5
add column HVrtn10
add column HVrtn15
add column HVrtn20
add column HVrtn25

add column LVrtn3
add column LVrtn5
add column LVrtn10
add column LVrtn15
add column LVrtn20
add column LVrtn25

/*7/30/04: Z USED TO BE BELOW 1.1, NOT BELOW 1*/
/*7/31/04: V USED TO BE AVGE.VOL(90), NOT 0.8 * AVGE.VOL(90)*/
/*8/1/04: ADDED 30-DAY VOLUME, TOO*/
/*8/2/04: ADDED SORTING BY RELATIVE VOLUME*/
/*6/3/04: CHANGED Z TO 4.9, I.E. TO HIGH VOLUME*/
/*8/3/04: V IS NOW AVGE.VOL(90)*1.2, NOT AVGE.VOL(90)*/
/*8/3/04: ADDED and RelativeVolume is above 2.5"*/
/*8/3/04: UBB: CHANGED HIGH TO CLOSE*/
/*8/4/04: DELETED "and RelativeVolume is above 2.5"*/
/*8/4/04: ADDED THE WORD "descending"*/
/*8/4/04: Changed into a backtesting filter (25 days ago)*/
/* added performance calcs, removed sort/select by volume*/
/* and changed relative volume calc to use avg vol(3)*/
]



What I did was add "25 days ago" to all of the indicators used for selection. This is the equivalent of using "offset 25 days", except, with this technique, I have "future" day's data available to me (24 days ago, 23 days...)!

Before I get into how this aids in backtesting, I should mention other pertainent changes to the filter:

- I decided to use average volume(3) instead of just volume in the calc of relative volume, in the hopes that it indicates a more sustained spike in volume. We may want to remove this change....

- I also changed it to filter based on EITHER very high OR very low volume. For this, I changed the limit to +/-25%, as opposed to the previous filter's 20%. I just figured it would be more restrictive, and therefore, hopefully "better". Again, change to suit your needs...

Back to the backtesting. I added calculations of the 3, 5, 10, 15, 20, and 25 day returns (as $, not %, so as not to hit the SF nesting limit; I didn't even try to get the %...). These returns are NEGATIVE if the stock went DOWN for the period, which is what we're looking for. I further segregated this into high volume returns (HVrtn_ variables) and low volume returns (LVrtn_ variables) that are shown in the results table, so it's immediately obvious which selection caused the match. This should make it easier to discern if either volume extreme is better performing than the other.

A quick look at some backtest dates shows this works pretty well!

HTH,

C



robdavis
69 posts
msg #32780
Ignore robdavis
8/5/2004 2:56:38 PM

C,

Great! With your help, I feel we are getting somewhere! This (combination of) shorting filter (and back testing) is getting better! I do like your ideas of +/-25%, either/or option, and HV and LV returns. But, how about doing some reverse sorting for RelativeVolume?

Rob


cegis
235 posts
msg #32782
Ignore cegis
8/6/2004 9:07:13 AM

Rob,

Glad you liked the changes<g>!

Not positive what you mean by "reverse sorting"... Just add "sort column 6 descending" if you want the results sorted by descending Rel Vol.

What do you think about using average volume(3) instead of just yeaterday's volume?

Another possibility would be to remove any HUGE volume spikes from the average volume(3) before computing the relative volume. I posted a while back on how to do this. The title was something like "Technique: Removing spikes from averages" or some such. The idea is to get rid of (generally news indiced) huge (2x or more, eg) one-day spikes in volume to get a better "underlying picture" of the volume action. Do you think it's worth looking into?

C


StockFetcher Forums · Filter Exchange · Help requested for shorting filter<< 1 2 3 4 >>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.