Skip to main content

Undervalued Stocks

Note: Many of the ideas in this article come from the book Quantitative Value: A Practitioner's Guide to Automating Intelligent Investment and Eliminating Behavioral Errors, by Wesley Gray and Tobias Carlisle.

What is Value?

Warren Buffet, the king of value investing, once said that his approach to finding great stocks has been to look for wonderful companies at a fair price. There are many ways to interpret wonderful and fair price. In this example, we're going to attempt to quantitiatively define those two metrics and find stocks that meet our criteria.

Wonderful Companies

One way to define a wonderful company is to define it as a company which produces high returns on its assets. For example, imagine two businesses:

  • a laundry mat with $500k in assets that generates $200k in income per year
  • an accounting firm that has $20 Million in assets and generates $2M in income.

Although these companies are two vastly different sizes, we can still attempt to compare them on their income generating capabilities. Wonderful companies are companies that are able to generate a large portion of their assets in income. To measure this, let's take a look at their net income to assets ratio (return on assets).

  • laundry mat return on assets: $200k/$500k = 0.4 = 40%
  • accounting firm return on assets: $2M/$20M = 0.1 = 10%

We find that the laundry mat has a much higher return on assets. We could say that the laundry mat is a more wonderful business than the accounting firm.

A Fair Price

One way to interpret fair price is to use the price to book ratio. The book value of a company tells you how much it costs to "hold" the company. It is calculated as the total assets - intangible assets (brand value, etc) - liabilities. It serves as the total value of the company's assets that shareholders would theoretically receive if the company was liquidated.

When the ratio of the price of the company to its book value is low (low price for high book value), it can indicate that the company is available at a bargain price. However, if the price to book value is too low (negative), it can indicate the company is in a dire situation because it has taken on too much debt. So a good indicator of a company at a fair price is to look at low price to book ratios that are also greater than 1.

Using the Stock Screener API

We can use Tickflow's stock screener API to find stocks that are wonderful at a fair price. Taking a look at the stock data reference, we'll define the filters as such:

  • wonderful companies: return_on_assets > 0.25
  • fair price: price_to_book > 1 and price_to_book < 5

We'll be using python to interact with the API.

Preparing the Request

For our request, we'll need to query for return_on_assets and price_to_book, however let's also query data for sector, market_cap, day_close, and 52week_change. These extra fields will give us a better understanding of the stocks returned by our screening. Let's also sort the results by their return_on_assets.

import requests
import pprint # for pretty printing JSON outputs

request_payload = {
"fields": ["return_on_assets", "price_to_book",
"sector", "market_cap",
"day_close", "52week_change"],
"filters": [

{
"field": "return_on_assets",
"comparator": ">",
"threshold": 0.25
},

{
"field": "price_to_book",
"comparator": ">",
"threshold": 1
},
{
"field": "price_to_book",
"comparator": "<",
"threshold": 5
}
],
"sort_by": "return_on_assets",
}

response = requests.post(
url="https://api.tickflow.io/v1/stocks/screener",
json=request_payload)

pprint.pprint(response.json(), indent=4)

The Screening Result

Let's take a look the response from our screening.

Note: This query was made in October 2022.

The results are sorted in ascending order of their return_on_assets. Interestingly, we find our response contains a variety of sectors. Some of these stocks have performed very poorly over the past 52 weeks, whereas others have performed well.

Keep in mind, not every stock (or any stock) in this list may be a good investment. Instead, this list of stocks provides a good seed ground for finding the right investment. If we choose to, we can apply further analyses to narrow the list to a 1-3 picks. We can either

{
"status": 200,
"result": {
"EVR": {
"sector": "financial_services",
"return_on_assets": 0.27726,
"52week_change": -0.4170829,
"price_to_book": 2.3672771,
"market_cap": 3197689856.0,
"day_close": 81.69
},
"STLD": {
"sector": "materials",
"return_on_assets": 0.30043,
"52week_change": "",
"price_to_book": 3.4715025,
"market_cap": 15423612928.0,
"day_close": 77.72
},
"MGY": {
"sector": "energy",
"return_on_assets": 0.32669997,
"52week_change": 0.14999998,
"price_to_book": 3.9882085,
"market_cap": 6649645056.0,
"day_close": 23.0
},
"ATKR": {
"sector": "industrials",
"return_on_assets": 0.33758,
"52week_change": 0.0052577257,
"price_to_book": 3.2812264,
"market_cap": 3634172928.0,
"day_close": 87.95
},
"WIRE": {
"sector": "industrials",
"return_on_assets": 0.36450002,
"52week_change": 0.2714479,
"price_to_book": 1.588946,
"market_cap": 2522666496.0,
"day_close": 131.9
},
"DQ": {
"sector": "technology",
"return_on_assets": 0.37148997,
"52week_change": "",
"price_to_book": 4.7076745,
"market_cap": 3634512384.0,
"day_close": 49.44
},
"VIR": {
"sector": "healthcare",
"return_on_assets": 0.46088,
"52week_change": -0.48021495,
"price_to_book": 1.445554,
"market_cap": 2822536704.0,
"day_close": 21.28
},
"MRNA": {
"sector": "healthcare",
"return_on_assets": 0.46337003,
"52week_change": -0.6033169,
"price_to_book": 2.6900609,
"market_cap": 48281903104.0,
"day_close": 123.42
},
"AMR": {
"sector": "materials",
"return_on_assets": 0.48702,
"52week_change": 1.5230718,
"price_to_book": 2.0316021,
"market_cap": 2623908352.0,
"day_close": 151.46
}
}
}