In their book ‘Quantative Value: a practitioner’s guide to automating intelligent investment and eliminating behavioral errors’, authors Wesley Gray and Tobias Carlisle discuss some of the most popular quantitative investing screens and factors. For each model, they also present an alternative that outperforms the original model. One of the improved models is what they call ”Quality and Price”. This model is based on the same ranking method as the Magic Formula, but it uses a different quality and price factor. Gray and Carlisle got the idea to replace the factors based on 2 academic papers.
The Greenblatt Magic Formula uses return on capital (ROC) as a proxy of a stock’s relative quality. The problem with ROC is that it’s not a very clean measure of a firm’s profitability. A firm that quickly grows its sales by spending heavily on marketing or R&D will see its short term profitability impacted. Moreover, management can implement actions to increase short term profitability while putting long-term profit growth in jeopardy. In his paper ‘The Other Side of Value: Good Growth and the Gross Profitability Premium’ Robert Novy-Marx suggested to use gross profitability, which is a much cleaner measure of a firm’s true economic profitability. Find more about this measure in our glossary.
The Magic Formula uses EBIT/EV as its price measure to rank stocks. The problem with this measure is that it can vary significantly from period to period. For this reason, Nobel price winner Eugene Fama and Ken French consider book to market capitalization to be a superior metric as it varies less. This is important to keep turnover down in a value portfolio. Find more about this measure in our glossary.
In their tests, the quality and price model significantly outperformed the magic formula. Between 1964 and 2011, the quality and price model showed an average yearly compound rate of 15.31% compared to 12.79% for the Magic Formula. This model also had higher volatility and worse drawdowns, but on a risk-adjusted basis it was the clear winner.
How does it work?
The strategy looks for companies with the following characteristics:
- You can purchase the shares at a bargain price.
- The business excels at making money.
Can you give an example of a magic formula company?
Let's take Altria, the holding with subsidiaries that include Philip Morris USA. Altria performs particulary well on 2 ratios:
To find companies that are trading at bargain prices, we look at the earnings yield.
In the chart above, you can see all US companies excluding utilities and financial companies. Altria's earnings yield is 9.98%, which puts it in the red bar. Out of 3228 companies, only about 100 of them have a higher earnings yield.
Why earnings yield instead of Price/Earnings?
Earnings yield is not widely available and you have to use a paid service like ValueSignals to get reliable numbers. We could have used the more popular and available price-to-earnings ratio, but there are very good reasons why Greenblatt doesn't use rely on it:
- Companies are taxed at different levels, so we have to look at pre-tax earnings to compare them. Operating earnings or EBIT is a much cleaner way of looking at the company's earnings.
- Companies have different levels of debt, which is not considered when looking only at market capitalization. Enterprise value is the closest measure of the value of a company's total value.
To find companies that excel at making money, we use the Return on Invested Capital (ROIC), more commonly known as ROC. Let's have a look if Altria excels in this area.
As you can see, Altria is very good at making money. It's at the top of the histogram, and only a few companies do better.
Why is ROC this high?
- We already used Operating income in the earnings yield. For the last 12 months, the company generated 11bn.
- Altria only needed 2 billion dollars in cash to purchase fixed assets to conduct its business over the same period.
- The company is in excellent financial health and did not need any additional capital to cover its short-term obligations.
For every dollar Altria spent, it generated 6 dollars. Only very well-run companies can achieve results like these.
How can I find more magic formula companies?
It's pretty simple. You can use Joel's stock screener, which is available at magicformulainvesting.com. Just select whether you want the top 30 or 50 companies, and the list pops up in seconds. There are a few issues.
- Security. This site has been compromised, and all users have been asked to change their passwords. The site is just a companion to sell more books and has not been updated for quite a long time.
- The results are very restricted. As you can see in the screenshot above, you get the company name, the ticker, the market cap, the stock quote price, and the date of the most recent quarter. You don't get the magic formula score, the earnings yield, the ROC, or any other information.
- It only covers the US.
- You can't add any filters. For instance, looking at the US, I might want to exclude the pink sheets or look at Nyse. Or I might need to increase the minimum market Cap.
Another way is to use the ValueSignals stock screener.
As you can see in the screenshot above, you can run this screen on the US alone, but I also included Canada. I removed the pink sheets and OTC. In the screenshot, you can see the magic formula score, the ROC and the earnings yield. On top of that, you can also see other factors, such as the Piotroski F-score. Finally, I can drill down on the company to see the reports we already discussed in the section above for Altria.
What filters do we use?
For the template screen, we implemented the following filters
- Market Cap > $50m
- All stocks, excluding utility and financial stocks
Why is your list slightly different from MagicFormulaInvesting.com
In general, the same companies show up in the top 50 of both stock screeners. There are differences, however. Our list, for instance, features Aaron's holdings, a company that is not on Greenblatt's list. The explanation is quite simple. Even if Joel Greenblatt published quite some detail about his calculation, he did not disclose everything. To calculate net working capital, he uses excess cash. Unfortunately, he did not disclose the formula he used to calculate it. We tested many different formulae and used the one that created the biggest overlap between the lists.
Combining the Magic Formula with other value indicators
Studies have shown that while the magic formula works on its own, it's even better to combine it with other factors. In our research, we found that it works even better when combining it with a momentum factor. The one that worked best in our test was the 6-month price index. You can read more about this here.
In 1670, Isaac Newton concluded that “What goes up must come down”. Centuries later Werner DeBondt and Nobel prize winner Richard Thaler reported in their 1986 article, ’Does the stock market overreact’ in the Journal of Finance, that the same was true for the stock market. Most people tend to overreact to unexpected and dramatic news events and eventually stock prices correct.
They explained the overreaction effect as follows:
“If stock prices systematically overshoot, then their reversal should be predictable from past return data alone, with no use of any accounting data such as earnings. Specifically, two hypotheses are suggested: (1) Extreme movements in stock prices will be followed by subsequent price movements in the opposite direction. (2) The more extreme the initial price movement, the greater will be the subsequent adjustment."
De Bondt and Thaler tested this overreaction hypothesis by focusing on stocks that had experienced either extreme capital gains or losses over the last years. They tested this on data for the period 1926-1982, constructed loser and winner portfolios and evaluated the performance of these portfolios for a period up to 5 years after the portfolio construction. When using a 3-year look-back, the loser portfolio outperformed the market by 19.6% over the next 3 years. The winner portfolio underperformed by 5%. The difference between the loser and winner portfolios was 24.6%. They also examined portfolios formed on a 5-year look-back and found that the loser portfolio outperformed the past winner portfolio by 31.9% over the next 5 years. This phenomenon is also called the winner-loser effect and was the first attempt to apply a test for a behavioral principle to the stock market.
The authors also made the following observations:
- The effect was assymetric and much less pronounced on winners compared to losers.
- Most of the excess returns were realized in January. This is more widely known as the January effect.
- The results confirmed the claim made by Benjamin Graham, that the overreaction phenomenon mostly occurs during the second and third year of the test period.
Glen Arnolds, who published a paper proving the presence of the overreaction effect in the UK, also discovered that returns on the loser portfolio could be further enhanced by applying the Piotroski F-score.
The Return reversal with Piotroski template screen replicates the enhanced loser portfolio by going through the following steps:
- First, we select the 10% stocks with the lowest price index over the last 5 years.
- Then we filter out stocks with a Piotroski F-score below 6.
Although this theory was later confirmed by papers proving its effectiveness in markets around the world, it's a difficult one to put in practice. In her 1998 Wall Street Journal column headed 'Your money matters: investors' overreactions may yield opportunities in the stock market', Thaler was quoted saying:
It's scary to invest in these stocks. When a group of us thought of putting money on this strategy last year, people chickened out when they saw the list of losers we picked out. They all looked terrible...
De Bondt added:
The theory says I should buy them, but I don't know if I could personally stand it. But then again, maybe I'm overreacting.
In the fourth edition of his bestselling value quant book 'What works on Wall Street', James O'Shaughnessy devised a new screen which is called "the top stock-market strategy of the past 50 years". Instead of focussing on a particular ratio, he ranks companies according to 5-6 ratios and then combines this with a momentum factor.
How does it work?
First the companies are split into 100 groups (percentiles) based on the following ratios:
- Shareholder Yield
If a company's price-to-book ratio is in the lowest 1% of the dataset, it gets a score of 1. For some ratios it's the other way around, for instance EBITDA/EV. If a company belongs to the highest 1%, it gets a score of 1. If a value is missing, it gets a score of 50. We repeat the same calculation for each of the ratios and then sum up these values. Companies are again divided into 100 groups based on this score. This final result is called value composite. A value composite of 1 means that the company belongs to the 1% cheapest companies according to these factors.
In a second step, we select the top 10% stocks ranked according to this value composite score. Then he filters these stocks by a momentum factor, i.e. the 6-month price index. The result is an extremely cheap group of stocks that have been on the rise during the last 6 months.
“Trending Value is the top stock-market strategy of the past 50 years.”
O'Shaughnessy tested 3 different value composite scores
- VC1: based on the first 5 ratios only, excluding shareholder yield. By using this ratio his backtests showed a return of 17,18% annually.
- VC2: based on all 6 ratios. O'Shaughnessy uses this ratio in his trended value screen since his backtests showed an improvement in overall annual compound return of 12 basis points to 17,3%, a reduced standard deviation, and downside risk.
- VC3: same as VC2 but the last ratio is replaced by buyback yield. Some investors are indifferent whether a company pays out a dividend or want to avoid these since they can be very heavily taxed. This VC generates an even higher return of 17,39% annually but with a slightly higher standard deviation compared to the VC2.
The trended value screener template is based on VC2, but you can change this very easily to use VC1 or VC2 by adjusting the primary factor.
While O'Shaughnessy recommends using the VC as the primary factor and then apply a value ranking, you can also choose to switch it around. Instead of starting with the VC, select the 20% stocks with the highest share price increase during the last 6 months and then sort these by one of the VCs. We have been using this strategy for our European and US newsletter portfolios and this has allowed us to find some real jewels and significantly beat the market.
Many scientific studies confirm that buying a portfolio of low price-to-book companies will beat the market over time. This makes sense: you buy companies for less than what they're worth on paper. Other experienced investors, however, would argue that book value doesn't always provide an accurate picture of the company value. If you want a better understanding of the real value of the company, a full review of the assets is needed. This is true, of course. But the conclusions of the above studies can't be denied. Furthermore, studying these companies in great detail takes a considerable amount of time and the information necessary to perform an accurate estimate of all assets is not always available to all investors.
Joseph Piotroski, a professor in accounting at the Stanford University Graduate School of Business, had a closer look at the data used in these studies and found that in a portfolio consisting of the lowest price-to-book companies, the profits were generated by only a few stocks. In fact, 44% of the companies performed worse than the market. So he thought to himself: wouldn't it be great if I could find an easy way to filter out these companies?
Piotroski wondered whether he could remove these bad apples by looking at the company financial data for the last year. He devised a scoring system called the Piotroski F-Score, a 9 points scoring system based on profitability, funding, and operational efficiency. It looks at simple things such as: 'has the company made more profit compared to last year?' (+1 point) but also: 'is the company cooking the books by adjusting accruals?' (0 points). By using 9 points he was able to get enough signals to determine whether the company is really improving or not.
His research showed that his Piotroski F-score helped to predict the performance of low price-to-book stocks. In his backtests, he found that this strategy outperformed the market by 10% a year on average between 1976 and 1996. The tests also displayed that this was even more the case for small and medium sized companies. Piotroski attributes to the fact that these stocks are often outside of the radar of analysts and new information about a company doesn't get reflected in the share price as quickly.
You can read his influential 2000 paper by clicking on the following link.
“by selecting low Price-to-Book companies and by filtering out the best companies using a set of accounting signals, one could have generated a 23% average yearly return from 1976 to 1996.”Joseph Piotroski
Our Piotroski screener selects the 20% lowest price-to-book companies and filters out the ones with an F-score of less than 7.
How do we calculate the F-score?
The F-score is the sum of 9 binary scores in 3 categories:
- ROA - Return on Assets: Net income before extraordinary items divided by total assets at the beginning of the year. 1 if positive, 0 if negative.
- CFO - Cash Flow Return on Assets: Net cash flow from operating activities (operating cash flow) divided by total assets at the beginning of the year. 1 if positive, 0 if negative.
- ΔROA - Change in Return on Assets: Compare return on assets to last year. 1 if it's higher, 0 if it's lower.
- ACCRUAL - Quality of earnings (accrual): Compare cash flow return on assets to return on assets. 1 if CFO > ROA, 0 if CFO < ROA.
- ΔLEVER - Change in gearing or leverage: Compare the gearing (long-term debt divided by average total assets) to the gearing last year. 1 if gearing is lower, 0 if it's higher.
- ΔLIQUID - Change in working capital: Compare the current ratio (current assets divided by current liabilities) to the current ratio last year. A value higher than 1 indicates an increasing ability to pay off short term debt.
- EQ_OFFER - Change in outstanding shares: The number of shares outstanding compared to last year. 0 if the number increased, otherwise 1.
- ΔMARGIN - Change in Gross Margin: Current gross margin compared to last year. 1 if higher, 0 if lower
- ΔTURN - Change in asset turnover: Compare asset turnover (total sales divided by total assets at the beginning of the year) to last year's asset turnover ratio. 1 if higher, 0 if lower.
To calculate this year's number we use the last trailing 12 months (TTM) number available. For last year we use the same number 1 year ago.
F-Score as secondary ratio
The F-Score is often used in combination with other screens. Our tests showed that if you filter the results of the ERP5 screen by only selecting companies with an F-Score of 7 or more, the return increases from 18,66% to 19,5% per annum. (1999-2010). Many of our members also like to use it in combination with the Greenblatt Magic Formula. We added both screens to our templates and called them the ERP5 Best Selection and the Magic Formula Best Selection.
The enhanced dividend yield strategy was developed by Jim O'Shaughnessy to provide a fixed income strategy based on stocks instead of bonds. O'Shaugnessy argued that while bonds appeal to investors because of their inherent principal protection advantage, they have a number of important disadvantages.
- First of all, bond yield remains fixed, i.e. you will receive the same coupon over the entire period until maturity. This is ok in periods of low inflation, but between 1970 and 2010 inflation has on average been at 4,45%. That means that something that cost 1 dollar in 1970 costs $5,75 in 2010.
- Secondly, with bonds your principal doesn't depreciate, but it also won't appreciate. When the bond matures, you will get back the principal amount, and due to inflation this will be worth a lot less.
To remedy these issues of the traditional fixed income strategies, O'Shaugnessy designed a quantitative investing strategy based on stocks, with as primary objectives a growing yearly income combined with capital appreciation. The results of his study show that by implementing the enhanced dividend yield strategy, yearly income would have increased by 10%per annum and between 1962 and 2009, the principal increased by 5538%. What's more, this strategy never had a five-year period in which it lost money, very enticing for risk-averse investors.
How does it work?
O'Shaughnessy created a dividend yield strategy with a twist. Sometimes high yielding stocks are value traps and this strategy tries to get rid of these stocks in 2 ways.
- First he limits the stock universe to market leading companies, that accourding to O'Shaughnessy have the
Shares outstanding > dataset average
Cash flow > dataset average
Sales > 1.5 times dataset average
- Next he excludes the bottom half of these stocks ranked by their EBITDA/EV. This way he only keeps the 50% of market leaders with the best financial conditions.
Finally, he builds a portfolio in which he overweights the stocks with the highest dividend yield, in the following manner:
- 25% of stocks with highest yield get 1.5 times the weight,
- the next 25% by yield get 1.25% the weight,
- the next 25% get 0.75 the weight,
- and the final 25 get 0.5 times the weight
The portfolio should be rebalanced every year.
You can read more about this strategy and the results by clicking on this link. This strategy is quite cumbersome to calculate for small investors, but with our screener it becomes a breeze. Just select the high dividend yield template screen, select your countries, and the screener will show the list of stocks for the dataset of the selected countries.
Pim van Vliet is a Dutch portfolio manager for the quantitative equities team at Robeco. He’s the author of different scientific papers and books, primarily about low-volatility investing. In his book ‘High returns from low risk: a remarkable stock market paradox’ he devised a strategy that provides above-market returns by investing in low volatility stocks.
The Capital Asset Pricing Model (CAPM) is widely used to predict the risk of investments. The model assumes that returns can be predicted by a linear model that uses volatility of the asset compared to the market. While this model was widely adopted throughout the finance industry, different academics soon challenged the assumptions used as they were not supported by empirical evidence. One of the first to do this was professor Robert Haugen, who questioned the methodology used to produce the supporting empirical evidence. (link: click here) Different studies confirmed Mr Haugen’s findings, however as it was counterintuitive, the investment community still uses the CAPM to this day.
Pim’s conservative stock formula
Pim built his strategy around this low-volatility anomaly or investment paradox, but he added two other factors into the mix.
- First he added a value component as he wants to detect stocks that were temporarily ‘on sale’. Stocks that generate a higher income for their shareholders compared to the value of the company are preferred. Pim measures income as dividends and share buybacks.
- Secondly, he added a momentum factor as some stocks might be cheap for a reason. Some stocks are value traps and even if they’re relatively cheap, there might not be any catalyst for recovery. As momentum factor, Pim uses the 12-month price index.
To get the list of stocks, Pim runs through the following steps:
- Start from a universe of the largest 1.000 stocks available. (Pim uses only US stocks in his book)
- Take the 500 stocks with the lowest volatility. (Pim uses 3-year volatility. In our template we use 2-year volatility as volatility over a 3 year period is not available)
- Select the top 20% of these stocks based on the combined raking of shareholder yield and 12-month price index. Buy these stocks.
- Repeat the process quarterly and rebalance the portfolio.
This formula selects:
low-risk companies that ‘conservatively’ deploy their capital, as they would rather distribute money to their shareholders than spend it on corporate activities themselves. The formula is also ‘conservative’ with regards to the timing. These stocks are only included when their business momentum improves and other investors have started to bid up their prices.
The author backtested this model over the period 1929-2015 and found that this model generated a 15% return per year. Compared to a portfolio of high-volatility stocks, it also proved to be more stable during more difficult periods.
Click here to go to Pim van Vliet's website.
The conservative formula in Valuesignals
Pim was so kind to provide us with guidance and feedback on how to best build his screen. We took the following steps:
- Set the minimum market Cap to $4,000m.
- Select the top 50% stocks with lowest volatility
- Create a custom factor based on shareholder yield and 1Y price index. Sort the results by this factor.
This screen was designed by the MFIE Capital team in 2010 and reveals companies with consistent earnings power for which the shares are trading at a considerable margin of safety. It can be seen as an extension of the Greenblatt Magic Formula as it uses the same calculation method and shares 2 ratios with the latter. The big difference is that it looks for companies that trade at a discount compared to book value and filters out companies that showed exceptional results during the last year. We made this screen available to all our users since it showed superior performance in our backtest.
“Our ERP5 screen generated a return of 18,66% annually in the period 1999-2010. By filtering out companies with an f-score less than 7, the return increased to 19,5% per annum.”
How does it work?
We rank companies based on 4 ratios:
- Earnings Yield (EY):
EBIT/Enterprise Value. This compares the earnings of a company compared to its theoretical purchase price. (market capitalization + debt) A company with a high EY can be purchased at a relatively low price compared to the earnings it generated during the last 12 months.
- Return On Invested Capital (ROIC):
EBIT / (Net Working Capital + Net Fixed Assets). A company with a high ROIC demonstrates that it's lean, i.e. it's able to generate high earnings compared to the money invested.
- 5 year ROIC:
Average ROIC during the last 5 years. Has the company demonstrated that it's been able to generate relatively high returns in a consistent manner in the past.
Market Cap/Common Shareholders Equity. How big is the margin of safety, i.e. the price you pay for a share compared to the book value of the company. Research shows that buying companies with a low price-to-book value generates superior returns. (e.g., Rosenberg, Reid-, and Lanstein 1984; Fama and French 1992; and Lakonishok, Shleifer, and Vishny 1994)
We rank each company on these 4 ratios and then sum up the rankings. We rank this score to get the ERP5 score.
We created a variation of this screen and named it the ERP5 Best Selection. This screen ranks the companies based on ERP5 score but also filters out ones with an f-score of less than 7. This way we only select companies for which the prospects are improving compared to last year. Adding this extra filter increased the yearly return in our 1999-2010 backtest by almost 1%, from 18,66% to 19,5%.