This screen selects the most undervalued stocks by using a custom blended Value factor.
It demonstrates how to use the rankPercentile() function to select stocks that are in the top quartile/decile,
etc of the selection universe, and how a custom factor can be created from rankings of financial metrics..
country in (US, CA, GB, AU, JP, HK);
exchange != OTC;
* Eliminate all stocks not in top 25% of two value metrics.
rankPercentile(EBitToEv) > 75;
rankPercentile(BookToMarket) > 75;
* my Value score is the average of the percentile ranks of my two
* favorite valuation measures
let myValueFactor = (rankPercentile(BookToMarket) + rankPercentile(EBitToEv)) / 2;
myValueFactor > 75;