Magic Formula Investing Stock Screener Strategy

What is Magic Formula Investing?

Magic formula investing is a rules-based investing strategy that buys companies with a high earnings yield and return on capital employed.

It was developed by professor and hedge fund manager, Joel Greenblatt, who outlined the investment process in his 2005 book: “The Little Book That Beats the Market”.

He showed that over a 17-year period (1988-2004), it earned an average annual return of 30.8%. This comfortably beat the market (S&P 500) over the same period – which only earned 12.4%.

But its appeal extends further than this.

The strategy is both simple and intuitive. It is built on sound investment principles that have their roots in the lessons of Warren Buffett and Benjamin Graham.

That is, buy good companies (Buffett) at cheap prices (Graham).

Unlike most quantitative strategies, this makes magic formula investing suitable even for beginners.

However, don’t let the name fool you. Whilst its track-record and simplicity portray some sort of “black box” money printer, remember there is no such thing as a “magic formula” in trading.

The application is where it gets tricky, and recent results have been much less inspiring than the original.

In summary, magic formula investing is a time-tested, formulaic strategy for picking stocks with strong quality and value characteristics.

How to Calculate the Magic Formula

As mentioned, the magic formula looks to buy good companies that are cheap. Sounds pretty obvious, right?

But what classifies as good?

And what classifies as cheap?

Well, to answer these questions, Greenblatt suggests focusing on two ratios: the return on capital employed, and earnings yield.

Return on Capital Employed

For a company to be “good”, Greenblatt argues that it should earn a healthy return on the capital it invests.

He uses the example of a company building a store to illustrate this. If it costs $400k to build a store that will earn $200k next year, this equates to a 50% return on capital. Compare this to a company that only earns $10k from the same investment – a return of 2.5%. Clearly investors should prefer the first company.

Companies with high returns on capital tend to have a strong competitive moat. This could be due to brand strength, scale, or unique products.

Whatever it is, they possess characteristics that help them fend off competitors and become market leaders. As a result, they deliver exceptional returns over the long-term.

In the investment world, picking companies with these traits is known as “quality investing“.

Return on capital employed is calculated by dividing EBIT by capital employed. In turn, capital employed is the sum of net fixed assets and net working capital.

Return on Capital = EBIT/(Net Fixed Assets + Net Working Capital)

Read this article to see more ROIC stock screener metrics.

Earnings Yield

To decide whether a company is “cheap”, Greenblatt ranks companies based on their earnings yield.

When most people think of the earnings yield, they immediately think of the inverse P/E ratio. Or, earnings per share (EPS) divided by the share price.

However, Joel Greenblatt calculates a company’s earnings yield by dividing EBIT (operating profit) by enterprise value.

The reason he prefers EBIT over EPS, is because it tells you what a company earns from its core operations. As I explain in this article on profit margin screens, EPS includes non-operating items, like interest and taxes, that don’t reflect the earnings power of core assets.

As such, EBIT presents a “cleaner” picture of operating income. This is particularly useful when comparing businesses with different tax rates, debt levels, and accounting policies.

For a similar reason, enterprise value is chosen over market cap, because it takes a company’s financial structure into account. As such, it considers both the price paid for an equity stake in a business as well as the debt financing used to help generate operating earnings.

Therefore, by using EBIT and comparing it to enterprise value, we can calculate the pre-tax earnings yield on the full purchase price of a business. This allows us to put companies with different levels of debt and different tax rates on an equal footing when comparing earnings yields.

Hence, Greenblatt uses the following formula in his book:

Earnings Yield = EBIT/Enterprise Value

To see more valuation ratios like this, read this article for the best value stock screener ratios.

Magic Formula Calculation

Now we have the two components that make up the magic formula, we can go about calculating it.

The formula involves a 3-step ranking process as follows:

  1. Rank companies according to their earnings yield – giving a higher score to those that are cheaper
  2. Rank companies according to their return on capital – giving a higher score to those with higher returns
  3. Combine the previous 2 ranks to arrive at an aggregate score

The table below gives you an idea of how this works in practice.

CompanyEarnings YieldRankReturn on CapitalRankMF Rank
A2.4%13.8%12
B3.7%212.9%35
C9.2%67.6%28
D6.5%417.3%59
E8.9%522.7%611
F5.8%314.5%47

This ranking process makes the magic formula far more mechanical than other guru strategies, such as Martin Zweig, Peter Lynch, and William O’Neil’s CANSLIM investing method. All of these require some degree of qualitative input.

If you’d rather just cut to the chase and see what stocks certain gurus own, Ziggma allows you to peak inside the portfolios of 13 world-famous investors.

Magic Formula Stock Screener Criteria

Below is a step-by-step process to implement the magic formula strategy with a stock screener.

  • US companies, excluding utilities, financials, and ADRs (foreign companies)
  • Minimum market cap of $50m
  • Rank companies based on earnings yield
  • Rank companies based on return on capital employed
  • Combine the previous 2 ranks to calculate an aggregate score
  • Buy 5 or 7 of the highest ranked companies every few months (2-3 months) until you have a diversified portfolio of 20-30 stocks
  • Sell each stock after holding it for 1 year
  • Sell losers just before year end and winners just after year end for tax advantages
  • Repeat strategy for a minimum of 3-5 years to start seeing real results

Does Magic Formula Investing Work?

The reason why magic formula investing became so famous in the first place is because of its impressive track record.

The table below from The Little Book That Beats The Market shows this. As you can see, this investing strategy posted a CAGR of 30.8% from 1988-2004, compared to a CAGR of 12.4% for the S&P 500.

magic formula performance

Astounded by these results, practitioners tried replicating them in their own backtests.

When real-world frictions – like slippage and transaction costs – were included, the results weren’t quite as spectacular. However, directionally they matched up .

Additionally, researchers found evidence that it works in other markets outside the US. This article by Quant Investing – Magic Formula investment strategy backtest collates much of this research.

Moreover, in a second edition of his book called: “The Little Book That Still Beats The Market”, Greenblatt provided out-of-sample (real-world) evidence that the strategy still worked in the years following his initial book release.

magic formula results

All in all, there is no doubt that this investment strategy went through an impressive period of beating the market.

Does Magic Formula Investing Still Work?

A better question, however, is whether magic formula investing still works today?

The truth is that recent performance is much less inspiring.

In the decade since Greenblatt’s second book release, numerous studies document its weak returns.

For example, this investor found the following:

“If you’d bought the thirty highest-ranked stocks every week over the last ten years and held them for one year, you would have made an average of 2.20% per year, while if you’d bought the S&P 500 ETF SPY instead, you would have made an average of 13.02%”.

Based on this, it appears Greenblatt took his victory lap too soon.

Why Has Magic Formula Investing Stopped Working?

There are many theories why magic formula investing stopped working in recent years. However, the most convincing are as follows:

  1. Value investing has underperformed – The era of quantitative easing brought a regime change in markets, which favoured growth strategies at the expense of value strategies like the magic formula.
  2. Alpha decay – As more people implemented the magic formula, markets became efficient in pricing the alpha.

Having said all this, magic formula investing shouldn’t be completely discarded.

Yes, it’s gone through a rough patch, but that doesn’t mean it won’t ever come back into favour. Just as markets go through cycles, so too do investment strategies.

Remember, the investment philosophy behind magic formula investing is sound. So don’t be surprised if this strategy has its time in the sun again.

Quant Investing Stock Screener

Below, I will show you how to implement the Magic Formula through a stock screener.

First, you may find this article on how to use a stock screener useful.

There is a free screener available on the magic formula website, however it only includes US companies and has limited functionality.

The best stock screener I’ve found for magic formula investing is Quant Investing. Not only does it include 36 countries (including the US), but it works at a click of a button.

To find out more about this stock screener, read my Quant Investing stock screener review.

The simple steps below show how easy it is to find magic formula companies:

  1. Press the ‘Load’ icon to bring up a menu of pre-defined screens.



  2. Select the ‘Magic Formula screen’ from the predefined screeners menu.



  3. Modify any of the settings to suit your preferences. Choose which countries you want to apply the criteria to. Add multiple factors such as momentum. And change market cap and trading volume thresholds.



  4. After clicking ‘Apply’, the stock screener results come up instantly. Now you can select any of the individual companies to conduct further research on.