# Magic formula investing

Magic formula investing is an investment technique outlined by Joel Greenblatt that uses the principles of value investing.

## Development

Greenblatt (b. 1957), an American professional asset manager since the 1980s, suggests purchasing 30 "good companies": cheap stocks with a high earnings yield and a high return on capital. He describes this as a simplified version of the strategy employed by Warren Buffett and Charlie Munger of Berkshire Hathaway.
He touts the success of his magic formula in his book 'The Little Book that Beats the Market' (ISBN 0-471-73306-7 published 2005, revised 2010), stating it averaged a 17-year annual return of 30.8%.
He wrote the book for a non-technical reader (his teenaged children were the target audience), but an appendix includes more advanced explanations and data for readers with relevant experience or education. Greenblatt's system analyzed the largest companies trading on the American stock market, ranked by the largest 1,000, 2,500 or 3,000, for a 17 year period before the book's 2005 publication. Smaller companies, $50 million or under, were avoided because they tend to have fewer shares in circulation and large purchases can cause sharp changes in share prices. Greenblatt did not test this hypothesis on international stock markets due to difficulties comparing international and American data, but believed it would apply globally. He also stressed the formula will not necessarily be successful with any specific stock, but will be successful for a group of stocks as a unit or block.
He goes on to assigning numerical rankings, based on each company's earnings yield and return on capital:
   "...a company that ranked 232nd best in return on capital and 153rd best in earnings yield would receive combined ranking of 385 (232 + 153). [...] Getting excellent rankings in both categories, (though not the top ranked in either) would be better under this ranking system than being the top-ranked in one category with only a pretty good ranking in the other."
From here, Greenblatt recommends selecting 20 to 30 of the better-ranked companies, selling them at predetermined intervals and replacing with new stocks that fit the formula.
Greenblatt's analysis found when applied to the largest 1,000 stocks the formula underperformed the market (defined as the S&P 500) for an average of five months out of each year. On an annual basis, the formula outperformed the market three out of four years but underperformed about 16% of two-year periods and 5% of three-year periods. Greenblatt asserts the formula out-performed market averages 100% of the time for any period longer than three years and worked best over three to five years or more. Results were even better and with lower risk when the formula was applied to larger pools of stocks like the largest 3,000 companies. The formula can thus be a contrarian investing strategy, focused sometimes on staying committed to stocks that might be temporarily unattractive or with sub-par performance.
In an afterword to the 2010 edition, Greenblatt admitted three possible flaws to the formula:
* The formula can underperform for up to several years which many investors will find discouraging.
* Some amateurs found it cumbersome to track buying and selling times for stocks.
* Beating the market does not necessarily imply making money (e.g. if the market loses 40% one year, following the formula might result in a 38% loss, which Greenblatt describes as "small consolation".)

## Formula

* Establish a minimum market capitalization (usually greater than $50 million).
* Exclude utility and financial stocks.
* Exclude foreign companies (American Depositary Receipts).
* Determine company's earnings yield = EBIT / enterprise value.
* Determine company's return on capital = EBIT / (net fixed assets + working capital).
* Rank all companies above chosen market capitalization by highest earnings yield and highest return on capital (ranked as percentages).
* Invest in 20–30 highest ranked companies, accumulating 2–3 positions per month over a 12-month period.
* Re-balance portfolio once per year, selling losers one week before the year-mark and winners one week after the year mark.
* Continue over a long-term (5–10+ year) period.

## Critical analysis

A number of studies have found merit in Greenblatt's "magic investing formula" in various markets around the world. However, the studies have also often noted increased volatility, short-term underperformance and other potential risks.
* A 2009 study of stock markets in the Nordic countries from 1998 to 2008 found Greenblatt's formula led to outperformance of market averages. However, the authors advised the formula was best used as a screening tool and should not be applied dogmatically, as the outperformance associated with Greenblatt's formula might be accounted for by data outlined in the capital asset pricing model and the Fama–French three-factor model.
* A 2016 study from the stock market in Finland found the magic formula "yields higher risk-adjusted returns on average". The authors also proposed that a modified form of Greenblatt's strategy, additionally emphasizing companies with better than average free cash flow, was best suited to bull markets.
* A 2016 study found possible confirmation of Greenblatt's formula in Brazil's stock market, but cautioned "we could not assure with a high level of certainty that the strategy is alpha generator, and that our results were not due to randomness."
* A 2017 study from the markets in Sweden found application of the Greenblatt formula resulted in long-term outperformance of market averages in the periods 2005 to 2015, and 2007 to 2017. The authors also found the "magic formula" was also associated with short-term underperformance in some periods, and significantly increased volatility.
* In 2018, a paper presented at a professional conference found validation for the Greenblatt formula in the Chinese stock market.
* Independent scholar Robert Andrew Martin conducted a backtest analysis of Greenblatt's magic investing formula for the US market, published June 2020. His analysis revealed that from 2003 to 2015 application of Greenblatt's formula to U.S. stocks resulted in an annualized average return of 11.4%. This outperformed the S&P 500's annualized return of 8.7%. However, Martin also found that the formula underperformed the S&P 500 slightly during the 2007-2011 period and actually went negative for a time. Additionally, over the entire 2003-2015 period, the strategy exhibited more volatility compared to the S&P 500. In his evaluation, Martin found that the almost 3% outperformance was remarkable, though it fell short of the 30% returns claimed in Greenblatt's book. It is important to note that different sample periods are used by Greenblatt and Martin. Moreover, Martin highlighted the presence of "significant psychological risk" associated with under-performance during the aftermath of the 2007-2008 financial crisis.
* A 2022 study of the stock market in Norway found that the magic formula generates risk-adjusted excess returns. Over the sample period (2003-2022) the strategy had a CAGR of 21.56%. However, these returns may not be achievable in real-world conditions due to the impact of transaction costs. The study also found that the magic formula could be improved by using operating cash flows instead of EBIT.
* The strategy also outperforms the Indian stock market over the period July 2012 - Feb 2020, according to a 2022 paper. Over this period the average return was 13.9% of 30-stock Magic Formula portfolio versus 9.3% for the BSE Sensex.
* An analysis of the Hong Kong stock market from 2001 to 2014 found Greenblatt's formula was associated with long-term outperformance of market averages by 6-15% depending on company size and other variables.
* An empirical study of the French stock market for the period 1999-2019 shows that Joel Greenblatt's formula was able to beating the market by 5%-9% per year using various quality definitions.

## Comparison to other Investing formulas

A 2024 study evaluates the formula for the U.S. market from 1963 to 2022 and compares it with the performance of the Piotroski F-Score, Acquirer's Multiple, and Conservative Formula. The study finds that all four formulas generate significant raw and risk-adjusted returns, primarily by providing efficient exposure to well-established style factors. However, no single formula consistently outperforms across all performance metrics. While the Acquirer's Multiple achieves the highest returns for top decile portfolios and the Conservative Formula leads in CAPM alpha and return spread, the Magic Formula exhibits the highest remaining alpha after adjusting for common factors.