James O'Shaughnessey's Trending Value Screener

This script is designed to replicate the work performed by James O'Shaughnessey as detailed in his

You are now following this Submission

A very rough description of Trending Value:

Download all financial information on every company available with a market cap > $200M. Look at six statistics to form a stock's value for part 1 of my filter. Each gets a ranking of 0-100 with 100 being the "best" in the stock universe and 0 being the "worst" in the stock universe. Those 6 are:

P/E
P/S
P/B
P/FCF
Shareholder Yield (which is Stock Buybacks + Dividend Yield)
EV/EBITDA

A "perfect" stock has a 600 rating. Any stock above a 420 or so is a very financially sound, well rounded company, and generally undervalued (as referenced by the P/E, P/S, P/B) so I know my money isn't being thrown into a travesty waiting to collapse.

Then look at the top 10% of those stocks and sort them by 6-month relative price. This gives me an ordered list of financially sound and stable companies that the market is behind. A company can be financially stable without having growth, so this allows me to find out what's moving in the right direction.

Cite As

Justin (2026). James O'Shaughnessey's Trending Value Screener (https://www.mathworks.com/matlabcentral/fileexchange/41940-james-o-shaughnessey-s-trending-value-screener), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.0.0