Apologies if this question has already been answered. - I could not resolve it by looking at the help files.
I’m trying to rank the stocks according to their P/E ratios.
Then I want to rank the highest ranking 20 percent (those with the lowest PE) according to their Price 2 Book ratios. Thus I want 5 buckets according to PE and within each PE bucket, I want 5 PB buckets - all together 25 buckets.
Then I’d like to run a backtest for each of these buckets and note the annualized return and sharpe ratio.
(1) I have a screener that can be modified according to each bucket. For a particular bucket, the rules are:
But for the bucket above, the backtesting tool has no positions for the entire backtesting period. (Max period.)
This makes no sense, as I just want companies to be ranked relatively to one another. I don’t want companies to be eliminated.
(2) Is there a better way to do this? The ranker tool doesn’t give me the precise numbers for annualized rate of return and Sharpe ratio. I’ve run a backtest for every bucket so far. Should I be looking into the optimizer tool?
Thanks - can someone explain to me what’s happening as opposed to just giving me the solution? I would like to understand what’s going on, so that I can solve the issue myself next time should something similar happen.
NAs are a product of either nulls in the database or divide-by-zero errors. The best way to get rid of them when dealing with ranking systems is to create a custom universe. Write a rule that includes the stuff that you’re looking for in a rule linked with an “or”:
PEExclXorTTM or SalesTTM
for example.
That will eliminate any companies with NAs for those two data points.