StockFetcher Forums · General Discussion · simple rotation filter -- dos the code match the rules?<< >>Post Follow-up
fotchstecker
196 posts
msg #151129
Ignore fotchstecker
3/8/2020 1:15:53 PM

Does the code below meet the simple system requirements?

System -- Buy the Rank Score leader
1. Overall Rank Score = ( 20-Day Return ) *.5 + ( 3-Month Return ) *.5
2. Close > Average( Close, 100 days);
--------------------
Here's the code I threw together. Assuming 60 days works for "3 months", does the code below meet the rules?

set{20Return, ROC(20,1)}
set{ROCrank1, 20Return * .5}
set{60Crank, ROC(60,1)}
set{ROCrank2, 60Crank * .5}
set{ROCrotate, ROCrank1 + ROCrank2}


ADD column ROCrotate
apply to symlist(bnd, dbc, veu, vnq, vti)
and draw MA(100)
and close > MA(100)



Village Elder
227 posts
msg #151130
Ignore Village Elder
3/8/2020 1:49:55 PM

No need to multiply by 0.5 if you are simply ranking from highest to lowest. The sum will work just as well.

Cheese
642 posts
msg #151131
Ignore Cheese
3/8/2020 2:55:28 PM

@fotchstecker

Thank you for a very useful rotation ranking filter.

I've added some features to your excellent filter to help me see
the matrix of rotation ranking clearer.

Fetcher[
/*
https://www.stockfetcher.com/forums/General-Discussion/simple-rotation-filter-dos-the-code-match-the-rules/151129
simple rotation filter -- dos the code match the rules?
fotchstecker 3/8/2020 1:15:53 PM
*/
/*
System -- Buy the Rank Score leader
1. Overall Rank Score = ( 20-Day Return ) *.5 + ( 3-Month Return ) *.5
2. Close > Average( Close, 100 days);
--------------------
*/


set{20Return, ROC(20,1)}
set{ROCrank1, 20Return * .5}
set{60Crank, ROC(60,1)}
set{ROCrank2, 60Crank * .5}
set{ROCrotate, ROCrank1 + ROCrank2}


ADD COLUMN SEPARATOR
ADD column ROCrotate 3 months ago
ADD column ROCrotate 1 month ago
ADD column ROCrotate 1 week ago
ADD column ROCrotate


apply to symlist(bnd, dbc, veu, vnq, vti)


ADD COLUMN SEPARATOR
and draw MA(100)
/* and close > MA(100) */
set{ma100a,count(close > ma(100),1)}
ADD COLUMN ma100a {above ma100}


]



fotchstecker
196 posts
msg #151132
Ignore fotchstecker
modified
3/8/2020 3:28:53 PM

Village Elder and Cheese -- thanks so much for the replies and feedback.

Cheese, thanks for the extra features. I think they look useful since they provide some stronger context for direction. It raised some additional thinking. Is there a way to plot those periods to show sudden gaps or changes?

Thank you, both.

Cheese
642 posts
msg #151134
Ignore Cheese
modified
3/8/2020 4:41:02 PM

fotchstecker 3/8/2020 3:28:53 PM
Cheese, thanks for the extra features. I think they look useful since they provide some stronger context for direction. It raised some additional thinking. Is there a way to plot those periods to show sudden gaps or changes?
================================================================================

@fotchstecker,

I'm sure there is a way, but I would like to defer your inquiry to xarlor and nibor100 who have often
dazzled me with their posts.

I would like to call your attention to the wonderful things that some other clever people have
done with the RRG charts, a tool dedicated to rotation.

May I suggest that you and I spend more time with the following steps:

1. Start with
https://twitter.com/search?q=RRG%20chart&src=typed_query
and focus on Khanh Hoang
https://twitter.com/HCKoutlet

Khanh Hoang said s/he has made money with the RRG charts

2. Focus on the videos and articles of Julius de Kempenaer, the creator of RRG charts
https://twitter.com/RRGresearch
https://stockcharts.com/articles/rrg/

3. You may want to subscribe to stockcharts for one trial month
or you may want to call on Mactheriverrat and other paid subscribers of stockcharts
to post screen captures of RRG charts for your symlist. This may give you the big
picture of what is possible, and then we can all can think of what more we can do in sF.

Hope this helps


fotchstecker
196 posts
msg #151135
Ignore fotchstecker
modified
3/8/2020 5:39:22 PM

Hi, Cheese -- thanks very much for the suggestions. I'll look into them! Also, I added some simple correlation outputs to your prior additions:


/*
https://www.stockfetcher.com/forums/General-Discussion/simple-rotation-filter-dos-the-code-match-the-rules/151129
simple rotation filter -- dos the code match the rules?
fotchstecker 3/8/2020 1:15:53 PM
*/
/*
System -- Buy the Rank Score leader
1. Overall Rank Score = ( 20-Day Return ) *.5 + ( 3-Month Return ) *.5
2. Close > Average( Close, 100 days);
--------------------
*/

chart-time is 1 year
set{20Return, ROC(20,1)}
set{ROCrank1, 20Return * .5}
set{60Crank, ROC(60,1)}
set{ROCrank2, 60Crank * .5}
set{ROCrotate, ROCrank1 + ROCrank2}


ADD COLUMN SEPARATOR
ADD column ROCrotate 3 months ago
ADD column ROCrotate 1 month ago
ADD column ROCrotate 1 week ago
ADD column ROCrotate


apply to symlist(bnd, dbc, veu, vnq, vti)



ADD COLUMN SEPARATOR
and draw MA(100)
/* and close > MA(100) */
set{ma100a,count(close > ma(100),1)}
ADD COLUMN ma100a {above ma100}

add column Historical Volatility(100,1)
and add column corr(SPY,30,Close)
and add column corr(SPY,60,Close)
and add column corr(SPY,90,Close)
and add column corr(SPY,150,Close)




Cheese
642 posts
msg #151137
Ignore Cheese
3/8/2020 6:04:16 PM

Thanks again, fotchstecker
If you figure out how Khanh Hoang uses RRG to make money, please post.

StockFetcher Forums · General Discussion · simple rotation filter -- dos the code match the rules?<< >>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 2018 - 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