New Rank Function

Since the addition of our Percentile Rank (pRank) function last year, there have been several requests for a function to rank only the funds in the screen as opposed to all the funds in our universe as the pRank function does.  Today, we are introducing the Rank function.  It takes the symbols as defined in the first section of the screener and ranks them from 1 to n, where n is the number of funds being ranked.

Examples:  Rank( [Rtn-3mo] ) or Rank( [StDv-1mo], INVERTED )  – Ranks funds from 1 to n based on the value of the specified field or expression with larger values having higher ranks.  The keyword ‘Inverted’ reverses the order to give smaller values the higher ranks and higher values the lower ranks.

This new function may at first appear too similar to the pRank function to be of interest, but we and other users have found screen results to be different and often improved relative to the pRank function.  Bottom line, it is worth trying out on your favorite screen.

You can see from the above examples that the format of the Rank function is exactly the same as the pRank function.  Similarly, like with the pRank function, ties in the value field result in ties in the rank, and ties always carry the higher of the tied ranks.

Below is a simple example of using the new function.  We took the Market View symbols, created ranks for Rtn-3mo and StDv-1mo, and then weighted those two ranks 60% and 40%, respectively.  Note that since volatility is generally perceived as lower values being better, this rank was inverted.  The actual screen page is here .

As is the case with all functions, this is a Premium Access feature.

For all users, we are working on a new feature and are looking for a list of 10 funds to represent the ETF universe.  Below is a list we have developed, but it can be improved upon so let us know how.  Email us or post your favorite portfolio in the comments below.  To be more specific, the list we are looking for should have as broad a market representation as possible given the 10-fund limit and an obvious need for liquidity..

The most questionable of these funds is IYR, which possibly should be replaced with XLF (Financials) or something entirely different.  Also, is SPY the best US market ETF, or should it be replaced with RSP or some other variant?

Also, what would you like added to the site?  One user recently requested we support the Fidelity Select Funds, and we have looked into that possibility.  Would you be interested in that family of mutual funds?  Are there other screening functions you would like to see?

Let us know.

22 thoughts on “New Rank Function

  1. Hugh, would it be possible to add 6 months and 1 year as holding period? I would like to test some rebalance strategies but they only work in medium/long term, so I need longer holding periods to test them.

  2. Wonderful to have this. Thanks so much.

    As far as future developments go, the main difficulty with ETFs is that they have not existed for very long. Traditional mutual funds go back much further. Early index funds make great proxies for index ETFs, and can allow basic screens to be backtested an extra ten years or so. I have used older Vanguard and other funds (JP Morgan, Black Rock, Templeton) for this purpose. Actual index data would of course be ideal, but I assume it must cost a fortune.

    Anyway, just a thought. Thanks again for this new feature.

    Baltassar

  3. I am finding that I get different results using RANK >= x, versus RANK > x, even when the final sort is a number less than x.

    I also find that when using RANK >= x, it is still possible to get pick “x” stocks; though they are not the same one I get using RANK > x, and the overall result is different.

    Not sure how to explain this.

    Baltassar

    • I’m not sure I understand what you are seeing. In the page URL there should be an sn or sbt number. Could you please let me know what that is and I’ll take a look. – Hugh

      • These screens are identical, except that one uses the RANK function >= 3, the other uses RANK > 3, in each case choosing the top 1.

        sbt=541d7
        sbt=541d6

        If you look at the results by cycle (I just looked at number 1) you will see that they also return a different list of selected ETFs.

        Baltassar

        • Baltassar, as I read it your screen takes the following 5 symbols, creates a rank on RRS-126 named _UV1, filters on that rank, and then sorts by 3-month return.

          I saw the different returns in the two models you gave so dug deeper by comparing cycle 1 of each model. I actually copied the period-by-peirod data for each model’s cycle #1 into a spreadsheet so I could compare side-by-side. I noticed numerous dates with different results so looked at the most recent, 2/4/14. With a slight screen change I could view all the relevant data fields for that date, as depicted below. The right-most column is RRS-126 data and the column next to it is the 1 to 5 ranking by RRS. The rows are sorted by 3-month Return as in the screen. You can see from this table why the two screens pick different symbols for this date.

          Sym Rtn-3mo _UV1 RRS-126
          TLT 2.75 3 2.71
          SPY 0.08 5 28.06
          DBC -1.42 1 -10.87
          EFA -3.03 4 19.12
          EEM -10.07 2 1.91

          Model 541d7 filters for _UV1 >3, and on on this date it picks SPY. On the other hand, model 541d6 filters for _UV1>=3, and on this date it picks TLT which has a _UV1 equal to 3.

          I also looked at the next most recent date where the two screens pick different symbols, 12/5/13, and found a similar situation. Here, SPY was the top fund with a _UV1 ranking of 3 and EFA was the #2 fund with a _UV1 value of 5. Like above, one model picked SPY and the other picked EFA. These models are rightfully different.

          FYI, the revised model I used to view the data is: http://www.etfscreen.com/screener.php?sn=772ac.

          If I am missing something important please let me know because from what I am seeing everything looks correct (as defined). Have a good weekend. – Hugh

          • I assumed that the best result on the RRS screen would be ranked 1, whereas it is ranked 5. I think I’m OK now.

            Thanks,

            Baltassar

          • I guessed that might be the case but wasn’t sure. We chose to maintain a system parallel to the pRank function where higher values yield higher ranks unless the “inverted” rule is used. – Hugh

  4. Ten fund universe:

    SPY (Domestic large)
    VXF (Domestic small)
    VEA (Int’l developed)
    VWO (Int’l emerging)
    VNQ (Domestic real estate)
    VNQI (Int’l real estate)
    TLT (Long treasuries)
    SHY (Short treasuries)
    DBC (Commodities)
    GLD (Gold)

    Baltassar

  5. Hugh, as I understand it, backtesting works on closing prices both for screen calculations and any resultant sell/buy transaction. Would it be possible for the sell/buy transactions to be costed at the opening prices of the following trading day? This would align backtesting results more closely with what would actually have happened.

    • This is a feature we acknowledge needs to be supported. We have reviewed it in the past, but have never pushed it through. Maybe we can combine it with the prior request for 6-month and 1-year holding periods and answer both requests. At this point I can’t provide a target date, but we’ll try to put something together. – Hugh

  6. Hi Hugh,

    We have been discussing this via email as per my request. I have to thank you for the good work also here at the blog.

    This issue with ties should be well thought and implemented. If one is using a single factor equation, the older fund rule should be fine, but can also be done differently… However, for a multi factor equation like the initial example, you should select the fund with best rank at the most overweight factor.

    About new features, since I’m a very recent user I don’t have yet full knowledge about ETF Screen capabilities. As previously request by email, for now I would like to see the possibility to have customize periods for The Total Return, Moving Averages and Volatility fields.

    • Jose, thanks for the feedback.

      Due to the flexibility of our model definition it is difficult for us to determine programmatically what the base of the sort rule is, and to therefore determine the best secondary sort. If, like some other sites, we offered a predefined template for the model we could most likely deduce a generally acceptable secondary sort, but that is not how our screener works. In keeping with the current methodology, one option would be to offer a secondary sort of the user’s choice. This offers the maximum flexibility but puts responsibility on the user to make a decision.

      In the meantime, you might try slightly over-weighting the field you want to give preference. By slightly, I’m thinking by one or two orders of magnitude. If your standard weighting is .4, .3, .3, try changing it to .41, .3, .3 or even .401, .3, .3. This does not eliminate ties, but eliminate them in the case of “all other things being equal”.

      Thanks also for mentioning the enhancement of user-definable indicator parameters. This is on our development list. It looks promising but there are some concerns we are overlooking something. We’ll know more as we get further into it.

Leave a Reply

Your email address will not be published. Required fields are marked *