Stock Ranks

How would I do this?

I have a screen and ranking system which backtest great by choosing the 4 highest-ranked stocks.

My question is, instead of choosing stocks ranked 1 - 4, how would I choose stocks ranked 2 - 5 or 7 - 10 or whatever? I want to be able to backtest this.

Thank you.

Between (RankPos, 2, 5)
or
Between (RankPos, 7, 10)

Put one of those in your screening rules and leave the Max # of Stocks at 0 in the settings tab.

Thanks, but it doesn’t work the way I would expect it to.

If Max # Stocks = 4 and NO RankPos rule: Ann ret. = 40.45%

If Max # Stocks = 0 and Between (RankPos, 1, 4): Ann ret. = 12.20%

I would expect both of those conditions to return the same result because the screen is (supposedly) selecting stocks ranked 1 - 4. They are logically identical.

To cover the other permutations:

If no Rank Pos Rule and Max # Stocks = 0: Ann ret. = 12.23%

If Max # Stocks = 4 and Between (RankPos, 1, 4): Ann ret. = 12.20%

Thanks for any assistance.

I think I’ve got this figured out now.

I had a closing price filter which was interfering with the backtest. I removed that filter and I’m getting predictable results now.

The problem I described earlier still stands.

Given a rule:

Between(RankPos, 1, 3)

I get different backtest results depending on whether this rule is engaged and Max # Stocks is set to 0, or the rule is disengaged and Max # Stocks is set to 3.

The actual stock picks are identical; only the backtest results differ. If the stock picks are identical, then the backtest results should also be.

Why the difference in backtest results?

If you have any other rules in the Rules tab it will affect the results. If you move all your rules to the Universe, the results should be identical.

How do I move all the rules to the Universe?

I disengaged all other rules and the backtest results were indeed identical.

The question remains: which backtest result is the accurate one?

“The man who wears two watches does not know what time it is.”

OK, I think I’ve got it now.

Thanks, Yuval.