| Index | Recent Threads | Who's Online | User List | Search |
|
|
![]() |
Portfolio123 » List all forums » Forum: Feature Suggestions » Thread: Feature Request: TOP number of stocks |
|
Total posts in this thread: 4 |
[Request a Feature] [Add To My Favorites] [Watch this Thread] |
| Author |
|
|
Koronbock
Advanced Member ![]() GERMANY Joined: Jun 11, 2006 Posts: 166 Status: Offline |
Hi Marco, here is my request (which has been voiced similarly by others as well): A TOP function, which will select the TOP number of stocks according to a criteria: Condition A (for example: MktCap > 500), from the remaining stocks Select the TOP(n) stocks This would give us complete control over the number of stocks that are chosen for a backtest. At the moment there are differing numbers at each selection point of time. View the feature request here. |
||
|
|
jerrodmason
Advanced Member UNITED STATES Joined: Jan 14, 2005 Posts: 599 Status: Offline |
I heartily endorse, with one embellishment. The TOP function's parameter should permit either an integer or a percentage. Thus TOP(5) would keep the top five stocks TOP(50%) would keep the top half of the current set. Alternate implementation is a separate function eg TOP%(50) ---------------------------------------- The smart money was on Goliath. "He's not the Messiah. He's a very naughty boy." |
||
|
|
jerrodmason
Advanced Member UNITED STATES Joined: Jan 14, 2005 Posts: 599 Status: Offline |
After thinking about this request some more, I believe that two operators are needed, not just one. The screener now allows keeping the top N stocks, but only after all filters have been executed, and only sorted by Rank. This is a very liimited implementation. What's needed is the ability to keep the top N (or N%) of the current set based on any specified factor, and then allow further filtering and/or sorting. A new pair of operators would do the trick:
These operators would be used in Screen, Buy and Sell rules. In a Sell rule, the term "list" refers to the current holdings; in a Buy or Screen rule, the term refers to the set of candidates defined by the preceding rules. Example set of Screen or Buy rules:
Example of Sell rules:
Note to Marco: This request enhancement supersedes Item 3 of this request , which was limited to Sell rules. ---------------------------------------- The smart money was on Goliath. "He's not the Messiah. He's a very naughty boy." |
|||||
|
|
marco
|
I believe this is possible using FOrder() and using #Previous in the universe parameter ---------------------------------------- Portfolio123 Staff |
||
|
| [Show Thread Printable Version] |