| Index | Recent Threads | Who's Online | User List | Search |
|
|
![]() |
Portfolio123 » List all forums » Forum: Ranking Systems and Factors/Functions » Thread: Absolute Versus Relative Ranking Systems? |
|
Total posts in this thread: 5 |
[Request a Feature]
[Post new Thread] [Add To My Favorites] [Watch this Thread] |
| Author |
|
|
jdclay3900
Member
|
First Post here: Is there a way to get a ranking system that has absolute limits as opposed to a relative rank? The reason I am asking is that this could serve as a sort of fundamental market timing rule. You would think that as things become worse and worse, the absolute scores of different stocks would go down. The rule would be to buy the top x% of scores above a certain threshold. |
||
|
|
DennyHalwes
Advanced Member UNITED STATES Joined: Apr 28, 2004 Posts: 1532 Status: Offline |
Josh, All of the stock's factors and functions are ranked between 1 &100. So if you want to only buy stocks in the top 5% then use the buy rule Rank > 95. You can also do that with specific factors or functions using FRank. For example, FRank(“PEG”,All,#ASC,#Universe) > 95, or FRank(“Close(0) / Close(20)”,All,#DESC,#Universe) > 95. See the description of FRank here: http://www.portfolio123.com/doc/doc_index.jsp?popUp=0&what=F Denny ![]() ---------------------------------------- "The significant problems we face cannot be solved at the same level of thinking that we were at when we created them". Albert Einstein |
||
|
|
jdclay3900
Member
|
I understand what you are saying Denny. What I was trying to get at is, could you build a system that creates a score for the stock using the same factors that make up a desired ranking system. In this way, you could get a sense for how bullish the overall market is from your scoring system. I would much rather buy the top 5% of stocks in my system when the ranking scores are higher and increasing. Does that make sense with what I am trying to get at? Oh btw, your post have been very informative. Thanks. |
||
|
|
DennyHalwes
Advanced Member UNITED STATES Joined: Apr 28, 2004 Posts: 1532 Status: Offline |
Josh, Here are some ideas. If you want to buy stocks that have had an increase in their rank, use in a buy rule; Rank > RankPrev(1). (change the (1) to however many weeks you want) If you have access to the P123 data back to 03/31/2001 then you must start a Sim later than that since there will not be data to calculate the previous rank for that date. Here is the description of RankPrev; RankPrev(weeksAgo): Historical weekly rank based on the selected ranking system. Weekly ranks are updated every Saturday. weeksAgo: number of weeks from 0-52. Examples: To get the stocks whose rank has improved week to week, enter: RankPrev(0) > RankPrev(1) As mentioned in my earlier post you can also use the FRank in the buy rules for all of the factors in you ranking system. For a large system you would need to select the most important factors to limit the # of rules. For limiting a Sim to only buy stocks when the market is increasing use a buy rule like; SMA(5,0,#Bench) / SMA(20,5,#Bench) > 1. Adjust the days as you like. That rule might be more restrictive than you like since there will be many times that the Sim will not buy stocks. You might consider instead limiting the rule to buy as long as the market is not down very much like; SMA(5,0,#Bench) / SMA(20,5,#Bench) > 0.98. When using these rules be sure to view the % Cash Invested Graph. It is easy to have too many restrictive rules and the Sim will be in cash much more than you wish. Denny ![]() ---------------------------------------- "The significant problems we face cannot be solved at the same level of thinking that we were at when we created them". Albert Einstein |
||
|
|
Stittsville123
Advanced Member
|
Josh - I have a "solution" but it is fairly involved. It depends on having a relatively simple ranking system, one that can be written as a formula on one line. If so then you could imitate the ranking system using two custom formulae, one for the most recent date and one for n days in the past. For the purposes of showing an example, lets say the two formula are named $CustomFrm1 and $CustomFrm2. ...1 is for most recent date and ...2 is for n days in the past. Then you need to determine a (reaonable) absolute fixed value that has some stocks above and below this value every week. You can determine such number using the screener with the following buy rule: $CustomFrm1 > AbsNum Verify that stocks are bought each week using the screener backtest. Then change the buy rule to: $CustomFrm1 < AbsNum Again verify that stocks are bought each week. By playing with the screener you can optimize AbsNum to give you the best number where there are the most stocks above and below it for each week. Then use the stock formula FCount("expression"[,type,universe]) which counts the number of stocks where expression is true. Your simulation or portfolio buy rule would look something like this: FCount("$CustomFrm1 > AbsNum",...) > FCount("$CustomFrm2 > AbsNum",...) This buy rule would be true when there are more stocks (in your stock universe) that fulfill the expression "$CustomFrm1 > AbsNum" than there were n days ago. Hope this helps, Steve |
||
|
| [Show Thread Printable Version] [Post new Thread] |