StockFetcher Forums · Filter Exchange · Relative Strength<< 1 2 >>Post Follow-up
macer
22 posts
msg #63627
Ignore macer
6/13/2008 12:44:09 PM

Niko and max,

In the musings & misgivings thread there was a conversation about relative strength not giving the full picture. Why not do something like:

Fetcher[
set{spx, ind(^spx,close)}
set{y, spx divided by spx 252 days ago}
set{z, close divided by close 252 days ago}
set{spxrs, z divided by y}

set{y1, spx divided by spx 126 days ago}
set{z1, close divided by close 126 days ago}
set{spxrs1, z1 divided by y1}

set{y2, spx divided by spx 63 days ago}
set{z2, close divided by close 63 days ago}
set{spxrs2, z2 divided by y2}

set{y3, spx divided by spx 21 days ago}
set{z3, close divided by close 21 days ago}
set{spxrs3, z3 divided by y3}

set{x1, spxrs + spxrs1}
set{x2, spxrs2 + spxrs3}
set{x3, x1 + x2}
set{ratio, x3 divided by 4}

draw ratio

add column ratio {1,3,6+12 month RS}
]



Is this a valid approach? What ya think?

(BTW I didnt want to post something slightly off subject so I started a new thread)

macer





nikoschopen
2,824 posts
msg #63631
Ignore nikoschopen
modified
6/13/2008 4:41:19 PM

Howdy,

Yes, ure method is a viable approach. As a matter of fact, it looks quite identical to Max's filter, only that you elected to include monthly, quarterly and bi-annual in addition to the yearly data. On that note, I think it's fair to say that Relative Strength is not limited to any one formula. There could be a myriad of possibilities to identify RS depending on how you define the term. For example, here's one RSI-esque calculation that I've used in my MAX filter, which measures the relative strength of the stock for the previous three months. Here, I have slightly revised it to reflect the "beta".

Fetcher[
set{%gain1mo, Slow Stochastic(22) Fast %K}
set{%gain2mo, %gain1mo 1 month ago}
set{%gain3mo, %gain1mo 2 months ago}
set{return1,%gain2mo + %gain3mo}
set{return2,return1 / 2}
set{return3,%gain1mo - return2}
set{return4,return3 * 0.6667}
set{return,return4 + return2}

set{spx, ind(^spx,return)}
set{betamax, return / spx}

draw spx on plot return
draw return line at 25
draw return line at 75
draw betamax line at 1
add column betamax{beta}
compare to ^spx
]



chetron
2,817 posts
msg #63636
Ignore chetron
6/13/2008 6:18:19 PM

for the basic folk.....

Fetcher[


set{%gain1mo, Slow Stochastic(22) Fast %K}
set{%gain2mo, %gain1mo 1 month ago}
set{%gain3mo, %gain1mo 2 months ago}
set{return1,%gain2mo + %gain3mo}
set{return2,return1 / 2}
set{return3,%gain1mo - return2}
set{return4,return3 * 0.6667}
set{return,return4 + return2}

set{spx, ind(^spx,return)}
set{betamax, return / spx}


draw spx
draw betamax
draw return

add column betamax{beta}


compare to ^spx

]



chetron
2,817 posts
msg #63637
Ignore chetron
modified
6/13/2008 6:25:59 PM

and this......


Fetcher[

set{vspx, ind(^spx,close)}
set{var1,vspx 252 day ago}
set{var2,vspx 126 day ago}
set{var3,vspx 63 day ago}
set{var4,vspx 21 day ago}

set{y, vspx / var1}
set{z, close / close 252 days ago}
set{spxrs, z / y}


set{y1, vspx / var2}
set{z1, close / close 126 days ago}
set{spxrs1, z1 / y1}

set{y2, vspx / var3}
set{z2, close / close 63 days ago}
set{spxrs2, z2 / y2}

set{y3, vspx / var4}
set{z3, close / close 21 days ago}
set{spxrs3, z3 / y3}

set{x1, spxrs + spxrs1}
set{x2, spxrs2 + spxrs3}
set{x3, x1 + x2}
set{ratio, x3 / 4}

draw ratio


add column ratio {1,3,6+12 month RS}
]




macer
22 posts
msg #63638
Ignore macer
6/13/2008 7:17:16 PM

Niko,

I tend to concentrate on longer term trading (roughly a month hold period per trade). I am going to try trading pairs of stocks from the same sector at opposite ends of the RS scale.

eg. (Using your filter)

From the Telecommunications sector

Buy PCTI - PC-Tel, Inc.
and
Sell IDT - IDT Corp

With equal exposure to each.

Am I right in thinking that this will reduce the impact of overall market conditions on my account? - as the high RS stock will outperform the low RS stock in a bull market and vice-versa .

I am thinking of using one of the above RS calculations for this idea - which do you think is best suited to this?

Can you suggest any optimal entry points - to catch a strongly trending stocks?

macer

nikoschopen
2,824 posts
msg #63644
Ignore nikoschopen
modified
6/13/2008 9:11:58 PM

Macer,

I suggest that you review the explanation I wrote on how the MAX filter should be used, which you can find here.

As to ure question about pair trading, this can easily be implemented with the MAX filter. For example, the following filter will allow you to screen for two stocks of the same sector with one exhibiting high RS and the other low RS over the prior 3 months. This is just a simple illustration of how the filter can be used. You can make it as complex as you please.

Fetcher[
set{%gain1mo, Slow Stochastic(22) Fast %K}
set{%gain2mo, %gain1mo 1 month ago}
set{%gain3mo, %gain1mo 2 months ago}
set{return1,%gain2mo + %gain3mo}
set{return2,return1 / 2}
set{return3,%gain1mo - return2}
set{return4,return3 * 0.6667}
set{return,return4 + return2}

set{spx, ind(^spx,return)}
set{betamax, return / spx}

set{strong, count(return crossed above 25,1) * 1}
set{weak, count(return crossed below 75,1) * -1}
set{both, strong + weak}
set{Xover, 1 - count(both equals 0,1)}
Xover above 0

apply to sector(Telecommunications)

add column separator
add column betamax{beta}
add column both{Buy (1) / Sell (-1)}
add column separator
add column sector
add column industry
add column separator

draw spx on plot return
draw return line at 25
draw return line at 75
draw betamax line at 1
do not draw Xover
compare to ^spx
]



slotmarket
59 posts
msg #63647
Ignore slotmarket
6/13/2008 9:41:11 PM

Niko,
The last filter returned 495 results with companies not in the telecom sector.
I don't know how to fix it or I would. It'll only take you a few seconds.
I'd love to see the filter in action.

springhill
74 posts
msg #63648
Ignore springhill
6/13/2008 10:29:06 PM

Slotmarket,

There is no "Telecommunications" Industry.

Change "Industry" in above filter to "Sector" and it only returns 14 symbols

See Link

http://www.stockfetcher.com/ui2/plugins/sector.php?full=1&mode=SECL

for a list of Sectors and then you can click on Industries at the top to view all the industires.



nikoschopen
2,824 posts
msg #63649
Ignore nikoschopen
6/13/2008 10:32:23 PM

sorry guys, mybad. I also noticed some other errors, which have since been fixed.

macer
22 posts
msg #63707
Ignore macer
6/15/2008 9:08:59 AM

Cheers niko I appreciate your input - I'm gonna check out your MAX filter

macer

StockFetcher Forums · Filter Exchange · Relative Strength<< 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 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