1. How to use GuruFocus - Tutorials
  2. What Is in the GuruFocus Premium Membership?
  3. A DIY Guide on How to Invest Using Guru Strategies

Is Magic Formula Really Profitable?

July 28, 2014

I have invested in stocks since 2006 and have been since searching for the holy grail of investing which could give me outstanding market-beating results with lower risk than the market portfolio offers. When I read about quantitative value investment strategies a few years ago, I was sold. All the blog posts, books and research papers showed massive results. But still I did not start to follow these types of strategies. Why? Because I think that no one should invest in any kind of black box system until he/she has verified himself/herself that it actually works and understands the underlying reason for the alpha. It is quite hard and expensive to get hands-on historical fundamental data so that is why I did not have the chance of testing quantitative value strategies. Until now. With a lot of work I was able to code my own simulator which I used to simulate all kinds of investment strategies. As I had access to both 25 years worth of historical fundamentals and price data, my simulator has been running full-time during these couple of last months when I was giving a ride for all those value strategies out there. Low P/E, P/B, P/S, Graham Net-Nets, Piotroski, Magic Formula etc. were tested. In this article, I will be presenting the results for the possibly magical Magic Formula value strategy which is originally based on Warren Buffet's ideas of buying cheaply wonderful companies. Hopefully you will find the results interesting, so keep on reading.

As mentioned earlier, the simulation is done with my own Java-based simulator. The reason for this was simple. I wanted a free, open-source white-box system. I can easily add any kind of features, test any kind of investment strategies with any kind of data and import or export the data however I wish, for free. In addition, as the simulator is my own, I fully understand its limitations, how it works and can be 99% sure that the results are really valid. Otherwise, this would not have been possible.

Ok, I think I have had enough of chit-chat and can continue with the actual Magic Formula results. The rules are very simple, calculate the Return on Equity and earnings yield for every stock included in the simulation and rate them based on points. For instance, if stock A has the highest RoE of all stocks in the simulation and the 10th highest earnings yield, it will be given 11 points. After all points are assigned, the simulator will choose a maximum of 50 stocks with the lowest points and invest 2% of entire capital to each of those stocks. The portfolio was rebalanced on the beginning of April and October each year and last year's fundamental data was used in order to avoid look-ahead bias. The simulation interval was from 1988 to mid-2014 for U.S. listed stocks. The normal way of calculating RoE would be to use net income but in this simulation I used owner earnings which is a term introduced by Warren Buffett (Trades, Portfolio). Owner earnings is simply cash flow from operating activities subtracted by capital expenditures. So, RoE was calculated by dividing owner earnings by total equity. Earnings yield was calculated by dividing the market cap by owner earnings. The bigger the values, the better it was. Dow Jones Industrial Average will be used as the benchmark index which delivered 8.63% during the simulation interval. Dividends were included in the portfolio results but not in the benchmark returns. The equity curve for the Magic Formula strategy can be found below.

The strategy delivered 22.63% per annum and outperformed 79% of the time the benchmark, which is really astounding. I think we can quite fairly say, that Magic Formula really is magical in terms of returns and my results seem to be aligned with all other researches out there. But wait a minute! When I am buying a stock I always have to pay something to my broker. Let's now assume that I have to pay 0.1% with a minimum of 7$ to my broker from each transaction. In addition the spread will be 0.1% because I have to use market orders to get my transaction quickly through during rebalancing. This shouldn't lower the results much, I guess. The equity curve after all transaction costs and spread can be found below.

It still looks very impressing as the return was 21.68% per annum. Hmmm, what about the government? I think they want their share as well in the form of capital taxes. Let's assume next that the tax on capital gains is 30% and it needs to be paid at mid-July. The equity curve after transaction costs, spread and taxes can be found below.

Wow, government took away nearly 2/3rd's of the entire end net-worth and the return per annum dropped from 21.68% to 15.88%. The Magic Formula is still outperforming the benchmark roughly 68% of the time which is still good enough. I hope there are no more other factors, limiting the returns. Let us recap, we have included the broker fees, spread and taxes. What else? Ah, what about the survivorship bias? Let's next run the same simulation with de-listed stocks as well. The equity curve for Magic Formula after transaction costs, spread, taxes and with de-listed stocks included can be found below.

That didn't seem to lower the results much as the strategy is still returning 15.55% per annum. However, one must note that in this case the results would actually be annually 0.7%-1.4% (guesstimate) higher as I did not have access to dividend data for delisted stocks. So, in that sense including delisted stocks actually increased the results slightly. Are there still any other limiting factors to consider? Unfortunately, there is one more. We simply can not assume that we could buy low liquidity stocks without affecting their prices. As slippage is impossible to simulate, the simulator excludes all stocks which do not have enough trading volume. If 5% of stock's yesterday's trading volume was lower than the amount of capital planned to be used for buying it, the stock was not bought. The equity curve after transaction fees, spread, taxes, with de-listed stocks and liquidity check is shown below.

Once again, the results dropped substantially from 15.55% to 11.81% per annum. This might be because the smallest stocks seem to produce most of the alpha and as bigger the portfolio gets, the larger the trading volume for any given stock has to be so that we would not affect the share price. If we would include the dividends after taxes from delisted stocks as well, the actual annual return would be somewhere in the ballpark of 12.6%-13.4%.

The first result with a 22.63% per annum seemed to be roughly aligned with all the other researches about Magic Formula. However, I'm not quite sure what expenses and limitations are actually taken into consideration in them. I'm quite confident that taxes are excluded in every single research I have read and if you still recall, taxes took away roughly 2/3rd's of the ending net-worth. Broker fees and spread is one thing which might be missing from most of the researches as well, but I could be wrong as well. However, this factor decreased the returns "only" by 1% per annum so it should not affect the results much. Survivorship bias affected the results in a positive way which was a clear surprise. The biggest limiting factor along with taxes was liquidity. In some of the previous researches I have read, stocks which have the lowest 40% market cap were excluded but I don't honestly think this is correct. This kind of an approach might still exclude stocks which have enough volume or include stocks which clearly might not have enough volume. The liquidity factor really starts to affect after the portfolio has grown substantially. This is why I would assume that the longer the time frame for testing Magic Formula, the lower the results would be because the biggest gains would be made while the portfolio is still small in size and as the portfolio grows, the smaller stocks would have to be excluded which are the ones producing the most of the gains. Still, even though accounting all the limiting factor, Magic Formula proved to be a viable, robust and alpha-producing strategy. It seems to beat the index by 58% of the time with a slightly higher volatility even though dividends for delisted stocks were excluded. Now, a careful reader might ask that what about the dividends for the benchmark which were excluded? If we assume a 2% per annum dividend yield for the benchmark, it would have returned 10.4% per annum. After taxes this would equate to roughly 8.9% per annum so we could conclude on a very high level that dividends and taxes roughly balance each other out and Magic Formula still beats it quite substantially. The next question is that can anyone disregard the Magic Formula results? For instance, if compared to my own personal investment strategy, Magic Formula crushed it by a country-mile so in that sense the only viable option for me would be to switch everything to Magic Formula. However, some psychological factors seem to prohibit me from doing this. How about you?

The entire report can be read from here: http://s000.tinyupload.com/?file_id=01483729989677288575

Rating: 5.0/5 (5 votes)



Dr. Paul Price
Dr. Paul Price - 3 years ago    Report SPAM

You say you haven't owned equities since 2006 but never indicated why.

If you haven't actually invested over the past 8 years your take on investing appears suspect.Either you have no money (a bad sign) or you consciously decided to sit out the last 5.5 years of great returns.

Either way it does not promote confidence.

Hpeterscheck - 3 years ago    Report SPAM

Pretty neat. I like that you took expenses into account.

im actually running a real time experiment with, among other techniques, the magic formula. Except I'm doing it with real money and trying to make it a meaningful amount (about 20% of investable assets).

To make it as close as possible to the original strategy I'm going to the magic formula homepage, taking the fir 30 stocks at 50m+ market cap and rebalancing annually. I sell losers right before to get short term loss write off and holding winners just over a year to get long term tax treatment. I'm only 4 months in, but I don't think the turnover will be 100% every year. Also, my fees are 9$/trade, so worst case around 540/year (9 * 30* 2). So the more you invest the lower the impact of fees. If you invest 10k it's 5% which is pretty high... A low cost etf is probably going to beat the hell out of that. But if you invest 100k, fees are about where a low cost eft would be.

what I will say is the hardest thing is the psychological impact of volatility. I'm generally a long term investor and I buy pretty safe companies I understand and research (jnj, ok, pep, etc). It's easy to hold those through volatility because I know what they are worth. With mf stocks (or any other mechanical strategy) you don't really have that confidence and if you add that filter you may do much worse because stuff like MF finds companies that look pretty bad on paper. It's only the commitment to the strategy that allows me to fight through that psychological impact.

its a 5 year experiment so long way to go :).

Im doing to keep me from messing with the bulk of my portfolio which is long term boring stuff. Important to have hobbies otherwise I start to think I'm smart and then fool myself into thinking I'm investing when I'm speculating. Researching those mf companies and looking at other strategies takes up time and is pretty fun. Right now it's down about 5%, so if it ends up 10-15 post tax/fees, etc that's not too bad, but it's the roller coaster that will throw most people out. When you backtest you burn through 5 years in a few seconds unfortunately you live life forward second by second.

thanks for putting this together... It's a helpful perspective.

Robertcray - 3 years ago    Report SPAM

There are (were?) a few mutual funds using this strategy. We owned one but it didn't do well over a year or two. Part of the problem was a lot of small positions and a fair amount of trading from re-balancing. You should take a look.

Hpeterscheck - 3 years ago    Report SPAM

That's a good thought.

I saw greenblatt fund (https://www.gothamfunds.com/) a while back had an MF fund, but I think he killed it off or merged it with his other funds - I was semi-excited but was somewhat taken aback by the fees if I recall correctly. I don't like paying fees :).

Per his own comments, 1-2 years isn't enough. MF will underperform, sometimes substantially for 3 or more years... and of course buyer beware on using the past to predict the future :). Conveniently for him, that's one of the reasons he says it'll continue to work... people will flinch after 1-2 years, send him a nasty letter, and the long term holders will go on to El Dorado. Well... maybe.

5 years is what I am going to try for with this experiment, but I don't know if I'll be able to stick with it... or if I even should. It draws quite a bit of controversy because his original book claimed 30%+ annual returns. That's good and all, but hard to believe at face value. For me the goal is slightly different. I want 10%-15% over a very long timeline (20-40 years) and reduced yearly volitility (say... 40% max annual drawdown). That's not necessarily the "right answer" but it fits my temprament and life stress-to-fun ratio. I like to be able to take my kids to the playground or to Disneyland without having 25% of my brain stressed about what the stock price of whatever is today or when this damn recession will end (or when the bull market will drop to let me buy more). Ideally I can devote 100% of my brain to that a few hours a week or maybe a day and then turn it off... hard for me.

The joy of climbing a mountain is slightly different when you're doing it to see the beauty of a summit vs. when you're doing it because there's a sword at your back... although in both cases the results are the same. So for me investment strategy is about 90% sword removal and 10% getting to the summit. We can choose our mountains and how long we want to take to climb them.

I suspect almost everyone who reads this site has these kinds of numbers (I need X money at Y% to feed my lifestyle forever) and then they do all the scary back-testing and forward-projecting to figure out how that would hold up in 2001-2009... or 1980-1999 or 1972-1980 and so on. Fun stuff when you it's academic... more stressful when you're living it I guess.

How I love the fun of the investment process :)

Jbisson9 - 3 years ago    Report SPAM

Nice work. Would be curious to know where you got 25 years of data.

Serpo - 3 years ago    Report SPAM

Dr. Paul Price:

I have been invsting in stocks since 2006 which was said in the first sentence but currently not with Magic Formula.


If you checked the full report go to the yearly and monthly report page. There you can see how well Magic Formula did relative to DJIA in a 5 year interval. I noticed a very interesting point there which might disappoint you. I think I might write a continuation article from it.


I tested re-balancing once and twice a year as well.

Toddloebmyers - 3 years ago    Report SPAM

If you include shorts and not just longs as part of the Magic Form the losses are just staggering. I ran this model through the crisis and determined that it is simply a nice mental model not something for implementation. I believe the failure is due to the fact that compunding is not a linear phenomenon and that high ROE (implied high ROIC) high PE names will take your head off in general. Greenblatt has sought to simplify his message and broaden his audience but in doing so loses some of his rigor. In short, you try doing this with clients and you are toast. I doubt that even the brave individual investor would hold on. Regardless just being on the long side with the Magic Form neglects small cap outperformance and its heavy reliance on Beta. Why not just do research?

Shb600 premium member - 3 years ago

I believe the Magic Formula weights 2 variables equally 1.Earnings Yield= EBIT/Enterprise Value 2. ROIC=EBIT/(Net Working Capital + Net Fixed assets). Greenblatt also excludes Financials and Utilities.I know it gets kind of complicated and Greenblatt prefers EBITDA- maintenance capex for Earnings Yield even though he doesn't use for Magic Formula.

At all-time highs people are always talking about taxes. In Fall 2008 to Spring 2009 no one was talking about taxes. Some of the stocks remain the same at the beginning and end of year especially in the large cap universe where stocks like MSFT, AAPL, INTC, EMC, ORCL, HPQ, CSCO, several large defense companies, several MLMs from what I recall seem to be there for last 2-3 years.

Studies I've seen don't have any greater drawdown than market and probably less plus you have comfort that you own something trading at a below average multiple. Having good data without survivorship bias(i.e. takeovers, bankruptcies, spinoffs,etc.) is important and some data sources don't correct for splits/ reverse splits or spinoffs.

Greenblatt's recent mutual fund results have been good(both long and short) and historical hedge fund results are amongst best ever. Greenblatt did 17 year study and when using only 1000 largest stocks has his group to pick from annual return was 22.9%. Not big fan of Beta being useful in any way as far as measure of risk.

Quantified - 3 years ago    Report SPAM

You've not used the same criteria as Greenblat uses for your study. This is, I'm afraid, going to have quite a considerable skew on your results. Therefore, while this is interesting, it should in no way be classed as a comparison or review of Magic Formula.

For ref Magic Formula components are:

EY = Operating Earnings (EBIT) / Enterprise Value

As Enterprise Value includes net debt it's probably self-evident why this would have a considerable bearing on the stocks picked with Magic Formula vs your study, but if not try this:


Best, Quantified

Please leave your comment:

Performances of the stocks mentioned by serpo

User Generated Screeners

DBrizanROTA22nov2017 943p
pbarker4652 week
pbarker46E&P CDN
moorebpLeveraged small-caps
kazu2016-12-15 Gori bu
mkettler0217hunting grounds
wqecapitalscreening value growth
wqecapitalscreening 1 value growth
Get WordPress Plugins for easy affiliate links on Stock Tickers and Guru Names | Earn affiliate commissions by embedding GuruFocus Charts
GuruFocus Affiliate Program: Earn up to $400 per referral. ( Learn More)

GF Chat